WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r9309 r8082  
    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
    212if ( !in_array('Snoopy', get_declared_classes() ) ) :
    3 /*************************************************
    4 
    5 Snoopy - the PHP net client
    6 Author: Monte Ohrt <monte@ispi.net>
    7 Copyright (c): 1999-2008 New Digital Group, all rights reserved
    8 Version: 1.2.4
    9 
     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 *
    1020 * This library is free software; you can redistribute it and/or
    1121 * modify it under the terms of the GNU Lesser General Public
     
    2131 * License along with this library; if not, write to the Free Software
    2232 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    23 
    24 You may contact the author of Snoopy by e-mail at:
    25 monte@ohrt.com
    26 
    27 The latest version of Snoopy can be obtained from:
    28 http://snoopy.sourceforge.net/
    29 
    30 *************************************************/
    31 
     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 */
    3246class Snoopy
    3347{
     
    4357    var $proxy_pass     =   "";                 // proxy password to use
    4458
    45     var $agent          =   "Snoopy v1.2.4";    // agent we masquerade as
     59    var $agent          =   "Snoopy v1.2.3";    // agent we masquerade as
    4660    var $referer        =   "";                 // referer info to pass
    4761    var $cookies        =   array();            // array of cookies to pass
     
    7286    var $response_code  =   "";                 // response code returned from server
    7387    var $headers        =   array();            // headers returned from server sent here
    74     var $maxlength      =   500000;             // max return data length (body)
     88    var $maxlength      =   8192;               // max return data length (body)
    7589    var $read_timeout   =   0;                  // timeout on read operations, in seconds
    7690                                                // supported only since PHP 4 Beta 4
     
    10071021        $headerfile = tempnam($temp_dir, "sno");
    10081022
    1009         exec($this->curl_path." -k -D \"$headerfile\"".$cmdline_params." \"".escapeshellcmd($URI)."\"",$results,$return);
     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);
    10101025
    10111026        if($return)
     
    12311246
    12321247                        $fp = fopen($file_name, "r");
    1233                         $file_content = fread($fp, filesize($file_name));
     1248                        while (!feof($fp)) {
     1249                            $file_content .= fread($fp, filesize($file_name));
     1250                        }
    12341251                        fclose($fp);
    12351252                        $base_name = basename($file_name);
     
    12481265}
    12491266endif;
     1267
    12501268?>
Note: See TracChangeset for help on using the changeset viewer.