Re: [nyphp-talk] Remote php call

2009-03-24 Thread Fernando Gabrieli
and gets the job done. > > ~rob > -Original Message- > From: Brent Baisley > To: NYPHP Talk > Sent: Tue, 24 Mar 2009 12:47 pm > Subject: Re: [nyphp-talk] Remote php call > > Curl is the better way to go, but if you just need to hit a page on > > another server

Re: [nyphp-talk] Remote php call

2009-03-24 Thread y2rob
9 12:47 pm Subject: Re: [nyphp-talk] Remote php call Curl is the better way to go, but if you just need to hit a page on another server you can use file_get_contents("http://domain.com/script.php?param=a";); file_get_contents doesn't handle errors, failures, redirects, timeouts,

Re: [nyphp-talk] Remote php call

2009-03-24 Thread Brent Baisley
Curl is the better way to go, but if you just need to hit a page on another server you can use file_get_contents("http://domain.com/script.php?param=a";); file_get_contents doesn't handle errors, failures, redirects, timeouts, etc. very well, which is why curl is better. But in a pinch, file_get_c

Re: [nyphp-talk] Remote php call

2009-03-24 Thread Artur Marnik
If you don't need to POST anything you can as well do fopen() http://us3.php.net/manual/en/function.fopen.php but with safe_mode or allow_url_fopen disabled on the server it won't work Artur On Mar 23, 2009, at 8:53 PM, "Michele Waldman" > wrote: If I want to

Re: [nyphp-talk] Remote php call

2009-03-23 Thread Rob Marscher
Curl sounds good assuming the other script is accessible over http. That's the most common way I've seen it done. If you don't have the curl php extension available, you can still invoke it on the command line via the backtick operator or shell_exec. Hope it's painless and the family feels

Re: [nyphp-talk] Remote php call

2009-03-23 Thread Tom Sartain
If you mean execute the script as if you'd opened it up in the browser, then yes, cURL is your friend. ( http://us.php.net/manual/en/curl.examples-basic.php if you want a starting point) If you're looking to actually include the PHP code from other-domain.com and execute it on your-domain.com, the

[nyphp-talk] Remote php call

2009-03-23 Thread Michele Waldman
Sorry for this posting. I may seem lazy but everyone wants me to do everything right now and my daughter had 104 fever today. I'm pressed for time and I've got a baby to tend to right now. If I want to call a remote php script from a php file in a different domain? Curl it? Michele