I'm doing the Forum content collection applet,
It would have been a challenge to Web Capture.
if ($_get[id]<=130000 && $_get[id]) {
$url = "http://bbs.misranim.com/thread-". $_get[id]. " -1-1.html ";
But for the sake of convenience I used a while loop like this
$p = 0;
while ($p <=130000) {
$url = "http://bbs.misranim.com/thread-". $p. " -1-1.html ";
$p + +;
The problem arises, and every time we encounter an empty page that is deleted, he also collects the content into the database.
When using if ($_get[id]<=130000 && $_get[id]), the deleted empty page is skipped directly.
This problem occurs when you use a while or for loop to encounter an empty page that is being deleted
Picture: Encounter empty page directly to copy the previous page content, such as the 13th post has content, but the 14th to 17th post is deleted empty page, it will put 13 of the content of the post added to these inside, the back is similar!
When using if ($_get[id]<=130000 && $_get[id]), the empty page that was deleted is skipped directly.
There are no content behind 13 posts, so skip over to the 22nd post so
That's the effect I want.
With the
if (strlen ($txt) > 5)//content large with 5 characters collected into the database
{
$db->insert ("INSERT into Bbs_caiji (col_date,title,txt,url,type,source) VALUES ('". $col _date. "', '". $title 1. "', '" . $txt. "', '". $url. "', ' BBS ', ' Misranim ')");
}
Why is this problem occurring with the while and for loops?
Reply to discussion (solution)
Typo, the first line is jump not the challenge
There should be no sign of what you're saying.
The substitute is not complete, only look at the provided generation? Of
After each follow-up, $txt clear the empty??。