Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

Auto login and read url content - PHP Code Bank


Auto login and read url content
Sample code in PHP to login to a site like www.hellboundhackers.org and get contents of pages and echo them.
                <?php
	//
	// NeoInDark
	//

	$ch = curl_init();

	curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1" );
	curl_setopt ($ch, CURLOPT_URL, 'http://www.hellboundhackers.org/index.php');
	curl_setopt ($ch, CURLOPT_POST, 1);
	curl_setopt ($ch, CURLOPT_POSTFIELDS, 'user_name=USERNAME&user_pass=PASSWORD&login=Login');
	curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
	curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
	$content = curl_exec ($ch);



	curl_setopt($ch, CURLOPT_URL, 'http://www.hellboundhackers.org/index.php');
	$content = curl_exec ($ch);
	echo $content;



	curl_close ($ch);

?>

            
Comments
Sorry but there are no comments to display