Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Slurp an HTTPS site

Help
tkdunn
2005-02-12
2013-05-30
  • tkdunn
    tkdunn
    2005-02-12

    I need a script to slurp an HTTPS site.  If anyone has done this (or is interested in writing it for me - $$) I'd definitely be interested.  I think this would be fairly simple for someone who knows what there doing - I don't . My host has Curl installed along with PHP 4.3.

    Any help would be appreciated...

     
    • herrberge
      herrberge
      2005-02-24

      You can do it with cURL:

      $c = curl_init('https://secure.example.com/accountbalance.php');
      curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
      $page = curl_exec($c);
      curl_close($c);

      If you prefer snoopy and have problems to make the current version run with https there is an easier version for this:
      http://minutillo.com/steve/Snoopy.class.inc

      You dont need cURL externally. Make sure that cURL and openssl is enabled in your php-version.