FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » php exec http url
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: php exec http url [message #185183 is a reply to message #185182] Thu, 06 March 2014 21:04 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 3/6/2014 3:42 PM, bishop2001 wrote:
> Greetings,
> I am trying to execute a shell script which is residing on a webserver on a remote machine with no luck. I have tried the following. It looks like it runs but I never see the output from the script on machine2. Any suggestions. Thanks,
>
> from machine 1:
> echo exec('http://machine2/script.sh);
>
> and
>
> from machine1:
> <?php
> $ch = curl_init();
> curl_setopt($ch, CURLOPT_URL, "http://machine2/script.sh");
> curl_setopt($ch, CURLOPT_HEADER, 0);
> curl_exec($ch);
> curl_close($ch);
> ?>
>

What is the result of your curl_exec()? How do you know the shell
script is working? What happens when you try to execute the shell
script from a browser?


--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Experienced Web designer required
Next Topic: When a random file is not found then what?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 23:25:12 GMT 2024

Total time taken to generate the page: 0.04273 seconds