-
-
Save frank-dspeed/8be0bead16b8edc043cf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
parse_str(implode('&', array_slice($argv, 1)), $_GET); | |
if (strpos($argv[1],'adspace') !== false) { | |
print slimParseAdUrl($argv[1]); | |
print "\n"; | |
} else { | |
print slimParseAdUrl($argv[1], true); | |
print "\n"; | |
} | |
# print_r ($argv); | |
# print "\n"; | |
# print slimParseAdUrl("$_GET[0]", true); | |
function slimParseAdUrl($strlUrl, $isDirect = false) | |
{ | |
$strProxyHost = "http://proxy.z-defense.com:81/"; | |
$strPingBackHost = "http://pingback.z-defense.com:81/p/?u="; | |
if($isDirect) | |
{ | |
return str_replace("http://spaces.slimspots.com/", $strProxyHost, $strlUrl); | |
} | |
return $strPingBackHost.base64_encode($strlUrl); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment