- Timestamp:
- 20.07.2005 22:33:52 (3 years ago)
- Files:
-
- 1 modified
-
trunk/infohash.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/infohash.php
r22 r29 47 47 exec('/usr/bin/btshowmetainfo.py ' . escapeshellarg($torrent), $bt); 48 48 echo "btshowmetainfo: " . substr($bt[3], strpos($bt[3], ':') + 2) . "\n"; 49 50 // Gagge's version from http://pear.php.net/bugs/bug.php?id=3970 51 $filesrc = file_get_contents($torrent); 52 $start = strpos($filesrc, 'd5:files'); 53 $match = substr($filesrc, $start, (strlen($filesrc)-$start-1)); 54 $file_info['info_hash'] = sha1($match); 55 echo "gagge: " . $file_info['info_hash'] . "\n"; 56 49 57 50 ?>