Jump to content

LOGIN to form


kish89

Recommended Posts

You would have to change the Content-Length for the length of your login info, but I think this would work.

 

$fp = fsockopen("www.aukcije.hr", 80, $errno, $errstr, 30);
if (!$fp)
	echo "$errstr ($errno)<br />\n";
else
{
	$out = "POST /user_login.php HTTP/1.1\r\n";
	$out .= "Host: www.aukcije.hr\r\n";
	$out .= "Content-Type: application/x-www-form-urlencoded\r\n";
	$out .= "Content-Length: 35\r\n";
	$out .= "username=youruname\r\n";
	$out .= "password=yourpass\r\n";

	fwrite($fp, $out);
	$fbuff = "";
	while (!feof($fp))
		$fbuff .= fgets($fp, 128);
	fclose($fp);

Link to comment
https://forums.phpfreaks.com/topic/123835-login-to-form/#findComment-639382
Share on other sites

  • 1 month later...

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.