Location: PHPKode > scripts > LinkExchange > LinkExchange/sdn.php
<?php
function getSDLink($t,$t2,$t3,$t4,$t5,$t6) {
if (!$_GET['link']) {
$ip = getenv('REMOTE_ADDR');
$url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$url = "http://download.sdnex.com/wizard.php?url=$url&ip=$ip&t=$t&color_border=$t2&color_link=$t3&color_bg=$t4&color_text=$t5&color_url=$t6";
$ping = parse_url($url);
$ping['query'] = "?".$ping['query'];
$head  = "GET ".$ping['path'].$ping['query']." HTTP/1.0\r\n";
$head .= "Host: ".$ping['host']."\r\n";
$head .= "\r\n";
if (!$ping['port']) {
$ping['port'] = 80;
}
$fp = @fsockopen($ping['host'], $ping['port'], $errno, $errstr, 10);
if ($fp) {
fputs ($fp, $head);
$res = "";
while(!feof($fp)) {
$res = $res . fgets($fp, 4096);
}
fclose($fp);
list($head, $body) = split("\r\n\r\n", $res, 2 );
return $body;
}
}
}
?>
Return current item: LinkExchange