Jump to content

Ajax help


manilodisan

Recommended Posts

I have a page that is supposed to create a very long report working with pages downloaded from the internet and lots of regexes. At this moment, I'm running each step by elimination (for every page I check, I update a field and change the status to 1), refresh the page and start over with the next 10 pages...and soon I repeat this procedure until there's no page left with the status to 0.

 

The problem is that this procedure is very old and ugly with those refreshes. I would be interested in some ajax solution that would perform similar. Any ideas?!

 

Here's a demo with the actual page (just a demo, not my code):

 

/*
      $get_10_unfinished_pages = //this pulls out maximum 10 pages that have the status 0
      get_Page () = //the actual url
*/


if ( $get_10_unfinished_pages ) {
      foreach ( $get_10_unfinished_pages as $page ) {
           perform_various_regexes ( $page );
           update_page ( $page );//this changes the status to 1 = checked
           header ( "Location : " . get_Page () );
      }
}
else {
      //do something here as well
}

 

Basically, I would love to see some ajax script that would do this:

 

call a page until the response is FALSE and only after that it should move to another task.

 

Thank you.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.