zackcez Posted June 5, 2009 Share Posted June 5, 2009 <?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... Quote Link to comment https://forums.phpfreaks.com/topic/161010-solved-curl-login/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.