HaLo2FrEeEk Posted March 19, 2007 Share Posted March 19, 2007 For those of you that don't know, snoopy is a library that uses CURL to retrieve the source HTML for a webpage, the syntax is quite simple: <?php include('snoopy.php'); $snoopy = new Snoopy; if($snoopy->fetch("URL")) $text = ($snoopy->results); ?> Thats about it, what I need to do, however, is get information from a page that requires that you log in with a .net passport before being able to view it, the page is: http://www.bungie.net/Stats/ClanMembers.aspx?clan=infectionist When you go to that page without logging in with a .net passport, you get a warning saying that you must be logged in, I have a passport that I COULD use, but I don't know how to use php to sogn in first, then use snoopy to get the code, then log out (I don't want anyone using the open session to fiddle, no fiddling!) That page, when logged in, has code with values that I need and could get using regular expressions and preg_match_all, is this possible to do? Thanks phpfreaks community. Link to comment https://forums.phpfreaks.com/topic/43308-using-snoopyphp-library-for-passworded-pages/ Share on other sites More sharing options...
HaLo2FrEeEk Posted March 19, 2007 Author Share Posted March 19, 2007 Freaking bump. Link to comment https://forums.phpfreaks.com/topic/43308-using-snoopyphp-library-for-passworded-pages/#findComment-210341 Share on other sites More sharing options...
HaLo2FrEeEk Posted March 19, 2007 Author Share Posted March 19, 2007 bump. > > Link to comment https://forums.phpfreaks.com/topic/43308-using-snoopyphp-library-for-passworded-pages/#findComment-210817 Share on other sites More sharing options...
bwochinski Posted March 19, 2007 Share Posted March 19, 2007 I found an example using cURL by googling: <?php $URL="www.mysite.com/test.php"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"https://$URL"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "Data1=blah&Data2=blah");curl_exec ($ch); curl_close ($ch); ?> Link to comment https://forums.phpfreaks.com/topic/43308-using-snoopyphp-library-for-passworded-pages/#findComment-210821 Share on other sites More sharing options...
HaLo2FrEeEk Posted March 20, 2007 Author Share Posted March 20, 2007 I am using snoopy, not curl, I know, it uses curl, but its different. http://claninfectionist.com/misc/snoopy.phps I think that will show you the source code for the snoopy library. Link to comment https://forums.phpfreaks.com/topic/43308-using-snoopyphp-library-for-passworded-pages/#findComment-210876 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.