I have a php
file in a server, and i want to send a request to run that file via bash script.
If you open the link domain.com/example.php
in a browser, the php
will run. But if you send the request via curl
(from the client computer), sometimes it works, and sometimes it doesn't work (After each request which works, it doesn't work for several seconds):
curl domain.com/example.php
The php
contains a single command: shell_exec("mkdir worked")
. Sometimes the worked
directory is made, sometimes it's not. Tho if you send the request via a browser, every time the worked
directory is made.
How to send a request from a client computer via bash to the server, so the server will run the php
file (which is located in the server)?
Thanks in advance.