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? Link to comment https://forums.phpfreaks.com/topic/150274-solved-can-you-enter-username-and-password-from-a-php-script/ 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. ?> Link to comment https://forums.phpfreaks.com/topic/150274-solved-can-you-enter-username-and-password-from-a-php-script/#findComment-789166 Share on other sites More sharing options...
Mchl Posted March 20, 2009 Share Posted March 20, 2009 Use curl extension Link to comment https://forums.phpfreaks.com/topic/150274-solved-can-you-enter-username-and-password-from-a-php-script/#findComment-789205 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 Link to comment https://forums.phpfreaks.com/topic/150274-solved-can-you-enter-username-and-password-from-a-php-script/#findComment-790550 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.