http://www.jb51.net/article/27995.htm
php中使用Curl、socket、file_get_contents三种方法POST提交数据

===============================================================

http://zhidao.baidu.com/link?url=l6ItlCJrMbcb5eIviWzCDDdBVfZS2oSBzQjXWVBw5Ki6V8OwbrF__GuS74sotN7vRoM01dMfLUZledC4iEKFUq
php 伪造 http_referer

我从A站进入B站.不想让B站获取到的http_referer是我的站的网址.而是C站的网址. 用php怎么实现? 
注.我的服务器已安装curl.
回答好了.多送一百分!

function getContentCURL($url,$post_data = '',$user_agent="Mozilla/5.0 (Windows; U; Windows NT 6.0; zh-CN; rv:1.8.1.3)",  $header = 0, $follow_loc = 1, $cookie_file="/tmp/cookie.txt",$CURLOPT_TIMEOUT=30)
{
 $ch = @curl_init();
 @curl_setopt($ch, CURLOPT_URL, $url);
 @curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
 @curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
 @curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
 @curl_setopt($ch, CURLOPT_HEADER, $header);
 @curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, $follow_loc);
 @curl_setopt($ch, CURLOPT_TIMEOUT, $CURLOPT_TIMEOUT);
 if (trim($post_data) != '') {
  @curl_setopt($ch, CURLOPT_POST, 1);
  @curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
 }
 $result = @curl_exec($ch);
 @curl_close($ch);

 return $result;
}
通过这种方式做代理, 你在仔细研究下吧 
参考下
http://www.21andy.com/blog/20080507/1095.html

在A里面用JS OPEN C,然后在设置C的location到B