Hi I am trying to write a script to login a web application using PHP CLI script
like
<?php
$post_data = array(
'user_name' => 'abc',
'user_password'=>'XYZ@@11',
);
$url ='http://www.myapplication.com?action=Login&module=Users';
$hat = new HttpRequest($url,HTTP_METH_POST);
$hat->setPostFields($post_data);
$hat->send();
$res = $hat->getResponseData();
print'<pre>'; print_r($res); print '</pre>';
?>
i want post the username and password to this page and trying login the application i dont know is this the right way doing this .... please suggest me , how to go about this....