JesterMike Posted December 13, 2007 Share Posted December 13, 2007 Hi Everyone, I'm working on a php script that will allow me to post data from a Flash form to my email list provider (Vertical Response). In order to accomplish this, I figured I would create an array from the form data and then use CUrl to post that array to Vertical Response. So, I created the script below but it is not working: <?php $url = "http://oi.vresp.com"; $fields = array(); $fields['fid'] = "e6ffca61c5"; $fields['email_address'] = $email; $fields['DOB'] = $year; $fields['gender1'] = $gender; $fields['country1'] = $country; $fields['postalcode'] = $zipcode; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $fields); $result = curl_exec ($ch); curl_close ($ch); ?> Can anyone take a look and see if there is something wrong with my formatting? The bottom line is that I am simply looking to have my Flash form push data as follows: http://oi.vresp.com?fid=e6ffca61c5&email_address=$email&DOB=$year&Gender1=$gender&Country1=$country&postalcode=$zipcode Any thoughts? Thanks, Michael Allen Link to comment https://forums.phpfreaks.com/topic/81542-problem-with-curl/ Share on other sites More sharing options...
phpSensei Posted December 13, 2007 Share Posted December 13, 2007 change $url = "http://oi.vresp.com"; to $url = "http://www.oi.vresp.com"; It makes a difference. Link to comment https://forums.phpfreaks.com/topic/81542-problem-with-curl/#findComment-414051 Share on other sites More sharing options...
Nexus Rex Posted April 23, 2009 Share Posted April 23, 2009 JesterMike, Did you ever figure out what the problem was? I am using similar code and can't get the cURL POST to add members to my Vertical Response lists. -- Travis Cable Link to comment https://forums.phpfreaks.com/topic/81542-problem-with-curl/#findComment-817595 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.