Launching a URL

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Franco Fellico'

    #1

    Launching a URL

    When I am executing a PHP routine, I would like to start a page on
    a server. Could be also interesting to receive back the answer so
    I can use it contents in my program.

    In other words as a sample when I am at some point of execution of
    a my PHP routine I would like to send to the network:

    http://www.someserver. com/somefunction.ph p?&user=$auser

    Eventually I would like to receive in some way the answer page from
    the server.

    It's possible to do this?

    Thank you from Franco in Italy
  • Jedi121

    #2
    Re: Launching a URL

    Franco Fellico' a écrit le 26/03/2004 :[color=blue]
    > In other words as a sample when I am at some point of execution of
    > a my PHP routine I would like to send to the network:
    >
    > http://www.someserver. com/somefunction.ph p?&user=$auser
    >
    > Eventually I would like to receive in some way the answer page from
    > the server.[/color]

    Use fopen() : http://www.php.net/fopen
    Or fsockopen() : http://www.php.net/fsockopen


    Comment

    • Pedro Graca

      #3
      Re: Launching a URL

      Jedi121 wrote:[color=blue]
      > Franco Fellico' a écrit le 26/03/2004 :[color=green]
      >> In other words as a sample when I am at some point of execution of
      >> a my PHP routine I would like to send to the network:
      >>
      >> http://www.someserver. com/somefunction.ph p?&user=$auser
      >>
      >> Eventually I would like to receive in some way the answer page from
      >> the server.[/color]
      >
      > Use fopen() : http://www.php.net/fopen
      > Or fsockopen() : http://www.php.net/fsockopen[/color]

      Or curl_*() : http://www.php.net/curl
      if you need to control User_agent strings, cookies, post, ...

      --
      USENET would be a better place if everybody read: : mail address :
      http://www.catb.org/~esr/faqs/smart-questions.html : is valid for :
      http://www.netmeister.org/news/learn2quote2.html : "text/plain" :
      http://www.expita.com/nomime.html : to 10K bytes :

      Comment

      • Chung Leong

        #4
        Re: Launching a URL


        "Jedi121" <jedi121news@fr ee.fr.Removethi s> wrote in message
        news:mesnews.d2 b57d43.965d03c7 .623.2689@free. fr.Removethis.. .[color=blue]
        > Franco Fellico' a écrit le 26/03/2004 :[color=green]
        > > In other words as a sample when I am at some point of execution of
        > > a my PHP routine I would like to send to the network:
        > >
        > > http://www.someserver. com/somefunction.ph p?&user=$auser
        > >
        > > Eventually I would like to receive in some way the answer page from
        > > the server.[/color]
        >
        > Use fopen() : http://www.php.net/fopen
        > Or fsockopen() : http://www.php.net/fsockopen
        >[/color]

        file_get_conten ts() is underappreciate d imho.

        If the server does browser check, you can pretend to be IE or Netscape by
        setting the user agent string:

        ini_set('user_a gent', "MSIE 6.0");


        Comment

        Working...