Jump to content

Recommended Posts

Hey everyone,

 

First of all, thanks for such an awesome community, I have a passion for PHP and I love to see such a large community full of people who are similar to me!

 

Here's my code snippet:

$ch = curl_init();

// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://formtogoto.com/form.asp");

// Do a POST
$data = array('var1' => 'FALSE', 'var2' => '2');

curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

// grab URL, and return output
$output = curl_exec($ch);

// close curl resource, and free up system resources
curl_close($ch);
$output = strtoupper($output);
echo $output;

 

Now, I am trying to be able to manipulate the OUTPUT so that it doesn't look like the webpage that I am POSTing to.. I would like to make everything uppercase, in this case..

 

When I run this script, I see the whole webpage (not in uppercase) and the number "1" at the very bottom (which is not on the original form that im POSTing to)..

 

What the heck am I doin' wrong?

 

Thanks in advance..

 

-Ryan

Link to comment
https://forums.phpfreaks.com/topic/50543-curl-post-help/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.