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" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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?
>
>



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

Reply via email to