WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/wp-includes/class-snoopy.php

    r8082 r9309  
    11<?php
    2 /**
    3  * Snoopy - the PHP net client
    4  * @author Monte Ohrt <monte@ispi.net>
    5  * @copyright 1999-2000 ispi, all rights reserved
    6  * @version 1.01
    7  * @license GNU Lesser GPL
    8  * @link http://snoopy.sourceforge.net/
    9  * @package Snoopy
    10  */
    11 
    122if ( !in_array('Snoopy', get_declared_classes() ) ) :
    13 /**
    14  * Snoopy - the PHP net client
    15  *
    16  * @author Monte Ohrt <monte@ispi.net>
    17  * @copyright (c): 1999-2000 ispi, all rights reserved
    18  * @version 1.01
    19  *
     3/*************************************************
     4
     5Snoopy - the PHP net client
     6Author: Monte Ohrt <monte@ispi.net>
     7Copyright (c): 1999-2008 New Digital Group, all rights reserved
     8Version: 1.2.4
     9
    2010 * This library is free software; you can redistribute it and/or
    2111 * modify it under the terms of the GNU Lesser General Public
     
    3121 * License along with this library; if not, write to the Free Software
    3222 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    33  *
    34  * You may contact the author of Snoopy by e-mail at:
    35  * monte@ispi.net
    36  *
    37  * Or, write to:
    38  * Monte Ohrt
    39  * CTO, ispi
    40  * 237 S. 70th suite 220
    41  * Lincoln, NE 68510
    42  *
    43  * @link http://snoopy.sourceforge.net/ The latest version of Snoopy can be
    44  *      obtained
    45  */
     23
     24You may contact the author of Snoopy by e-mail at:
     25monte@ohrt.com
     26
     27The latest version of Snoopy can be obtained from:
     28http://snoopy.sourceforge.net/
     29
     30*************************************************/
     31
    4632class Snoopy
    4733{
     
    5743    var $proxy_pass     =   "";                 // proxy password to use
    5844
    59     var $agent          =   "Snoopy v1.2.3";    // agent we masquerade as
     45    var $agent          =   "Snoopy v1.2.4";    // agent we masquerade as
    6046    var $referer        =   "";                 // referer info to pass
    6147    var $cookies        =   array();            // array of cookies to pass
     
    8672    var $response_code  =   "";                 // response code returned from server
    8773    var $headers        =   array();            // headers returned from server sent here
    88     var $maxlength      =   8192;               // max return data length (body)
     74    var $maxlength      =   500000;             // max return data length (body)
    8975    var $read_timeout   =   0;                  // timeout on read operations, in seconds
    9076                                                // supported only since PHP 4 Beta 4
     
    10211007        $headerfile = tempnam($temp_dir, "sno");
    10221008
    1023         $safer_URI = strtr( $URI, "\"", " " ); // strip quotes from the URI to avoid shell access
    1024         exec(escapeshellcmd($this->curl_path." -D \"$headerfile\"".$cmdline_params." \"".$safer_URI."\""),$results,$return);
     1009        exec($this->curl_path." -k -D \"$headerfile\"".$cmdline_params." \"".escapeshellcmd($URI)."\"",$results,$return);
    10251010
    10261011        if($return)
     
    12461231
    12471232                        $fp = fopen($file_name, "r");
    1248                         while (!feof($fp)) {
    1249                             $file_content .= fread($fp, filesize($file_name));
    1250                         }
     1233                        $file_content = fread($fp, filesize($file_name));
    12511234                        fclose($fp);
    12521235                        $base_name = basename($file_name);
     
    12651248}
    12661249endif;
    1267 
    12681250?>
Note: See TracChangeset for help on using the changeset viewer.