diff --git a/config.inc.php b/config.inc.php index 4c76771..f74224c 100644 --- a/config.inc.php +++ b/config.inc.php @@ -7,4 +7,6 @@ error_reporting(0); require_once 'AudioVideoHandler.php'; -require_once 'Downloader.php'; \ No newline at end of file +require_once 'Downloader.php'; + +define( 'CURL_PHPSESSID', '' ); \ No newline at end of file diff --git a/karaoke-management.php b/karaoke-management.php index 13c22e6..9bcab67 100644 --- a/karaoke-management.php +++ b/karaoke-management.php @@ -47,7 +47,12 @@ function main() echo "Wrong usage, please use help for help.\n"; break; } - echo "Function not completed yet!\n"; + echo "Setting PHPSessionID..."; + $file = file_get_contents( './config.inc.php' ); + $file = str_ireplace( "define( 'CURL_PHPSESSID', '' );", "define( 'CURL_PHPSESSID', '$id' );", $file ); + file_put_contents( './config.inc.php', $file ); + echo "OK\n"; + echo "Please use 'exit' and restart the script to apply the new session id!\n"; break; case 'exit': echo "Have a nice dayyyy!!\n";