]> scripts.mit.edu Git - autoinstalls/mediawiki.git/blobdiff - includes/ExternalStoreHttp.php
MediaWiki 1.16.0
[autoinstalls/mediawiki.git] / includes / ExternalStoreHttp.php
index 6eb33b393990ca978d17dfb9a60f44f81599cee6..092ff7d800efcdcde5388087ee33710649f4ea58 100644 (file)
@@ -1,15 +1,21 @@
 <?php
+
 /**
- * Example class for HTTP accessable external objects
+ * Example class for HTTP accessable external objects.
+ * Only supports reading, not storing.
  *
  * @ingroup ExternalStorage
  */
 class ExternalStoreHttp {
-       /* Fetch data from given URL */
-       function fetchFromURL($url) {
-               ini_set( "allow_url_fopen", true );
-               $ret = file_get_contents( $url );
-               ini_set( "allow_url_fopen", false );
+
+       /**
+        * Fetch data from given URL
+        *
+        * @param $url String: the URL
+        * @return String: the content at $url
+        */
+       function fetchFromURL( $url ) {
+               $ret = Http::get( $url );
                return $ret;
        }