Solved

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

Posted on 1997-05-29
5
145 Views
Last Modified: 2013-12-25
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
Comment
Question by:walterk
  • 3
  • 2
5 Comments
 

Author Comment

by:walterk
ID: 1828122
Adjusted points to 40
0
 

Author Comment

by:walterk
ID: 1828123
Edited text of question
0
 
LVL 5

Accepted Solution

by:
icd earned 40 total points
ID: 1828124
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
 

Author Comment

by:walterk
ID: 1828125
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
 
LVL 5

Expert Comment

by:icd
ID: 1828126
Sorry, I have never used the LWP library.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now