header function

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
wizzard81
Forum Commoner
Posts: 66
Joined: Wed Jan 15, 2003 6:05 am
Location: Belgium
Contact:

header function

Post by wizzard81 »

Hi,

I want to login on 2 different sites at the same time but if i login at site one i want a function to login in the background on the second site is this possible with some function in php? Or is there a solution?

Best Regards
Kris
User avatar
skehoe
Forum Commoner
Posts: 59
Joined: Sun Dec 22, 2002 5:57 am
Location: Denver

Post by skehoe »

Hi,

If you're running PHP as a CLI (not web), you can check these functions out: http://www.php.net/manual/en/ref.pcntl.php and possibly create child processes to do the logins simultaneously. I've never tried doing this with PHP though, so I'm not sure if it would work.

Aside from that, I'm not sure of any way to get PHP to do 2 things at the same time. Maybe creating several frames and having each frame load a different script or creating a page that loads a couple zero pixel images that have the src pointed to seperate login scripts? I'm just pulling those out... Not sure if they would work.

~Scott
wizzard81
Forum Commoner
Posts: 66
Joined: Wed Jan 15, 2003 6:05 am
Location: Belgium
Contact:

Post by wizzard81 »

hmmz i think it's not possible then :(
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

there is a way to simulate multitasking using tick functions: http://www.php.net/manual/en/control-st ... eclare.php

they are a bit confusing but used correctly they can produce very powerful results.
User avatar
skehoe
Forum Commoner
Posts: 59
Joined: Sun Dec 22, 2002 5:57 am
Location: Denver

Post by skehoe »

Very cool. I never knew about that func... Now I have to find some random reason to use it. :D
wizzard81
Forum Commoner
Posts: 66
Joined: Wed Jan 15, 2003 6:05 am
Location: Belgium
Contact:

Post by wizzard81 »

Thanks, i will check it out.
Post Reply