mp: ass param to force mpsessid

lm: handle curl commands
This commit is contained in:
quenousimporte 2024-05-28 16:13:52 +02:00
parent 16885de8ad
commit b9a6b7f956
2 changed files with 35 additions and 11 deletions

View File

@ -11,6 +11,13 @@
$url = $_POST['url'];
// extract url from curl command
if (str_starts_with($url, 'curl '))
{
$url = explode("'", $url)[1];
echo '<p>extracted url from curl command:</p><p>' . $url . '</p>';
}
$epub = new TPEpubCreator();
$epub->temp_folder = 'temp/';
$epub->epub_file = $_POST['epub'];

View File

@ -1,6 +1,16 @@
<html>
<body>
<?php
$sessionid = 'value of cookie MPSESSID';
if (isset($_POST['mpsessid']) && $_POST['mpsessid'])
{
$sessionid = $_POST['mpsessid'];
echo 'Using ' . $sessionid . '<br>';
}
/*ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);*/
@ -96,3 +106,10 @@ if ( ! $epub->error )
echo $epub->error;
}
?>
<form method="post">
Force MPSESSID: <input name="mpsessid">
<input type="submit">
</form>
</body>
</html>