Re: Re: How to get an parameter from a remote php script?

From: steve (UseLinkToEmail_at_dbForumz.com)
Date: 06/29/04


Date: Tue, 29 Jun 2004 17:13:45 GMT


> Markus <dagger@foo.com> wrote in message
> ews:<40e0baed[quote:8a1089b46d="Nikolai Chuvakhin"]Markus <dagger@foo.com> wrote in message
   ews:<40e0baed$0$26646$5402220f@news.sunrise.ch>...
>
> ?php on http://bi.com
> {
> $t = "http://foo.com/boo.php?action=1&test=2";
> echo $t;
> }
>
> Now on foo.com the php script boo.php
> does something with this request.. So far i get it
>
> Now comes the problem.
>
> How I get the result from foo.com/boo.php into the $t ?

$t = file_get_contents(’http://foo.com/boo.php?action=1&test=2’);
echo $t;

Or, in case you don’t need to store the remote file in a variable,
simply:

readfile(’http://foo.com/boo.php?action=1&test=2’);

Cheers,
NC[/quote:8a1089b46d]
64602220f@news.sunrise.ch>...
> >
> > ?php on http://bi.com
> > {
> > $t = "http://foo.com/boo.php?action=1&test=2";
> > echo $t;
> > }
> >
> > Now on foo.com the php script boo.php
> > does something with this request.. So far i get it
> >
> > Now comes the problem.
> >
> > How I get the result from foo.com/boo.php into the $t ?
>
> $t = file_get_contents(’http://foo.com/boo.php?action=1&test=2’);
> echo $t;
>
> Or, in case you don’t need to store the remote file in a variable,
> simply:
>
> readfile(’http://foo.com/boo.php?action=1&test=2’);
>
> Cheers,
> NC
Nikolai, learned something new today. My approach works, but I like
yours a lot better!

-- 
http://www.dbForumz.com/  This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/PHP-parameter-remote-script-ftopict124155.html
Visit Topic URL to contact author (reg. req'd).  Report abuse: http://www.dbForumz.com/eform.php?p=414575


Relevant Pages

  • dhclient doesnt respond to DHCP OFFER
    ... It has two pcmcia nework cards - one connected to ... Echo (ping) request ...
    (comp.os.linux.networking)
  • Re: [PHP] Cant fetch HTTP POST data in PHP?
    ... why was the request a GET request rather than a POST request? ... echo $_POST; ... Chris Shiflett - http://shiflett.org/ ... PHP Security Handbook ...
    (php.general)
  • Re: ssh on ping port?
    ... REQUEST and receives ICMP ECHO REPLY. ... Please do not confuse an icmp packet with a tcp and/or udp packet. ... The icmp protocol do NOT use the notation of ports, instead the icmp protocol is divided into different types where echo request is type 8 and echo reply is type 0. ... Both will use port 7 if that is what /etc/services says to use. ...
    (alt.os.linux)
  • Re: 4 x DDR = Slower?
    ... at author's request ... Articles individually checked for conformance to usenet standards ... Topic URL: http://www.hardwareforumz.com/Chips-DDR-Slower-ftopict61264.html ...
    (comp.sys.ibm.pc.hardware.chips)
  • Re: Looking for suggestions
    ... at author's request ... Articles individually checked for conformance to usenet standards ... Topic URL: http://www.windowsforumz.com/suggestions-ftopict445464.html ...
    (microsoft.public.windowsxp.general)