Page 1 of 1

Working behind the scenes

Posted: Fri Jul 31, 2009 2:38 am
by gotornot
I wonder if anyone can help.
im looking to send data to another page yet not break a while loop.

The other page needs to take the data and submit it to another script on an external site.

All this needs to be done whilst the loop is still continuing.

any ideas on commands? or how to do this?

Ive done this but it breaks the loop i need to call a script in a different page so i can continue the while loop any ideas?

Code: Select all

 
$lookq = "SELECT * FROM adr2";
$lookr = mysql_query($lookq);
while ($lookrow = mysql_fetch_array($lookr))
        {
        $email = $lookrow["email"];
        header("Location: http://mysite.co.uk/user-sub.php?referr ... ail=$email");
        }
 

Re: Working behind the scenes

Posted: Fri Jul 31, 2009 2:41 am
by Weirdan
Depending on the situation something like this might work:

Code: Select all

 
 
$lookq = "SELECT * FROM adr2";
$lookr = mysql_query($lookq);
while ($lookrow = mysql_fetch_array($lookr))
        {
        $email = $lookrow["email"];
        file_get_contents("http://mysite.co.uk/user-sub.php?referrer=9&email=$email");
        }
 

Re: Working behind the scenes

Posted: Thu Aug 06, 2009 5:29 am
by gotornot
I will take a look into that thanks is there any other commands that may do the trick?

I was thinking the page it calls executes a program and then outputs a result 1= accept 0= reject could that incorporate that?

Re: Working behind the scenes

Posted: Thu Aug 06, 2009 6:38 am
by Benjamin
If you are able to do it with a GET request that's fine. Otherwise I would use cURL

Re: Working behind the scenes

Posted: Fri Aug 14, 2009 3:01 am
by gotornot
no luck :banghead: :banghead:

I dont know why it wont work i just need to submit data on a seperate script?