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


Groups > comp.lang.php > #13077

Re: php exec http url

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Jerry Stuckle <jstucklex@attglobal.net>
Newsgroups comp.lang.php
Subject Re: php exec http url
Date Thu, 06 Mar 2014 16:04:53 -0500
Organization A noiseless patient Spider
Lines 30
Message-ID <lfanth$8s3$1@dont-email.me> (permalink)
References <5573acd6-1217-446d-989d-67b2807e5075@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Thu, 6 Mar 2014 21:04:50 +0000 (UTC)
Injection-Info mx05.eternal-september.org; posting-host="3088393e34bc61b3e6a923d0c81ae1e3"; logging-data="9091"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ZbxKfr2n2bo+71gXsAKYF3u2EpMddtzo="
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0
In-Reply-To <5573acd6-1217-446d-989d-67b2807e5075@googlegroups.com>
Cancel-Lock sha1:BDHFKvG0NIZrRFbtuWdZP/JvP9s=
Xref csiph.com comp.lang.php:13077

Show key headers only | 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