Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #13077

Re: php exec http url

From Jerry Stuckle <jstucklex@attglobal.net>
Newsgroups comp.lang.php
Subject Re: php exec http url
Date 2014-03-06 16:04 -0500
Organization A noiseless patient Spider
Message-ID <lfanth$8s3$1@dont-email.me> (permalink)
References <5573acd6-1217-446d-989d-67b2807e5075@googlegroups.com>

Show all headers | View raw


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@attglobal.net
==================

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

php exec http url bishop2001 <lancerset@gmail.com> - 2014-03-06 12:42 -0800
  Re: php exec http url Jerry Stuckle <jstucklex@attglobal.net> - 2014-03-06 16:04 -0500
  Re: php exec http url Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-03-07 15:09 +0100
    Re: php exec http url The Natural Philosopher <tnp@invalid.invalid> - 2014-03-07 14:55 +0000
      Re: php exec http url Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-03-07 16:36 +0100
        Re: php exec http url The Natural Philosopher <tnp@invalid.invalid> - 2014-03-07 20:33 +0000
  Re: php exec http url Denis McMahon <denismfmcmahon@gmail.com> - 2014-03-07 18:12 +0000

csiph-web