Advertisement
| 10.12.2008 at 04:02PM PDT, ID: 23808190 | Points: 500 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: |
<?php
$url="https://elicensing.iowaabd.com/OnDemandReport.aspx";
$referer="https://elicensing.iowaabd.com";
$header[] = "Content-type: text/html";
$cookie="cookie.txt";
$fp=fopen($cookie,w);
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16');
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_REFERER,$referer);
curl_setopt($ch, CURLOPT_TIMEOUT, 900);
curl_setopt($ch, CURLOPT_CONNECTIONTIMEOUT, 30);
curl_setopt($ch, CURLOPT_FAILONERROR, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch,CURLOPT_COOKIEFILE,$cookie);
curl_setopt($ch,CURLOPT_COOKIEJAR,$cookie);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
$content=curl_exec($ch);
$array=explode("\n",$content);
$count=count($array);
for($i=0;$i<$count;$i++){
if(stristr($array[$i],"__VIEWSTATE")){
$array1=explode('value="',$array[$i]);
$content1=$array1[1];
$array2=explode('"',$content1);
$content2=$array2[0];
$_VIEWSTATE=$content2;
}
if(stristr($array[$i],"__EVENTVALIDATION")){
$array1=explode('value="',$array[$i]);
$content1=$array1[1];
$array2=explode('"',$content1);
$content2=$array2[0];
$_EVENTVALIDATION=$content2;
}
}
$url="https://elicensing.iowaabd.com/OnDemandReport.aspx";
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
$content_stage2=curl_exec($ch);
?>
|
Advertisement