• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 160
  • Last Modified:

What does a browser send to the server on a GET/POST?

Hi,

I am trying to write a perl script to interact with a cgi-script on another server. I need to POST a form (of which I know the fields) to a www-server and also combined with GET...

Now I tried the perl LWP::UserAgent library which allows me to POST a message. After filling all the fields in, I get and ID error back from the web-server. What is missing... basically I submit the URL and the parameters, as would the web-server do. The script seems to check where the call came from. If I submit directly from the web-page it's o.k. however, if I save the form to a local drive, change the form a bit to include the URL and then submit, I get an ID error. Anything I can do to fool the receiving script. Note, I am not trying to hack a server, just trying to get some SMS messaging going to my handphone as the provider only supports Web-input.

Thanks for any feedback.
0
walterk
Asked:
walterk
  • 3
  • 2
1 Solution
 
walterkAuthor Commented:
Adjusted points to 40
0
 
walterkAuthor Commented:
Edited text of question
0
 
icdCommented:
I suspect that the script running on the other server is using the HTTP_REFERRER environment variable to check if the form has been submitted from an 'approved' server. Since your script is running on another server which is not 'approved' then it objects to it.

I was about to say that you should try MSIE as your browser which has a bug in this variable but having tested it it seems that the bug is only with javascript and the environment variable is set correctly. Still it might be worth trying if you do not already use MSIE.

Failing that there is nothing you can do other than to pursuade the webmaster of the site to include your host on the list of 'approved' sites.

0
 
walterkAuthor Commented:
Thanks Icd,

Isn't there a way to also submit the HTTP_REFERRER using the LWP library, since the browser also gets this information ?
0
 
icdCommented:
Sorry, I have never used the LWP library.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now