By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,642 Members | 1,696 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,642 IT Pros & Developers. It's quick & easy.

Launching a URL

P: n/a
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.php?&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
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Franco Fellico' a écrit le 26/03/2004 :
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.php?&user=$auser

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


Use fopen() : http://www.php.net/fopen
Or fsockopen() : http://www.php.net/fsockopen
Jul 17 '05 #2

P: n/a
Jedi121 wrote:
Franco Fellico' a écrit le 26/03/2004 :
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.php?&user=$auser

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


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


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 :
Jul 17 '05 #3

P: n/a

"Jedi121" <je*********@free.fr.Removethis> wrote in message
news:me********************************@free.fr.Re movethis...
Franco Fellico' a écrit le 26/03/2004 :
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.php?&user=$auser

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


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


file_get_contents() is underappreciated imho.

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

ini_set('user_agent', "MSIE 6.0");
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.