Tuesday, April 12, 2011

$value) {
$value = urlencode(stripslashes($value));
$QueryString .= "&$key=$value";
}

if(function_exists("curl_init")) {
echo curl_post("www.Free-Link-Exchange.com/smbin/dumplinks.asp?" . $QueryString, $PostingString);
} else {
// congfigure our headers
$header = "POST /smbin/dumplinks.asp?" . $QueryString . " HTTP/1.0\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($PostingString) . "\r\n\r\n";

// open a connection to Free-Link-Exchange
$fp = fsockopen ('www.Free-Link-Exchange.com', 80, $errno, $errstr, 30);

if (!$fp) {
// HTTP ERROR
echo "Error processing request";
} else {
// send form headers, form post
fputs ($fp, $header . $PostingString);

// set our returned header flag to true, these we want to ignore
// initialize our body variable
$bHeader = true;
$sData = "";

while (!feof($fp)) {
$res = fgets ($fp, 8192);
$res = ereg_replace("[\r\n]", "", $res);
// if we have an empty line, we are now past the headers.
// set the flag so we can start retrieving data
if (strlen($res) == 0) $bHeader = false;

if ($bHeader == false) $sData .= $res;
}
echo $sData;

fclose ($fp);
}
}

function curl_post( $Url, $postData)
{
$ch = curl_init($Url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
?>
Hotmail Email