shell_exec Help
New on LowEndTalk? Please read our 'Community Rules' by clicking on it in the right menu!

shell_exec Help

Hi I am have trouble getting the header info of this url. Basically the url contains some illegal characters and curl throws an error

$filesize_cmd='curl --head -g '.escapeshellarg(urldecode($direct_download_link)).' 2>&1';

curl: (3) Illegal characters found in URL

The documentation says...appending a -g parameter should fix it but still getting the error.
Note:I only get this error I pass it through shell_exec($cmd);
if I var dump the command and paste it in terminal it runs fine...

So no idea what is going wrong...:-(

btw...the url is 800 characters long...

Comments

Sign In or Register to comment.