wkhtmltopdf behind a htaccess/htpasswd wall

49 views
Skip to first unread message

Sylvain Ard

unread,
Oct 26, 2022, 5:47:40 AM10/26/22
to wkhtmltopdf General
Hello I want to convert a webpage behind a htaccess/htpasswd authentification wall. How to do this knowing the login and password please ?
Thank you
Best regards

Sylvain Ard

unread,
Oct 26, 2022, 5:07:14 PM10/26/22
to wkhtmltopdf General
up please

Sylvain Ard

unread,
Oct 31, 2022, 4:58:15 AM10/31/22
to wkhtmltopdf General
I finally succeed by doing :
$sh='export PATH=$PATH:/usr/bin
wkhtmltopdf  --log-level info --custom-header Authorization "Basic '.base64_encode('admin:<mot de passe>').'" --custom-header-propagation  "<url>" <nom_fichier>.pdf';
file_put_contents('fiches_sh/'.$nom_fichier.'.sh',$sh);
chmod('fiches_sh/'.$nom_fichier.'.sh',0777);
exec('fiches_sh/'.$nom_fichier.'.sh 2>&1',$output);
Reply all
Reply to author
Forward
0 new messages