in reply to Send a String to another URL

1. In HTTP, the headers and content are separated by an empty line. The "Location:" bit is supposed to go in the header, but because you have a "\n\n" printed out before it, it ends up in the content, and doesn't have the desired effect. I think you already figured this part out.

2. To show something on the browser AND send data to another URL is not something usually done with a redirect. For a server-side solution using Perl, look into http://search.cpan.org/perldoc?LWP instead (lots of documentation and examples if you look around).

3. Another option is AJAX, which is done through Javascript (not Perl). Some find this simpler, but it does rely on client-side technology, which has its drawbacks.

Replies are listed 'Best First'.
Re^2: Send a String to another URL
by virtualweb (Sexton) on May 12, 2011 at 08:26 UTC

    Thank you for you prompt response .

    My script is processing a purchase order from a shopping cart. I want to give the seller a sales notification via SMS, so I signed up with one of those Bulk API services.

    They gave me a URL where to send the parameters for a text message as follows:

    http://SERVERIP/httppush/http.aspx?text=TEXTMESSAGE&source=SOURCENUMBER&desti nation=DESTINATIONNUMBER&username=USERNAME&password=PASSWORD&datacodi ng=1

    I need to replace all the Capitalized words with the pertinent information: The sender's number, the recipient's number, etc.

    If I cannot place the "Location" bit below the extra line caused by "\n\n" , is there a system call that can be used in this case..?? someone suggested: system("wget") but I dont have the complete construct of this line.