Forum Moderators: coopster
$ps[FirstName_prompt] = 'First Name';
$ps[FirstName] = $name;
$ps[LastName_prompt] = 'Last Name';
$ps[LastName] = $name;
$ps[Email_prompt] = 'Email';
$ps["State/Province"] = $state;
$ps["Zip/Postal Code_prompt"] = 'Zip/Postal Code';
$ps["Zip/Postal Code"] = $zip;
$ps[parent_id] = '22222';
$ps3[accept] = '1';
etc... there are a lot......
$ch = curl_init();
$url = "the url here ?aid=".$ps[parent_id];
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($ps, '', '&'));
//curl_setopt($ch, CURLOPT_POSTFIELDS, $ps);
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)');
curl_setopt($ch, CURLOPT_REFERER, 'the domain');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//curl_setopt($ch, CURLOPT_FOLLOWLOCATION ,1);
curl_setopt($ch, CURLOPT_COOKIEFILE, 'tmp/cookie');
curl_setopt($ch, CURLOPT_COOKIEJAR, 'tmp/cookie');
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 300);
$x = curl_exec($ch);
sleep(2);
echo $x; I have successfully completed the sign up process manually and have extracted the data I need out of the static page (using explode) so that is not a problem, it just seems like the post is not initiating.
I seriously appreciate any help you could offer.
Thanks, Mitch
You are never sending your $ps3 variable in your curl execution. I didn't validate your curl code here but I can tell you at a quick glance that you are never posting the $ps3 variable. Modify the http_build_query [php.net] function to include both the $ps variable as well as your $ps3 variable and see if that is your issue.