高考成绩查询接口(转)
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                高考成绩查询接口(转)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                
                            
                            
                            來自: http://www.oschina.net/code/snippet_205431_11454
header('Content-type:text/html;charset=utf-8'); //抓取河南省高考成績 require './simple_html_dom.php'; //require './Snoopy.class.php';$ch = curl_init(); $url = 'http://www.heao.gov.cn/PZQuery/PZCJQuery.aspx';//數據 $arr = array('KSH'=>'12345678901234','BMXH'=>'123456789012','SFZH'=>'420107199007071510', ); $headers = array('User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36','Referer:http://www.haedu.gov.cn/hadoe_plus/gk_cx/query_iframe.aspx', );/* $snoopy = new Snoopy ; $snoopy->agent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36"; $snoopy->referer = "http://www.haedu.gov.cn/hadoe_plus/gk_cx/query_iframe.aspx" ; $action = "http://www.heao.gov.cn/PZQuery/PZCJQuery.aspx"; $snoopy->submit($action,$arr); $dom = str_get_html( $snoopy->results ) ; echo $dom; */curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_HTTPHEADER,$headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($arr)); $data = curl_exec($ch); curl_close($ch);$dom = str_get_html( $data ); $a = $dom->find( 'div.result span#ErrorMSG' ); if(count( $a ) == 1){echo $a[0]->text(); }
                        
                        
                        header('Content-type:text/html;charset=utf-8'); //抓取河南省高考成績 require './simple_html_dom.php'; //require './Snoopy.class.php';$ch = curl_init(); $url = 'http://www.heao.gov.cn/PZQuery/PZCJQuery.aspx';//數據 $arr = array('KSH'=>'12345678901234','BMXH'=>'123456789012','SFZH'=>'420107199007071510', ); $headers = array('User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36','Referer:http://www.haedu.gov.cn/hadoe_plus/gk_cx/query_iframe.aspx', );/* $snoopy = new Snoopy ; $snoopy->agent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36"; $snoopy->referer = "http://www.haedu.gov.cn/hadoe_plus/gk_cx/query_iframe.aspx" ; $action = "http://www.heao.gov.cn/PZQuery/PZCJQuery.aspx"; $snoopy->submit($action,$arr); $dom = str_get_html( $snoopy->results ) ; echo $dom; */curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_HTTPHEADER,$headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($arr)); $data = curl_exec($ch); curl_close($ch);$dom = str_get_html( $data ); $a = $dom->find( 'div.result span#ErrorMSG' ); if(count( $a ) == 1){echo $a[0]->text(); }
?
轉載于:https://www.cnblogs.com/loveyouyou616/p/3544546.html
總結
以上是生活随笔為你收集整理的高考成绩查询接口(转)的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: cocos2dx进阶学习之CCTMXLa
- 下一篇: 求1-100之间的奇数和、偶数和
