看看http协议的头部分关于Referer的定义
14.36 Referer
The Referer[sic] request-header field allows the client to specify, for the server's benefit, the address (URI) of the resource from which the Request-URI was obtained (the "referrer", although the header field is misspelled.) The Referer request-header allows a server to generate lists of back-links to resources for interest, logging, optimized caching, etc. It also allows obsolete or mistyped links to be traced for maintenance. The Referer field MUST NOT be sent if the Request-URI was obtained from a source that does not have its own URI, such as input from the user keyboard. Referer = "Referer" ":" ( absoluteURI | relativeURI )Example: Referer: http://www.w3.org/hypertext/DataSources/Overview.html
--------------------------------------------------------------------------
再看看PHP手册中的如何发送HTTP请求
<?php
$fp = fsockopen("www.example.com", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
$out = "GET / HTTP/1.1\r\n";
$out .= "Host: www.example.com\r\n";
$out .= "Connection: Close\r\n\r\n";
$out .= "Referer:www.yourdomain.com\r\n"; //<------这句是我加的,你试试吧
fputs($fp, $out);
while (!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
}
?>
不知道这样行不行...
14.36 Referer
The Referer[sic] request-header field allows the client to specify, for the server's benefit, the address (URI) of the resource from which the Request-URI was obtained (the "referrer", although the header field is misspelled.) The Referer request-header allows a server to generate lists of back-links to resources for interest, logging, optimized caching, etc. It also allows obsolete or mistyped links to be traced for maintenance. The Referer field MUST NOT be sent if the Request-URI was obtained from a source that does not have its own URI, such as input from the user keyboard. Referer = "Referer" ":" ( absoluteURI | relativeURI )Example: Referer: http://www.w3.org/hypertext/DataSources/Overview.html
--------------------------------------------------------------------------
再看看PHP手册中的如何发送HTTP请求
<?php
$fp = fsockopen("www.example.com", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
$out = "GET / HTTP/1.1\r\n";
$out .= "Host: www.example.com\r\n";
$out .= "Connection: Close\r\n\r\n";
$out .= "Referer:www.yourdomain.com\r\n"; //<------这句是我加的,你试试吧
fputs($fp, $out);
while (!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
}
?>
不知道这样行不行...
$url = "http://www.test.com/test.html"; curl_setopt($ch, CURLOPT_REFERER, $url);
HTTP_REFERER的伪造是肯定可以的
感谢楼上的各位!
to cloudchen(陈系上.net)
flashget确实早就实现了的,但是并不见得有效……