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

WBOY
Release: 2016-06-13 10:18:47
Original
1047 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'));//构造IPcurl_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:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!