Jump to content

[SOLVED] cUrl login


zackcez

Recommended Posts

<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://weblogin.runescape.com/login.ws');
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, 'username=REMOVED&password=REMOVED');
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$content = curl_exec ($ch);
curl_close ($ch);

if (preg_match("/successful/", $content))
{
	echo("<br /><b>Correct password");
} else {
	echo("FAIL");
}
?>

No idea how to use curl, but when I have the correct data inputed, I want it to say Correct password...It says fail...I'm thinking i'm Doing it wrong...

https://weblogin.runescape.com/login.ws

Is where the username and pass are parsed etc...

 

Link to comment
https://forums.phpfreaks.com/topic/161010-solved-curl-login/
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.