I've been using cURL to post form data to a form on another server. It works fine on one page, but on another, I receive errors (not from my server, from theirs).
Here's my code:
$url="http://someurl/form.jsp";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS,"m=110&t=0&ea=BBB");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$store = curl_exec ($ch);
$content = curl_exec ($ch); # This returns HTML
curl_close ($ch);
I should mention that this snippet is identical on PageA and PageB, but PageB is in a popup window by itself. Could this be the problem?