NETWEBGET problems

Previous topic - Next topic

Moru

I'm having troubles with the manual that says this should work:
NETWEBGET("www.server.com", "x/y/z.html", 80, local$)
However if you do the below examples you will notice only one of them actually works:

Code (glbasic) Select
ok = NETWEBGET("www.glbasic.com", "main.php", 80, "main.php")    // Not ok, gives the result below
ok = NETWEBGET("www.glbasic.com", "/main.php", 80, "main2.php")  // This works ok


QuoteBad Request
Your browser sent a request that this server could not understand.

Notice that one line has "/main.php" and works but the one that is missing the beginning slash isn't working.

Moru

#1
Also, how long can an URL be? I am using 1536 bytes now without errors but will I run into troubles later on or with other platforms?

Kitty Hello

Yes, it seems you need the "/" at the URL.