您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

PHP用CURL仿冒IP和来源

2024/3/21 1:03:05发布19次查看
php用curl伪造ip和来源
php伪造来源ip,,,1.php 请求 2.php 。
1.php代码:
$ch = curl_init();curl_setopt($ch, curlopt_url, http://localhost/2.php);curl_setopt($ch, curlopt_httpheader, array('x-forwarded-for:8.8.8.8', 'client-ip:8.8.8.8'));  //构造ipcurl_setopt($ch, curlopt_referer, http://www.gosoa.com.cn/ );   //构造来路curl_setopt($ch, curlopt_header, 1);$out = curl_exec($ch);curl_close($ch);2.php代码如下:function getclientip() {    if (!empty($_server[http_client_ip]))        $ip = $_server[http_client_ip];    else if (!empty($_server[http_x_forwarded_for]))        $ip = $_server[http_x_forwarded_for];    else if (!empty($_server[remote_addr]))        $ip = $_server[remote_addr];    else        $ip = err;    return $ip;} echo ip: . getclientip() . ;echo referer: . $_server[http_referer];伪造成功,这是不是给“刷票”的朋友提供了很好的换ip的方案!!
原文:http://www.software8.co/wzjs/phpshili/3139.html
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product