Naja, das geht schon.
Code:
<?php
echo refspoof('http://zielseite.tld', 'http://www.refspoofingisnotacrime.tld');
function refspoof($url, $referer) {
$headers[] = 'Accept: image/gif, image/x-bitmap, image/jpeg, image/pjpeg,text/html,application/xhtml+xml';
$headers[] = 'Connection: Keep-Alive';
$headers[] = 'Content-type: application/x-www-form-urlencoded;charset=UTF-8';
$useragent = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0)';
$process = curl_init($url);
curl_setopt($process, CURLOPT_HTTPHEADER, $headers); //Header
curl_setopt($process, CURLOPT_HEADER, 0);
curl_setopt($process, CURLOPT_USERAGENT, $useragent); //User Agent
curl_setopt($process, CURLOPT_REFERER, $referer); //Ref
curl_setopt($process, CURLOPT_TIMEOUT, 30);
curl_setopt($process, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($process, CURLOPT_FOLLOWLOCATION, 1);
$return = curl_exec($process); //do eet
curl_close($process); //bisschen aufräumen
return $return;
}
?>
Sollte tun was du willst, geht natürlich noch schöner aber ich hab jetzt keinen Bock das in meinem Archiv raus zu suchen... Vor dem Problem stand ich nämlich auch schon einmal :(
Refspoofing ist das Stichwort,
[Only registered and activated users can see links. Click Here To Register...] die richtige Sektion.