Note that there are some explanatory texts on larger screens.

plurals
  1. POGET and POST Methods
    text
    copied!<p>I have one application (checkpoint firewall) </p> <p>That sends formats a URL from variables to form a request using the GET method</p> <pre><code>https://api.example.com/http/sendmsg?api_id=$APIID&amp;user= $USERNAME&amp;password=$PASSWORD&amp;to=$PHONE&amp;text=$MESSAGE </code></pre> <p>how ever the website I want to use is a basic form using the POST method with the following source. </p> <pre><code>&lt;html&gt; &lt;form method="post"&gt; Number:&lt;input type="text" name="number"/&gt;&lt;br/&gt; Message:&lt;textarea cols="40" rows="4" name="message"&gt;&lt;/textarea&gt;&lt;br/&gt; &lt;input type="submit" value="send"/&gt; &lt;/form&gt; &lt;/html&gt; </code></pre> <p>I can change the format of the URL as much as I like with in reason, as you can possible guess this is sending SMS text messages. </p> <p>is there any way to format a URL with the POST method, or create an intermediate webpage that can translate the request? </p> <p>thank you</p> <p>EDIT</p> <p>So this was the kind of thing I had in mind </p> <pre><code>$number = ($_GET["number"]); $message = ($_GET["message"]); //for testing the get method echo variables on screen echo("Number: " . $number . "&lt;br /&gt;"); echo("Message: " . $message . "&lt;br /&gt;"); //use curl to post variables to second website $vars = "number-" . $number . "&amp;message=2 . message; $ch = curl_init( '10.43.23.53' ); curl_setopt( $ch, CURLOPT_POST, 1); curl_setopt( $ch, CURLOPT_POSTFIELDS, $vars); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec( $ch ); print_r(curl_getinfo($ch)); </code></pre> <p>this script is hosted by a web site so application A can use its GET method to supply the variables, and the script will re-post them to application B via post. However it does not work and I don't get any result from the response ? </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload