]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/class-snoopy.php
Wordpress 3.6-scripts
[autoinstalls/wordpress.git] / wp-includes / class-snoopy.php
index b1b32d2faa9bbd82e8da6a7c161257de6864f02f..2c59c48112cf01e0c0a8c510af5fd878ec3d86a5 100644 (file)
@@ -1,5 +1,11 @@
 <?php
-if ( !in_array('Snoopy', get_declared_classes() ) ) :
+
+/**
+ * Deprecated. Use WP_HTTP (http.php, class-http.php) instead.
+ */
+_deprecated_file( basename( __FILE__ ), '3.0', WPINC . '/http.php' );
+
+if ( !class_exists( 'Snoopy' ) ) :
 /*************************************************
 
 Snoopy - the PHP net client
@@ -713,13 +719,13 @@ class Snoopy
                                                        chr(176),
                                                        chr(39),
                                                        chr(128),
-                                                       "ä",
-                                                       "ö",
-                                                       "ü",
-                                                       "Ä",
-                                                       "Ö",
-                                                       "Ü",
-                                                       "ß",
+                                                       chr(0xE4), // ANSI &auml;
+                                                       chr(0xF6), // ANSI &ouml;
+                                                       chr(0xFC), // ANSI &uuml;
+                                                       chr(0xC4), // ANSI &Auml;
+                                                       chr(0xD6), // ANSI &Ouml;
+                                                       chr(0xDC), // ANSI &Uuml;
+                                                       chr(0xDF), // ANSI &szlig;
                                                );
 
                $text = preg_replace($search,$replace,$document);
@@ -904,7 +910,7 @@ class Snoopy
                        return false;
                }
 
-               // check if there is a redirect meta tag
+               // check if there is a redirect meta tag
 
                if(preg_match("'<meta[\s]*http-equiv[^>]*?content[\s]*=[\s]*[\"\']?\d+;[\s]*URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match))
 
@@ -1004,7 +1010,7 @@ class Snoopy
                if($this->read_timeout > 0)
                        $cmdline_params .= " -m ".$this->read_timeout;
 
-               $headerfile = tempnam($temp_dir, "sno");
+               $headerfile = tempnam($this->temp_dir, "sno");
 
                exec($this->curl_path." -k -D \"$headerfile\"".$cmdline_params." \"".escapeshellcmd($URI)."\"",$results,$return);
 
@@ -1051,7 +1057,7 @@ class Snoopy
                        $this->headers[] = $result_headers[$currentHeader];
                }
 
-               // check if there is a redirect meta tag
+               // check if there is a redirect meta tag
 
                if(preg_match("'<meta[\s]*http-equiv[^>]*?content[\s]*=[\s]*[\"\']?\d+;[\s]*URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match))
                {