Menu

How to handle information echoed from the handleDocumentInfo method?

Help
jeffseka
2013-05-06
2013-05-06
  • jeffseka

    jeffseka - 2013-05-06

    If you happen to echo any $Docinfo content with in the handleDocumentInfo method, you can watch the data of your crawl as it does its magic.

    eg

    $info = $Docinfo-url;
    $info .= $Docinfo-host;
    $info .= $Docinfo-referer;

    echo $info;

    Now my problem is how can i have that data place exactly where i want on my site for viewing the crawl data as it works.

    i dont want to echo it within the class but rather on a particular page on my site where users add there url and i want them to watch which pages of the supplied url are being crawled.
    thanks.

     
  • Anonymous

    Anonymous - 2013-05-06

    Hi!

    Since it's recommended to run your script thats using phpcrawl from the commandline (for large sites), the best way would be to use popen() or proc_open() or similar to run your cli-script and read it's output and display it in a div or iframe.

    If you run your script within a webserver-enviroment (straightforward) you may use javascript to put it's output where you want it, like

    echo 'document.getElementById("myDisplayDiv").firstChild.insertData(0, '.$info.');'
    (or something like that)

    I'm sure there are other ways though.

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.