伪造ip,不能伪造remote_addr

<?php
header('Content-tyep:text/html;charset=utf8');
$ch = curl_init();
$url = "http://localhost/tp/target_ip.php";
$header = array(
'CLIENT-IP:58.68.44.61',
'X-FORWARDED-FOR:58.68.44.61',
);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
$page_content = curl_exec($ch);
curl_close($ch);
echo $page_content; 
posted @ 2014-04-04 17:21  wint  Views(1475)  Comments(0)    收藏  举报