RE: [PHP] fsockopen question

From: Date: Thu, 04 Jul 2002 07:01:07 +0000
Subject: RE: [PHP] fsockopen question
Groups: php.general 
Request: Send a blank email to php-general+get-105388@lists.php.net to get a copy of this message
now it's clear thx :D is not the same thing as: while ($i < 100) { $sock = fsockopen($host, 80); fputs($sock, "GET /file".$i".html HTTP/1.0\r\n\r\n"); } isn't?
From: Martin Towell <martin.towell@world.net> To: 'Jose Arce' <metallian_ccp@hotmail.com>, php-general@lists.php.net Subject: RE: [PHP] fsockopen question Date: Thu, 4 Jul 2002 16:49:59 +1000 I mean, you can do <? // been a while, so syntax is prob. wrong :( $sock1 = fsockopen($host, 80); $sock2 = fsockopen($host, 80); fputs($sock1, "GET /file1.html HTTP/1.0\r\n\r\n"); fputs($sock2, "GET /file2.html HTTP/1.0\r\n\r\n"); $content1 = fgets($sock1, 102400); $content2 = fgets($sock1, 102400); $fclose($sock1); $fclose($sock2); ?> each of the fgets()'s will be executed sequentially. But there's two sockets open... -----Original Message----- From: Jose Arce [mailto:metallian_ccp@hotmail.com] Sent: Thursday, July 04, 2002 4:48 PM To: martin.towell@world.net; php-general@lists.php.net Subject: RE: [PHP] fsockopen question So...i can do more than one fsockopen()...but is not multi-thread? i don't understand...i mean...if i can open more than one fsockopen...it is multithread, or in wich cases php open more than one fsockopen? thx :D From: Martin Towell <martin.towell@world.net> To: 'Jose Arce' <metallian_ccp@hotmail.com>, php-general@lists.php.net Subject: RE: [PHP] fsockopen question Date: Thu, 4 Jul 2002 16:39:36 +1000 you can do more than one fsockopen(), but since php isn't multi-threaded - you'll still only be able to download one file at a time. -----Original Message----- From: Jose Arce [mailto:metallian_ccp@hotmail.com] Sent: Thursday, July 04, 2002 4:39 PM To: php-general@lists.php.net Subject: [PHP] fsockopen question Hi, i'm making a script to transfer all the zips from my old server to my new one, i mean, server to server. That's the easy part. The cuestion is: Can i open more than just one instance for fsockopen to retrieve more files in the same script, at the same time? i mean, not one by one (that will be slow), but 4 or 5 at the same time... some people think it's possible, some people don't...thx :D _________________________________________________________________ MSN. Más Útil cada Día. http://www.msn.es/intmap/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _________________________________________________________________ MSN Fotos: la forma más fácil de compartir e imprimir fotos. http://photos.msn.es/support/worldwide.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________ Únase al mayor servicio mundial de correo electrónico: http://www.hotmail.com/es

« previous php.general (#105388) next »