ExternalStoreHttp.php 421 B

1234567891011121314151617181920
  1. <?php
  2. /**
  3. * Example class for HTTP accessable external objects
  4. *
  5. * @ingroup ExternalStorage
  6. */
  7. class ExternalStoreHttp {
  8. /* Fetch data from given URL */
  9. function fetchFromURL($url) {
  10. ini_set( "allow_url_fopen", true );
  11. $ret = file_get_contents( $url );
  12. ini_set( "allow_url_fopen", false );
  13. return $ret;
  14. }
  15. /* XXX: may require other methods, for store, delete,
  16. * whatever, for initial ext storage
  17. */
  18. }