Jump to content

PHP curl Form post without redirecting


RabPHP

Recommended Posts

Greetings,

I am attempting to create a form post for a 3rd party training website.  Essentially I want to post the data over, but not have the client redirected to their login after the post is completed.

The post data works and the 3rd party site registeres the entry, but I don't want their confirmation or the page the redirect for normal users to be displayed.  My code is as follows....

[code]
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://someURL");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "mft_userID=$username&mft_Pwd=$password&mft_Fname=$fname&mft_Lname=$lname&mft_userEmail=$email&mft_GrpID=$GroupID");

curl_exec ($ch);
curl_close ($ch);
[/code]

I believe their are CURL options to do this, but I cannot find a good reference on the options.  I want the user to stay on my page after the post.  Any ideas greatly appreciated.
Rab
Link to comment
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.