Is there a way to find the path to curl using only PHP code? I'm using the exec() function currently and I need the path to do this correctly. If I were to use only curl functions (and leave out the exec function) would I need to know the path?
Assuming you've got cURL installed , you don't need to know the path, just use the [man]cURL[/man] functions.
Thanks, I'll give the regular curl functions a try. But what about the first part of the question? Is there a way to find the path to curl using only PHP?
assuming your not running BlueScreen OS ...
passthru ('which curl');
or if you want it in an variable:
$path=`which curl`; echo $path;
works with (GNU|BSD|Unix) regards