Home > php教程 > PHP源码 > body text

php投票小程序

PHP中文网
Release: 2016-05-23 16:40:36
Original
2904 people have browsed it


 '13'
        );

//设置来源地址,如果不设置,论坛服务器有可能有验证不允许回复

curl_setopt($ch,CURLOPT_REFERER,"http://www.example.com/tea/index.php?m=content&c=index&a=lists&catid=10");

//能保存cookie

curl_setopt($ch,CURLOPT_COOKIESESSION,true);

curl_setopt($ch,CURLOPT_USERAGENT,"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)");

curl_setopt($ch, CURLOPT_PROXY, $proxy[$i]);

curl_setopt($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_HEADER, 0);

curl_setopt($ch, CURLOPT_URL,$url);

//为了支持cookie

curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

$result = curl_exec($ch);

if(curl_errno($ch))

{

        echo 'Curl error: ' . curl_error($ch);

}

}

for($i=0;$i<=11;$i++)

{

        echo "begin 第".$i."次投票";

        toupiao($i);

        echo &#39;end&#39;;

        echo "";

}
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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template