Jump to content

cURL assistance


chronister

Recommended Posts

I have a question about cURL. I am using it to submit information to the company that handles our eClub (e-mail lists). I am setting up the post fields like this.

 

$PostFields = 'this='.$this.'&that='.$that;

 

One of the fields I have to give to them is where to redirect upon success or failure. For a failure I am trying to have it redirect back to the form with a message and the users ID.

 

It looks like this...

 

OnNext='http://mydomain.com/formPage.php?ID=123455&message=there was an error';

 

When I try this, the & in the url is being split as if it is a field in the $PostFields and it drops off the message part.

 

How can I accomplish this. I tried urlencode() and it did not help.

 

Thanks,

 

Nate

Link to comment
https://forums.phpfreaks.com/topic/125351-curl-assistance/
Share on other sites

Ok, I have a new part of this puzzle to request help on.

 

This cURL request posts data to a script on another server. That server then takes the OnNext & OnFailure vars that I showed previously. When it goes to do a redirect, I end up with a 302 error. It is telling me temporarily moved. I can use a bare-bones form and post to it with the same OnNext & OnFailure values, and it works. So why would a cURL POST end up giving a 302 error??

 

Anyone wanna take a crack at this?

 

Nate

Link to comment
https://forums.phpfreaks.com/topic/125351-curl-assistance/#findComment-648096
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.