Solved

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

Posted on 1997-05-29
5
153 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Get Actionable Data from Your Monitoring Solution

Your communication platform is only as good as the relevance of the information you send. Ensure your alerts get to the right people every time with actionable responses. Create escalation rules that ensure everyone follows the process and nothing is left to chance.

Question has a verified solution.

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

In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

691 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