Re: Opening sockets

From: Date: Sun, 24 Feb 2002 22:33:49 +0000
Subject: Re: Opening sockets
References: 1  Groups: php.general php.gtk.general php.windows 
Request: Send a blank email to php-general+get-86015@lists.php.net to get a copy of this message
Well, after browsing through the HTTP/1.1 standards I found that an optional header "Host" after the GET request could be used. I now write "GET /clientlogin.php?username=me&password=mypassword HTTP/1.0\r\nHost: www.lottery-machine.co.uk\r\n\r\n" to the open socket... and it works fine!!! "Laserjetter" <newsaddress@saracenvsu.org.uk> wrote in message news:20020224132137.59010.qmail@pb1.pair.com... > I'm running GTK on Win32 and have made an app that connects to a server and > downloads some data. > I tested it over my LAN and it works fine, using both 10.0.0.1 and > gethostbyname("amd") as the host in fsockopen(host, 80, 30) > I've now tried running it over the internet, trying to connect to the server > www.lottery-machine.co.uk or gethostbyname(www.lottery-machine.co.uk) but it > won;t connect to the server. The window that displays the downloaded data > contains a webpage which is produced by the web host when there's an error > of some kind. If I type in the GET request > (www.lottery-machine.co.uk/clientlogin.php?username=me&password=password) in > a web browser it works fine as expected. > I'm in touch with them about the problem but does anyone know what is > causing this? Does the host only accept connections from web browsers or > something? > >

« previous php.general (#86015) next »