Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

URL access from PHP

Status
Not open for further replies.

buzznick

IS-IT--Management
Dec 29, 2004
39
US
Hi all,

What is the best way to have a PHP script access another URL on a remote server. For example, let's say I have a PHP script on my server but I want to get the text returned by "
Thanks,
Nick
 
1. if URL wrappers are enables use file_get_contents
2. cURL
3. socket connections or streams

#1 works fine, but is not guaranteed to be enabled on all hosts. I usually go with option #3 since fsockopen() is native PHP and will be available anywhere.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top