Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with OpenID
Advertise on LowEndTalk.com

In this Discussion

shell_exec Help

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...

Tagged:

Comments

Sign In or Register to comment.