Posts: 2
Name: David Joshua Rodman
|
Well -- rather than struggle with Firefox, if you're in PHP already and need to POST to Verisign, I'd suggest using curl. That way you're doing it all within the PHP program, and you're not in any way dependent on browser capabilities or settings. Here's a fairly general function you can use:
/**
* grab a page from the given site, posting the given fields
* if no fields, no POST, just get the page.
*/
function grab_page($site, $fields = '')
{ $cfd = curl_init();
$qstring = '';
if(is_array($fields))
{ $first = true;
$qstring = '';
foreach($fields as $K => $V)
{ if($first)
$first = false;
else
$qstring .= '&';
$qstring .= "$K=$V";
}
}
curl_setopt($cfd, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($cfd, CURLOPT_URL, $site);
curl_setopt($cfd, CURLOPT_RETURNTRANSFER, 1);
if(!empty($qstring))
{ curl_setopt($cfd, CURLOPT_POST, 1);
curl_setopt($cfd, CURLOPT_POSTFIELDS, $qstring);
} |