Home > Backend Development > PHP Tutorial > 怎么在程序里面自动换ip地址呢

怎么在程序里面自动换ip地址呢

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 13:34:55
Original
1083 people have browsed it

如何在程序里面自动换ip地址呢
采集的时候,
请问如何在程序里面自动换ip地址呢?

------解决方案--------------------
更换自己的ip吗,通过curl可以伪造ip来由

PHP code
<?php $ch=curl_init();
curl_setopt($ch,CURLOPT_URL,"http://www.aaa.com/");
curl_setopt($ch,CURLOPT_HTTPHEADER,array('X-FORWARDED-FOR:8.8.8.8','CLIENT-IP:8.8.8.8'));//构造IP
curl_setopt($ch,CURLOPT_REFERER, "http://www.xxxx.com/");//构造来由
curl_setopt($ch,CURLOPT_HEADER, 1);
$out = curl_exec($ch);
curl_close($ch); <div class="clear">
                 
              
              
        
            
Copy after login
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
curl simulated login
From 1970-01-01 08:00:00
0
0
0
Convert cURL command line to PHP cURL code
From 1970-01-01 08:00:00
0
0
0
Convert command line cURL to PHP cURL
From 1970-01-01 08:00:00
0
0
0
How to set boolean value true in php curl
From 1970-01-01 08:00:00
0
0
0
Please tell me, php curl request page shows blank
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template