Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I need to access a website, Fetch the data, and then logout. Please
tell me where I am wrong. I dont think its logging out properly.


include "Snoopy.class.php";
$snoopy = new Snoopy;

//Logging in
$submit_url =
' ';
$submit_vars["Username"] = "Username"; //my username
$submit_vars["Password"] = "Password"; //my password
$submit_vars["Submit"]   = "Go";

//Requesting for info
$submit_url =
' ';
echo $snoopy->results;

//loggin out
$snoopy->fetch(" ");



Re: Snoopy

Quoted text here. Click to load it

What is Snoopy?  It would appear most the functionality you're using is in  
that class.  We need to see that if we're going to help you.

What are you actually trying to achieve by logging in and out of another  

Re: Snoopy

Kimmo Laine wrote:
Quoted text here. Click to load it

Unless next_page.php generates PHP, the script with this include will
only get HTML.

Quoted text here. Click to load it


    if (isset($_GET['foo'])) {
      echo '<?php echo $_GET[\'foo\']; ?>';
    } else {
      echo '<?php echo \'Not available\'; ?>';

File not found: (R)esume, (R)etry, (R)erun, (R)eturn, (R)eboot

Re: Snoopy

// Snoopy will use cURL for fetching
// SSL content if a full system path to
// the cURL binary is supplied here.
// set to false if you do not have
// cURL installed. See
// for details on installing cURL.
// Snoopy does *not* use the cURL
// library functions built into php,
// as these functions are not stable
// as of this Snoopy release.

I'll try and help through a process of illimination.

Are you using this class on your own server where you control everything in  
the environment, or are you using virtual hosting?  This class uses the  
actual cURL library rather than the built in php functions, so wants to know  
the actual location of cURL.

Have you had ANY success using this class?  Using the inbuilt PHP curl  
libraries can achieve a similar result to Snoopy (except Snoopy has methods  
to make it easier to extract information from the result data.)

Re: Snoopy

There is no SSL its just cookies that I have to handle and that gives
me the problem. Cookies are quite difficult to get through. Using the
code I mentioned above and snoopy, I can actually login, fetch the data
and then logout. The problem is when I try to login again sometimes it
works and sometimes it doesnt.

Can CURL handle cookies or do we pass the cookies? Can you give me an
example please.

Site Timeline