Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- $isx =1;
- for ($i=0; $i <$isx; $i++) {
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL,"10.222.34.115/userRpm/popupSiteSurveyExRpm.htm?region=40");
- curl_setopt($ch, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
- curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
- curl_setopt($ch, CURLOPT_REFERER, "http://10.222.34.115/userRpm/WzdWlanExPreRpm.htm");
- curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
- curl_setopt($ch, CURLOPT_USERPWD, "admin:admin");
- $status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); //get status code
- $result=curl_exec ($ch);
- curl_close ($ch);
- $re = "/Array((.*?));/s";
- preg_match_all($re, $result, $matches);
- $res = "/\"(.*?)\",(.*?),(.*?),0,0,0,/";
- preg_match_all($res, $matches[2][1], $matchess);
- foreach ($matchess[2] as $key => $value) {
- $ex = explode(",", $matchess[3][$key]);
- if(count($ex) == 2){
- if(strtolower(str_replace('"', "", $value)) != ""){
- $db = explode(",", $matchess[3][$key]);
- echo "-> ".strtolower(str_replace('"', "", $value))." ( ".$db[0]." Db )\r\n";
- }
- }
- }
- $isx++;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement