Welcome to the MusicChart PHP Class! This class is designed to fetch music chart data from various platforms like VIBE, MELON, and BUGS. It's a simple and effective way to integrate music chart information into your PHP projects.
- Supports multiple music platforms: VIBE, MELON, BUGS.
- Easy to use with a straightforward constructor.
- Secure data fetching with SSL support.
- Error handling for different scenarios, including platform support and data parsing issues.
- PHP environment with cURL support.
- SSL certificates for secure connections (optional but recommended).
Simply include the MusicChaert class file in your PHP project. Make sure the PHP environment is set up with cURL support.
-
Initialize the Class:
$musicChart = new MusicChaert('PLATFORM_NAME'); // Replace 'PLATFORM_NAME' with 'VIBE', 'MELON', or 'BUGS'
-
Fetch the Chart:
$result = $musicChart->GET_CHAERT('DATE'); // 'DATE' is optional, format: 'YYYY-MM-DD'
-
Process the Result:
- The result will be an associative array containing status, message, and data.
- Check the
STATUSkey to determine if the request was successful.
$musicChart = new MusicChaert('VIBE');
$result = $musicChart->GET_CHAERT('2023-01-01');
if ($result['STATUS'] === 'OK') {
// Process chart data
print_r($result['DATA']);
} else {
// Handle error
echo "Error: " . $result['MSG'];
}- The date functionality is not currently supported by the API.
- Ensure the platform name is correctly specified in the constructor.
- SSL verification is turned off by default. For production environments, it's recommended to handle SSL verification properly.
This project is open-sourced software licensed under the MIT license.
Embrace the power of music charts in your PHP applications with ease! ๐๐ผ