代码
<?php
myurl('http://192.168.1.1:8080/userRpm/StatusRpm.htm?Disconnect='.urlencode('断 线').'&wan=1');
echo "ok";
function myurl($url){
$curl=curl_init();
curl_setopt($curl,CURLOPT_URL, $url);
$header[] = "Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
$header[] = "Accept-Encoding:gzip,deflate,sdch";
$header[] = "Accept-Language:zh-CN,zh;q=0.8";
$header[] = "Authorization:Basic ".base64_encode('admin:admin');
$header[] = "Connection:keep-alive";
$header[] = "Host:192.168.1.1:8080";
$header[] = "Referer:http://192.168.1.1:8080/userRpm/StatusRpm.htm";
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
$request = curl_exec($curl);
curl_close($curl);
return $request;
}