Jump to content

[SOLVED] some help plz


adv

Recommended Posts

hello i have a problem

 

lets say i wanna connect to a site with the user and password via curl

 

$url = "www.site.com";

$ch = curl_init();

curl_setopt($ch , CURLOPT_URL, $url);

curl_setopt($ch , CURLOPT_USERAGENT, $browsertype);

curl_setopt($ch , CURLOPT_POST ,1 );

curl_setopt($ch , CURLOPT_POSTFIELDS ,$postfields);

curl_setopt($ch , CURLOPT_FOLLOWLOCATION ,1 );

curl_setopt($ch , CURLOPT_RETURNTRANSFER, 1 );

curl_setopt($ch , CURLOPT_SSL_VERIFYPEER, 0);

curl_setopt($ch , CURLOPT_COOKIEJAR,$cookie);

curl_setopt($ch , CURLOPT_COOKIEFILE ,$cookie);

$result = curl_exec($ch);

curl_close($ch);

echo $result;

?>

 

 

 

and at the postfields  the site has the username and passwod <input name="username"  and same with password

but the submit button doesn`t have any name

it`s empty

how do i connect to that site without submit button

and again does it really necessary to use  in postfields the name for submit button

or is there another way

thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/75159-solved-some-help-plz/
Share on other sites

You'll need to do a little more work to find out what parameters need to be passed. Try using firefox and the live http headers extension:

 

http://livehttpheaders.mozdev.org/

 

Hopefully with that you will be able to see where the form takes you, and any other parameters that are being set, perhaps with javascript.

Link to comment
https://forums.phpfreaks.com/topic/75159-solved-some-help-plz/#findComment-381480
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.