There are some commands in PHP that we can use for calling external executable files (like ImageMagick command-line utilities). So by passing an ImageMagick command as a parameter to these PHP functions we can do our request online.
The popular PHP functions for executing external programs are exec
and system
.
Note
There are other functions like passthru(), popen(), escapeshellcmd()
, and pcntl_exec()
that can run executable files but they have lower popularity.
The exec
function executes an external program that is specified as a parameter to it. Here is the usage format:
This function does not give any output and simply returns the last line from the result of the command. The output
parameter is an array that will be filled with each line of output from the command. If the array already contains some elements, exec
will append the command output to the end of the array...