Solved

HTTP Post

Posted on 2000-02-15
3
147 Views
Last Modified: 2010-04-09
I want to use an HTTP post command to send an xml document to a cetain address, anyone have a clue how to do it?
0
Comment
Question by:rrivers
3 Comments
 
LVL 28

Expert Comment

by:sybe
ID: 2524849
You need to use some server side scripting (asp, perl) to do that. Post the form to that script, and handle it from there, that is, if you need to send the document as an attachment or with a certain mime-type.

With plain HTML you can only send plain text messages without attachment.




0
 

Author Comment

by:rrivers
ID: 2527505
Yes, I'm sorry I didn't make it clear that I understood that. But what I am asking is using a PERL script, how do I post to another server? I guess this is more a PERL question.
0
 

Accepted Solution

by:
tom_beale earned 100 total points
ID: 2549647
One way to do it is to have the PERL script generate a page with the necessary form and a field with the text as its value. At the end of the  script add the following line:

print "<SCRIPT Language='JavaScript'>document.forms[0].submit()</SCRIPT>";

This will trigger the submit on the
form and POST to the other server.


Another way to do it is to add the LWP module to PERL. The LWP module adds some objects to PERL that allow it to do GET/POST operations (directly from DOS or a terminal, yet) and capture the results in a variable.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

706 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

17 Experts available now in Live!

Get 1:1 Help Now