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. Quote Link to comment Share on other sites More sharing options...
HaLo2FrEeEk Posted March 19, 2007 Author Share Posted March 19, 2007 Freaking bump. Quote Link to comment Share on other sites More sharing options...
HaLo2FrEeEk Posted March 19, 2007 Author Share Posted March 19, 2007 bump. > > Quote Link to comment 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); ?> Quote Link to comment 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. 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.