I have a set up which should, in theory, grab a URL from a resources SQL database. It should then set up a PHPcrawl instance and do various actions based on what it finds. The script works fine for the first URL, but then doesn't work for the next one. What have I done wrong?
---Pseudo Code---
$urlArray = array;
$count = count($urlArray);
for ($i=0; $i<$count; $i++) {
$url = $urlArray[$i];
crawlForExternals($url);
}
funtion crawlForExternals($url) {
classMyCrawlerextendsPHPCrawler{functionhandleDocumentInfo($DocInfo){//do stuff with URLs}}$crawler=newMyCrawler();...$crawler->go();
}
What's making that fail?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "Help" comments posted by this user
Mark all as spam, and block user from posting to "Forum"
I have a set up which should, in theory, grab a URL from a resources SQL database. It should then set up a PHPcrawl instance and do various actions based on what it finds. The script works fine for the first URL, but then doesn't work for the next one. What have I done wrong?
---Pseudo Code---
$urlArray = array;
$count = count($urlArray);
for ($i=0; $i<$count; $i++) {
$url = $urlArray[$i];
crawlForExternals($url);
}
funtion crawlForExternals($url) {
}
What's making that fail?
View and moderate all "Help" comments posted by this user
Mark all as spam, and block user from posting to "Forum"
Hi!
So what happens for the second URL? Does your script/the crawler throw an error or exception?
Last edit: Anonymous 2014-01-28