New PHPSessionID function prepared

Took 11 minutes
This commit is contained in:
Tobias Hopp 2020-07-07 19:24:48 +02:00
parent 425f72c9cd
commit e044cc3c2a
2 changed files with 9 additions and 2 deletions

View File

@ -8,3 +8,5 @@ error_reporting(0);
require_once 'AudioVideoHandler.php';
require_once 'Downloader.php';
define( 'CURL_PHPSESSID', '' );

View File

@ -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";