Page 1 of 1

Get data from a URL in PHP

Posted: Wed May 15, 2002 3:06 pm
by dbishop
Within PHP I need to send a request to a URL and get the resonse as a string that I can parse. My hosting service has sockets disabled wo I can't do it in that manner.

A sample request would look like:
$result = request_function("http://www.myurl.com?param1=abc&[aram2=123");

$result would contain the contents of the page formed by the request.

Doug

Posted: Sat Aug 02, 2003 7:46 pm
by jmarcv
fread()
You can use a url as well as a file. The html will be returned.