Forum Moderators: coopster

Message Too Old, No Replies

Running a loop while pinging different urls.

         

ajs83

9:40 pm on Aug 15, 2005 (gmt 0)

10+ Year Member



After I finish uploading data to a database I want to be able to load a page that runs a query that pulls the data from the database (I know what to do here) which then needs to ping one of 4 urls depending on the number pulled and keep looping until its does so for each item that was uploaded.

I know how to pull and sort the data, but am not sure how I would have it ping the different urls without redirecting itself and thus killing the loop. What would I have to do in this situation?

ajs83

12:37 am on Aug 16, 2005 (gmt 0)

10+ Year Member



Is this not possible or should I just try to carry out the actions of the intended pinged script in the query file?

jatar_k

12:45 am on Aug 16, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I am not really getting what you are trying to do actually.

you could 'ping' a url using curl, do you really want to ping or do you want to execute something or do you want to see if it is alive?

ajs83

12:58 am on Aug 16, 2005 (gmt 0)

10+ Year Member



There are submissions with ID's in a table and each id correlates to a user account. What I want to do is after all the submissions are added, call up a php file and have that file append the id to a url and visit each url which will contain a query to associate the user account with the submission.

I know if I have it redirect using the example below,


if(number == X){
(Location: [exanple.com...]
}elseif(number == XX){
echo "this";
}

it will kill the loop because it's changing pages so what I'm asking is how would I do it where it runs through the whole loop, yet visits each page to link the submissions with the users accounts?

jatar_k

1:01 am on Aug 16, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I still don't completely get it but if I am close then you could use curl or fsockopen to do this