crankshaft
crankshaft

Reputation: 2677

HTTP Get with variables

I have spent 2 days on this and are now stumped, having tried dozens of different methods and lots and lots of googling.

I need to retrieve data generated by a php page running on apache, using the GET command. This works fine when I am connecting with the LAN, but if I connect remotely then I am unable to get any response when there are variables in the path.

This works bot locally and remotely and I get the expected output from the php page.

GET /myfolder/mypage.php<CR><LF>

However, add a variable to the path and I get the correct response on the LAN but connecting remotely I get no response whatsoever:

GET /myfolder/mypage.php?var1=1&var2=2<CR><LF>

Just to reiterate, this works fine when accessing from the LAN and works fine in a web browser, but when I send as effectively a Telnet request I get nothing at all.

Any ideas ??

EDIT

The request is being sent to Linux Apache web server via a serial > tcpip gateway with a carriage return and linefeed at the end. The syntax works perfectly on the LAN with the ?var1= etc but as soon as I add ?var=1 when connecting externally nothing at all is returned, in fact apache logs don't show any record of the connection request.

I ## SUSPECT ## this may be something related to apache mod rewrite ?

Upvotes: 3

Views: 424

Answers (1)

SƲmmēr Aƥ
SƲmmēr Aƥ

Reputation: 2504

May be can try something like below and specify the host and also the ver of HTTP being used.

GET /myfolder/mypage.php?var1=1&var2=2 HTTP/1.1

Host: 127.0.0.1

Upvotes: 1

Related Questions