2011-12-29 7 views
0

phpqueryで別のWebページからデータを取得するためのインタフェースを構築します。キャプチャ画像があり、キャプチャ画像を取得できません。Webページからのリダイレクトイメージ

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コンテンツを取得しようとしていますか?もしそうなら、file_get_contents()を試してみてください。

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

それからは、変数に関数の出力を保存し、必要な要素を取得するためにHTMLを解析することができます。

ドキュメント:http://php.net/manual/en/function.file-get-contents.php

+0

私が使用してfile_get_contentに努めています()。キャプチャ画像は取り込めません。 – user1120482

+0

@ user1120482何が起こってそれを手に入れられないのですか? –

+0

私はページからコンテンツ(キャプチャのイメージ)を取得する必要があります。 – user1120482

関連する問題