NYCPHP Meetup

NYPHP.org

[nycphp-talk] Remote php call

Brent Baisley brenttech at gmail.com
Tue Mar 24 12:47:13 EDT 2009


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_contents works.

Brent

2009/3/23 Michele Waldman <mmwaldman at nyc.rr.com>:
> 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
>
>
>
> _______________________________________________
> New York PHP User Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/show_participation.php
>



More information about the talk mailing list