sorry if i didn't give enough information
this is what i am working with:
Code: Select all
<tr><td></td><td> <input type=submit value=" Login " style="border : solid 1px silver; color:yellow;"></td></tr>
as you can see the button doesn't have a name.
this is my code so far:
Code: Select all
function makecookie()
{
$curl = curl_init("http://thesite.com/i.cfm");
$user = "myusername";
$password = "mypassword";
$server = "2";
curl_setopt($curl, CURLOPT_COOKIEJAR, "cookie1.txt");
curl_setopt ($ch, CURLOPT_REFERER, "http://uc.gamestotal.com/i.cfm");
$formfields = array('nic' => $user, 'password' => $password, 'server' => $server); // here is where i am stuck. i don't know //how to submit
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $formfields);
curl_exec($curl);
curl_close($curl);
}
By i don't know how to submit i mean how can i submit if i don't know how to refer to the submit button.
for example i got this working signing into another site by doing this:
Code: Select all
$formfields = array('username' => $name, 'password' => $password, 'login' => 'login');
"login" was the name of the button that was being used to submit. i don't know what to use in this situation thogh.