Automatically fill out forms using MySQL, PHP

I want to login to a page and then automatically submit a form. The form’s data is drawn from a MySQL db. I know PHP Curl a bit but I believe it can’t handle javascript or ajax-based forms well. I briefly read about Java’s HTMLUnit and it seems like this can handle ajax created forms [...]

cURL PHP-Login to Yahoo Problem

I’m trying to login to Yahoo using cURL PHP. I can successfully login through the first set of curl_init():

$agent_name = “Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; Tablet PC 2.0; .NET CLR 1.1.4322)”;
//$agent_name = “Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10″;

$c=curl_init();
curl_setopt($c, [...]