2011-12-29 3 views
0

phpquery로 다른 웹 페이지에서 데이터를 가져올 인터페이스를 빌드 할 예정입니다. 그러나 captcha 심상이 있고 나는 captcha 심상을 가져올 수 없다.웹 페이지에서 이미지 리디렉션

Found: div.podContent, comparing with matchClasses() 

    Found: div.LBD_CaptchaDiv, comparing with matchClasses() 

    Found: div.LBD_CaptchaImage, comparing with matchClasses() 

    Found: div.LBD_CaptchaIcons, comparing with matchClasses() 

    Found: div#whoisverify_ctl00_cphcontent_ctlcaptcha_SoundPlaceholder.LBD_placeholder, comparing with matchClasses() 

    Found: input#ctl00_cphContent_btnVerifyCode.btnVerifyCode.WhoisMainSprite[name="ctl00$cphContent$btnVerifyCode"], comparing with matchClasses() 

는 어떻게 얻을 수 있습니다 :

내가 여기

phpquery

의 출력을 인쇄 할 수 없습니다 이미지

phpQuery::$debug = true; 
    $result = phpQuery::newDocumentFile($url); 
    echo $result; 
    foreach(pq('.whoContentTable') as $tag) { 
    foreach(pq($tag)->find('div.LBD_CaptchaImage') as $td) { 
     print $td; 

코드의 출력을 리디렉션 코드입니다 출력 내용이 페이지를 형성합니까?

답변

0

대상 웹 사이트의 HTML 콘텐츠를 가져 오시겠습니까? 당신이 변수에 함수의 출력을 저장할 수에서

echo file_get_contents("http://urlOfWebsite.com"); 

을 원하는 요소를 얻기 위해 HTML을 구문 분석 : 그렇다면, file_get_contents()을 시도합니다.

문서 : http://php.net/manual/en/function.file-get-contents.php

+0

내가 사용 file_get_content에 노력하고있다(). captcha 이미지를 가져올 수 없습니다. – user1120482

+0

@ user1120482 어떻게 되나요? –

+0

페이지에서 콘텐츠 (captcha 이미지)를 얻어야합니다. – user1120482

관련 문제