php-windows Digest 11 Apr 2002 02:31:46 -0000 Issue 1087

Topics (messages 13001 through 13014):

Re: Uploading large Files on IIS5
        13001 by: Fabian Deutsch
        13003 by: Alexander Barisic
        13004 by: Alexander Barisic
        13008 by: Fabian Deutsch
        13010 by: Christoph Grottolo

Another Newbie Question
        13002 by: Nik Alleyne
        13005 by: Mike Flynn
        13007 by: Shrock, Court
        13009 by: Robin Bolton

Newbie to php
        13006 by: Nik Alleyne

Apache 2.0.35
        13011 by: Chris Dion

PHP and Windows (newbie!!)
        13012 by: Tiago Simões

Re: checking for characters -- preg_match()
        13013 by: Matt Hillebrand

Tired of fighting - function doesn't exist !!
        13014 by: Quique

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Hallo,
in der php.ini gibt es den eintrag "upload_max_filesize = 2M" der vielleicht
zu klein eingestellt?

mfg
fabian deutsch


"Alexander Barisic" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Habe ein Riesenproblem:
> Betreibe einen IIS5 und habe eine HTML-Seite gebaut mit der man
Fileuploads
> per POST auf den Server ausführen kann.
>
> Rufe ich die Seite lokal vom Server selbst aus ab kann ich problemlos auch
> grosse Dateien hochladen. Nutze ich die Seite über unser lokales Netz kann
> ich Dateien bis ca. 120k problemlos hochladen. Bei grösseren Dateien
bricht
> der Upload ab und ich erhalte eine Fehlerseite (Server oder DNS nicht
> gefunden).
>
> Die Uploads dauern unverhältnismässig lange (60k über unser 100MBit Netz
ca.
> 10 bis 15 Sekunden) - allerdings nur beim Upload - der Download ist ok.
>
> Auf dem Server läuft der aktuelle Small Business Server. Zuerst klappten
> Uploads übers Netz bis ca. 60k - dann habe ich den ISA Server
> deinstalliert - nun klappts bis ca. 120k. Immer noch weit entfernt von
> perfekt...
>
> Das Script läuft unter PHP 4 (V4.2, V4.12 liefert aber das selbe
Ergebnis).
> Unter Java und Perl habe ich das gleiche Phänomen. Unter ASP habe ich's
noch
> nicht versucht.
>
> Das lokale Netz ist absolut stabil. Per FTP kann ich vom Client problemlos
> 500 MB Dateien hoch laden - nur halt nicht per HTTP.
>
> Habe auf dem Server alle Beschränkungen komplett aufgehoben (QoS,
> Bandbreiten- und Prozessorlastschranken im IIS, etc...). Habe auch schon
mal
> versucht in der Registry den UploadReadAhead zu erhöhen - kein Erfolg. Der
> inetinfo-Prozess auf dem Server sieht mir mit im Schnitt 8% CPU Last und
> 24MB RAM Nutzung auch ok aus.
>
> Zwischen Server und Client hängen keine sonstigen Komponenten (ausser
einem
> Switch). Das Problem besteht von verschiedenen Clients aus. Die Clients
> laufen unter W2K/IE 6, der Server mit W2K/IIS5 (bzw. Small Business
Server)
> jeweils mit allen aktuellen Fixes und Patches.
>
> Hat jemand eine Idee ? Ich weiss echt nicht weiter...
>
>
> --
> Alexander Barisic
>
> OLMeRO AG
> Industriestrasse 24
> CH-8305 Dietlikon
> Schweiz
>
> Telefon +41 - 1 - 805 44 69
> Telefax +41 - 1 - 805 44 65
> [EMAIL PROTECTED]
>
>


--- End Message ---
--- Begin Message ---
Sorry for posting in german - seems like I was a bit confused. So here you
are in english :


I'm having trouble with an HTML page handling file uploads via POST on an
IIS5.

If I open the page locally on the server it is working just fine. If I call
the page from a workstation in our LAN it works fine for uploading files up
to approximately 120k. All tries to upload files bigger than that result in
the server canceling the connection and returning an error page ("server or
DNS record not found").

The uploads are taking quiet long (about 10 to 15sec. for a 60k file over
the 100MBit LAN). Download speed is fine. FTP is working just fine
(uploading a 500 MB file to the server was no prob). The inetinfo-Process on
the server seems ok (8% CPU usage in average and about 24MB of RAM).

The server is running MS Small Business Server. First fileuploads up to 60k
worked fine - than I uninstalled the ISA-Server (Proxy and firewall) and now
it works for files up to about 120k.

The script is running under PHP4 (V4.2, but I tried 4.12 with the same
effect). Java and Perl are running into the same trouble.

The problem seems to be in the IIS (since it apears with PHP, Java and
Perl). We tried with Workstations running W2K/IE6, W2K/IE5 and NT4. The
server is running W2LK/IIS (packed in the Small Business Server).

Anyone got an idea ?

Alex


--- End Message ---
--- Begin Message ---
All values concerning file uploads in php.ini are set to 2 MB or more. But
the problem appears starting with files that are 120k...

Alex

"Fabian Deutsch" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hallo,
> in der php.ini gibt es den eintrag "upload_max_filesize = 2M" der
vielleicht
> zu klein eingestellt?
>
> mfg
> fabian deutsch
>
>
> "Alexander Barisic" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Habe ein Riesenproblem:
> > Betreibe einen IIS5 und habe eine HTML-Seite gebaut mit der man
> Fileuploads
> > per POST auf den Server ausführen kann.
> >
> > Rufe ich die Seite lokal vom Server selbst aus ab kann ich problemlos
auch
> > grosse Dateien hochladen. Nutze ich die Seite über unser lokales Netz
kann
> > ich Dateien bis ca. 120k problemlos hochladen. Bei grösseren Dateien
> bricht
> > der Upload ab und ich erhalte eine Fehlerseite (Server oder DNS nicht
> > gefunden).
> >
> > Die Uploads dauern unverhältnismässig lange (60k über unser 100MBit Netz
> ca.
> > 10 bis 15 Sekunden) - allerdings nur beim Upload - der Download ist ok.
> >
> > Auf dem Server läuft der aktuelle Small Business Server. Zuerst klappten
> > Uploads übers Netz bis ca. 60k - dann habe ich den ISA Server
> > deinstalliert - nun klappts bis ca. 120k. Immer noch weit entfernt von
> > perfekt...
> >
> > Das Script läuft unter PHP 4 (V4.2, V4.12 liefert aber das selbe
> Ergebnis).
> > Unter Java und Perl habe ich das gleiche Phänomen. Unter ASP habe ich's
> noch
> > nicht versucht.
> >
> > Das lokale Netz ist absolut stabil. Per FTP kann ich vom Client
problemlos
> > 500 MB Dateien hoch laden - nur halt nicht per HTTP.
> >
> > Habe auf dem Server alle Beschränkungen komplett aufgehoben (QoS,
> > Bandbreiten- und Prozessorlastschranken im IIS, etc...). Habe auch schon
> mal
> > versucht in der Registry den UploadReadAhead zu erhöhen - kein Erfolg.
Der
> > inetinfo-Prozess auf dem Server sieht mir mit im Schnitt 8% CPU Last und
> > 24MB RAM Nutzung auch ok aus.
> >
> > Zwischen Server und Client hängen keine sonstigen Komponenten (ausser
> einem
> > Switch). Das Problem besteht von verschiedenen Clients aus. Die Clients
> > laufen unter W2K/IE 6, der Server mit W2K/IIS5 (bzw. Small Business
> Server)
> > jeweils mit allen aktuellen Fixes und Patches.
> >
> > Hat jemand eine Idee ? Ich weiss echt nicht weiter...
> >
> >
> > --
> > Alexander Barisic
> >
> > OLMeRO AG
> > Industriestrasse 24
> > CH-8305 Dietlikon
> > Schweiz
> >
> > Telefon +41 - 1 - 805 44 69
> > Telefax +41 - 1 - 805 44 65
> > [EMAIL PROTECTED]
> >
> >
>
>


--- End Message ---
--- Begin Message ---
Maybe the upload takes longer than 30secs and the iis sends a timeout!?


"Fabian Deutsch" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hallo,
> in der php.ini gibt es den eintrag "upload_max_filesize = 2M" der
vielleicht
> zu klein eingestellt?
>
> mfg
> fabian deutsch
>
>
> "Alexander Barisic" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Habe ein Riesenproblem:
> > Betreibe einen IIS5 und habe eine HTML-Seite gebaut mit der man
> Fileuploads
> > per POST auf den Server ausführen kann.
> >
> > Rufe ich die Seite lokal vom Server selbst aus ab kann ich problemlos
auch
> > grosse Dateien hochladen. Nutze ich die Seite über unser lokales Netz
kann
> > ich Dateien bis ca. 120k problemlos hochladen. Bei grösseren Dateien
> bricht
> > der Upload ab und ich erhalte eine Fehlerseite (Server oder DNS nicht
> > gefunden).
> >
> > Die Uploads dauern unverhältnismässig lange (60k über unser 100MBit Netz
> ca.
> > 10 bis 15 Sekunden) - allerdings nur beim Upload - der Download ist ok.
> >
> > Auf dem Server läuft der aktuelle Small Business Server. Zuerst klappten
> > Uploads übers Netz bis ca. 60k - dann habe ich den ISA Server
> > deinstalliert - nun klappts bis ca. 120k. Immer noch weit entfernt von
> > perfekt...
> >
> > Das Script läuft unter PHP 4 (V4.2, V4.12 liefert aber das selbe
> Ergebnis).
> > Unter Java und Perl habe ich das gleiche Phänomen. Unter ASP habe ich's
> noch
> > nicht versucht.
> >
> > Das lokale Netz ist absolut stabil. Per FTP kann ich vom Client
problemlos
> > 500 MB Dateien hoch laden - nur halt nicht per HTTP.
> >
> > Habe auf dem Server alle Beschränkungen komplett aufgehoben (QoS,
> > Bandbreiten- und Prozessorlastschranken im IIS, etc...). Habe auch schon
> mal
> > versucht in der Registry den UploadReadAhead zu erhöhen - kein Erfolg.
Der
> > inetinfo-Prozess auf dem Server sieht mir mit im Schnitt 8% CPU Last und
> > 24MB RAM Nutzung auch ok aus.
> >
> > Zwischen Server und Client hängen keine sonstigen Komponenten (ausser
> einem
> > Switch). Das Problem besteht von verschiedenen Clients aus. Die Clients
> > laufen unter W2K/IE 6, der Server mit W2K/IIS5 (bzw. Small Business
> Server)
> > jeweils mit allen aktuellen Fixes und Patches.
> >
> > Hat jemand eine Idee ? Ich weiss echt nicht weiter...
> >
> >
> > --
> > Alexander Barisic
> >
> > OLMeRO AG
> > Industriestrasse 24
> > CH-8305 Dietlikon
> > Schweiz
> >
> > Telefon +41 - 1 - 805 44 69
> > Telefax +41 - 1 - 805 44 65
> > [EMAIL PROTECTED]
> >
> >
>
>


--- End Message ---
--- Begin Message ---
We have the same problem with HTTP uploads via POST but also with WebDAV
uploads on IIS 5 with ISA. Did you have a look at
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q260649? Maybe it's
the same thing...

Christoph

"Alexander Barisic" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
| Sorry for posting in german - seems like I was a bit confused. So here you
| are in english :
|
|
| I'm having trouble with an HTML page handling file uploads via POST on an
| IIS5.
|
| If I open the page locally on the server it is working just fine. If I
call
| the page from a workstation in our LAN it works fine for uploading files
up
| to approximately 120k. All tries to upload files bigger than that result
in
| the server canceling the connection and returning an error page ("server
or
| DNS record not found").
|
| The uploads are taking quiet long (about 10 to 15sec. for a 60k file over
| the 100MBit LAN). Download speed is fine. FTP is working just fine
| (uploading a 500 MB file to the server was no prob). The inetinfo-Process
on
| the server seems ok (8% CPU usage in average and about 24MB of RAM).
|
| The server is running MS Small Business Server. First fileuploads up to
60k
| worked fine - than I uninstalled the ISA-Server (Proxy and firewall) and
now
| it works for files up to about 120k.
|
| The script is running under PHP4 (V4.2, but I tried 4.12 with the same
| effect). Java and Perl are running into the same trouble.
|
| The problem seems to be in the IIS (since it apears with PHP, Java and
| Perl). We tried with Workstations running W2K/IE6, W2K/IE5 and NT4. The
| server is running W2LK/IIS (packed in the Small Business Server).
|
| Anyone got an idea ?
|
| Alex
|
|


--- End Message ---
--- Begin Message ---
Good evening everyone,
I am new (very new) to php. I was doing some research on the net and learn
of this packaged and after reading just a couple of pages, i figure i should
learn this instead of ASP. It looks so easy. Anyhow here is my problem.

I am trying to connect to the database (MySQL) however, I can't I am
connecting to the server, but I cannot connect to my sample database.

Here is my script?
<?php
mysql_connect("nik", "", "") or
  die("could not connect to the database");
mysql_select_db("guestbook") or
die ("could not connect to the specified database");
?>
I'm getting the "could not connect to the specified database" message.
P.S. The database exists.

Please Help
Thx
Nik




--- End Message ---
--- Begin Message ---
I recommend using mysql_error() to see what the problem is.  I/e:

mysql_connect('nik', '', '') or
   die('Could not connect: '.mysql_error());
mysql_select_db_('guestbook') or
   die('Could not select: '.mysql_error());

Something like that..

At 12:56 PM 4/10/02 -0300, Nik Alleyne wrote:
>Good evening everyone,
>I am new (very new) to php. I was doing some research on the net and learn
>of this packaged and after reading just a couple of pages, i figure i should
>learn this instead of ASP. It looks so easy. Anyhow here is my problem.
>
>I am trying to connect to the database (MySQL) however, I can't I am
>connecting to the server, but I cannot connect to my sample database.
>
>Here is my script?
><?php
>mysql_connect("nik", "", "") or
>   die("could not connect to the database");
>mysql_select_db("guestbook") or
>die ("could not connect to the specified database");
>?>
>I'm getting the "could not connect to the specified database" message.
>P.S. The database exists.
>
>Please Help
>Thx
>Nik
>
>
>
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


-- Mike Flynn --
mike @ mikeflynn . net
home => work => home => shop => home [adbusters]

--- End Message ---
--- Begin Message ---
Are you sure that the database server is called 'nik'.....if the same system
is both your web server and database server, I would recommend replacing
'nik' with 'localhost'.  I am thinking that your mysql_connect() should be
as follows:

mysql_connect('localhost', 'nik', '');
//connect to localhost as the user, nik, with no password

> -----Original Message-----
> From: Nik Alleyne [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 10, 2002 8:56 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Another Newbie Question
> 
> 
> Good evening everyone,
> I am new (very new) to php. I was doing some research on the 
> net and learn
> of this packaged and after reading just a couple of pages, i 
> figure i should
> learn this instead of ASP. It looks so easy. Anyhow here is 
> my problem.
> 
> I am trying to connect to the database (MySQL) however, I can't I am
> connecting to the server, but I cannot connect to my sample database.
> 
> Here is my script?
> <?php
> mysql_connect("nik", "", "") or
>   die("could not connect to the database");
> mysql_select_db("guestbook") or
> die ("could not connect to the specified database");
> ?>
> I'm getting the "could not connect to the specified database" message.
> P.S. The database exists.
> 
> Please Help
> Thx
> Nik
> 
> 
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
Most likely the user that you're logging in as (ie no username or password
specified) doesn't have permission to open the database in question.

Best way to test it out is *temporarily* put your root username and password
into your mysql_connect function call. If you can access the database it's a
permissions problem.


-----Original Message-----
From: Nik Alleyne [mailto:[EMAIL PROTECTED]]
Sent: April 10, 2002 09:56
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Another Newbie Question


Good evening everyone,
I am new (very new) to php. I was doing some research on the net and learn
of this packaged and after reading just a couple of pages, i figure i should
learn this instead of ASP. It looks so easy. Anyhow here is my problem.

I am trying to connect to the database (MySQL) however, I can't I am
connecting to the server, but I cannot connect to my sample database.

Here is my script?
<?php
mysql_connect("nik", "", "") or
  die("could not connect to the database");
mysql_select_db("guestbook") or
die ("could not connect to the specified database");
?>
I'm getting the "could not connect to the specified database" message.
P.S. The database exists.

Please Help
Thx
Nik





--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
Good evening everyone,
I am new (very new) to php. I was doing some research on the net and learn
of this packaged and after reading just a couple of pages, i figure i should
learn this instead of ASP. It looks so easy. Anyhow here is my problem.

I am trying to connect to the database (MySQL) however, I can't I am
connecting to the server, but I cannot connect to my sample database.

Here is my script?
<?php
mysql_connect("nik", "", "") or
  die("could not connect to the database");
mysql_select_db("guestbook") or
die ("could not connect to the specified database");
?>
I'm getting the "could not connect to the specified database" message.

Please Help
Thx
Nik


--- End Message ---
--- Begin Message ---
Now that there is a binary out for apache 2 for windows...are we going to
get a binary for php for apache 2?  Anyone know?  Or how I can manage to
compile php for apache2?


--- End Message ---
--- Begin Message ---
Hello everybody!

I'm just entering the wonderful world of PHP and i already have a doubt. I
installed the apache server on my Windows ME :-p, to use for local tests. I
have to acess it manually (meaning i have to click the apache startup
everytime i want to do something...). Anyway i proceded to install PHP (on
c:\php\, and everything went ok. I test my first php file ( a simple echo
command) at the http://localhost directory (or c:\program files\apache
group\apache\htdocs). It all went ok. So i started wondering if it detected
a php outside of that path, like in the desktop or some other folder (since
i'm very keen on having my sites in specif  folders). Unfortunately it
didn't, it just showed the php as a txt file. Is there anyway to make the
files readable everywhere?

Thanks in advance,
Tiago Simões






--- End Message ---
--- Begin Message ---
ereg() sucks. It's difficult to read AND write. I wish MySQL supported
PCREs and not just POSIX regular expressions. I just wrote this
preg_match() email validator (haven't really tested it):

   function isValidEmail($email) {
      if(preg_match("/[\w\.\-]+@\w+[\w\.\-]*?\.\w{1,4}/", $email))
         return true;
      return false;
   }

Note that underscores are included with '\w' character type. Ooh, I
forgot to remove that possibility from the last atom. Also, I allowed
one to four characters after the last dot because IP addresses are
valid!! (e.g. "[EMAIL PROTECTED]")

Matt

-----Original Message-----
From: Ross Fleming [mailto:[EMAIL PROTECTED]] 

what's wrong with ereg and care to give perl related code?...


-----Original Message-----
From: Matt Hillebrand [mailto:[EMAIL PROTECTED]]

Don't forget about the new .name, and I thought I might mention that
preg()/PCREs would be the way to go if you're trying to make your code
readable.

Matt

-----Original Message-----
From: Ross Fleming [mailto:[EMAIL PROTECTED]] 

For completeness, I thought I'd give the original poster the credit
(just found it): Marko Mihalec <[EMAIL PROTECTED]>

This was posted to the same group ages ago:

if(ereg(
"^[^@
]+@([a-zA-Z0-9\-]+\.)+([a-zA-Z0-9\-]{2}|net|com|gov|mil|org|edu|int)$"
,$email))
{
  //email address is valid
}
else
{
  // it ain't
}

Or something like that.  I'd personally use a couple of explodes though

Ross


-----Original Message-----
From: Matt Hillebrand [mailto:[EMAIL PROTECTED]]
Sent: 10 April 2002 00:34
To: 'Egil Helland'; 'brother'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] checking for characters


I like Egil's idea of readable code using explode and regular
expressions. Or, you could use this function I wrote:

function isValidEmail($email) {
   if(strlen($email) < 6)
      return false;
   $at = -1;  // index of '@'
   for($i=0; $i<strlen($email); $i++) {
      if($email[$i] == '@')
         $at = $i;
   }
   if($at < 1)
      return false;
   for($i=$at; $i<strlen($email); $i++) {
      if($email[$i] == '.')
         break;
   }
   if($i>$at && $i<strlen($email))
      return true;
   else
      return false;
}


Matt



-----Original Message-----
From: Egil Helland [mailto:[EMAIL PROTECTED]]

Brush up on your patternmatching then, brother. Check the php.net manual

on regexp.

If you want more readable code, try splitting the string (explode) on @
first, then split the segment after @ that you now have on . again.

Cheers,


Egil (in Norway, so I am way past bedtime myself :))

On Wednesday, April 10, 2002, at 01:07 AM, brother wrote:

> I tried my best to find a nifty function to check for letters in a
> string but with no luck, maybe the sleepnesfactor has to do with it? 
> (it's 01:05am
> here in Sweden).
>
> I have a form that posts some text, one field is a emailadressthing, I

> want to check the string that this field produces and see if there is
> a @ and at
> leaste one . after the @.
>
> help me =)
>
> zzzzz
>
> /brother

--- End Message ---
--- Begin Message ---
Sorry 4 long post (necessary)
-----------------------------

Hi.
I decided to post this msg coz i'm almost tired of "fighting" with 
php...
I begun some time ago looking in php anything that would allow me to 
make a
connection to another host. Then i discovered in the PHP's manual ( 
Spanish CHM edition )
some stuff about sockets.
Then when i begun reading i found:

"The socket extension implements a low-level interface to the socket 
communication functions, providing the possibility to act as a socket 
server as well as a client."

Then i realized that my php needed a sockets extension.
Then i downloaded latest php and found in php.ini the following line
;extension=php_sockets.dll
Then, i deleted the ; and activated that line.

The thing is that when i copied the example found in the manual and run 
i got an error !!
I supposed that SOCKET function sould be in php_sockets.dll but it seems 
i'm wrong BECAUSE when
i run the example i got
"Fatal error: Call to undefined function: socket() in c:\inetpub\clcswi
\test.php on line 13"
WELL, WHERE IS THIS FUNCTION !?

So, i'd like to know what can i do to enable this function in my php, 
then
How can i connect to a tcp server (using or not this NON-EXISTING 
function) and send a string...?

Thanks

test.php (the example located in chm manual)

<?php
error_reporting(E_ALL);
echo "<h2>TCP/IP Connection</h2>\n";
/* Get the port for the WWW service. */
$service_port = getservbyname('www', 'tcp');
/* Get the IP address for the target host. */
$address = gethostbyname('www.php.net');
/* Create a TCP/IP socket. */
$socket = socket(AF_INET, SOCK_STREAM, 0);
if ($socket < 0) {
    echo "socket() failed: reason: " . strerror($socket) . "\n";
} else {
    "socket() successful: " . strerror($socket) . "\n";
}
echo "Attempting to connect to '$address' on port '$service_port'...";
$result = connect($socket, $address, $service_port);
if ($result < 0) {
    echo "connect() failed.\nReason: ($result) " . strerror($result) . 
"\n";
} else {
    echo "OK.\n";
}
$in = "HEAD / HTTP/1.0\r\n\r\n";
$out = '';
echo "Sending HTTP HEAD request...";
write($socket, $in, strlen($in));
echo "OK.\n";
echo "Reading response:\n\n";
while (read($socket, $out, 2048)) {
    echo $out;
}
echo "Closing socket...";
close($socket);
echo "OK.\n\n";
?>

----------------------------------
Henry - Argentina
http://www.quiquesistemas.com.ar
[EMAIL PROTECTED]
ICQ: 18048153
--- End Message ---

Reply via email to