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 Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.