wtfsmd Posted March 20, 2009 Share Posted March 20, 2009 hey guys i am developing a XML parser for my website, the problem i am having is i need to enter in a username and password to gain access to the pages. Is there a way using php to enter in my login information in a script so it can gain access to these pages to parse? Quote Link to comment Share on other sites More sharing options...
redarrow Posted March 20, 2009 Share Posted March 20, 2009 <?php file_get_contents("http://www.com/page.php"); ?> page.php <?php redarrow redarrow ?> script.php <?php $data=file_get_contents("http://www.com/page.php"); $data=explode(' ',$data); $username=$data[0]; //username for access. $password=$data[1];// password for access. ?> Quote Link to comment Share on other sites More sharing options...
Mchl Posted March 20, 2009 Share Posted March 20, 2009 Use curl extension Quote Link to comment Share on other sites More sharing options...
wtfsmd Posted March 21, 2009 Author Share Posted March 21, 2009 Thanks guys here is a tutorial i found. using curl() http://www.bitrepository.com/web-programming/php/curl-login-to-members-area.html Quote Link to comment 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.