Changeset 48 for trunk

Show
Ignore:
Timestamp:
19.10.2005 18:49:52 (3 years ago)
Author:
m
Message:

Closes #5. Check for allow_url_fopen.

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/File/Bittorrent/Decode.php

    r47 r48  
    407407    function getStats() 
    408408    { 
     409        // Check if we can access remote data 
     410        if (!ini_get('allow_url_fopen')) { 
     411            PEAR::raiseError('File_Bittorrent_Decode::getStats() - "allow_url_fopen" must be enabled.'); 
     412            return false; 
     413        } 
     414        // Query the scrape page 
    409415        $packed_hash = pack('H*', $this->info_hash); 
    410416        $scrape_url = preg_replace('/\/announce$/', '/scrape', $this->announce) . '?info_hash=' . urlencode($packed_hash); 
  • trunk/scrape.php

    r42 r48  
    3636    require_once 'Console/Getargs.php'; 
    3737 
     38    // Set error handling 
     39    PEAR::setErrorHandling(PEAR_ERROR_PRINT); 
     40 
    3841    // Get filename from command line 
    3942    $args_config = array(