Solved

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

Posted on 1997-05-29
5
146 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
This article will show, step by step, how to integrate R code into a R Sweave document
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

861 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

24 Experts available now in Live!

Get 1:1 Help Now