summaryrefslogtreecommitdiff
path: root/includes/ExternalStoreHttp.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/ExternalStoreHttp.php')
-rw-r--r--includes/ExternalStoreHttp.php18
1 files changed, 12 insertions, 6 deletions
diff --git a/includes/ExternalStoreHttp.php b/includes/ExternalStoreHttp.php
index 6eb33b39..092ff7d8 100644
--- a/includes/ExternalStoreHttp.php
+++ b/includes/ExternalStoreHttp.php
@@ -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;
}