Jump to content

Using snoopy.php library for passworded pages


HaLo2FrEeEk

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.