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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
View and moderate all "Help" comments posted by this user
Mark all as spam, and block user from posting to "Forum"
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.