Page 1 of 1

how to display the contents from a specified URL?

Posted: Wed Aug 11, 2004 3:41 pm
by eyor312
Hi,

I'm new to php and cannot seem to find how to display a page from a URL in PHP. For instance, I have my own wrappers coded and then in the code I have a URL, http://www.google.com.

So when I display my page it would show my customized wrappers and then it would display the google page.

Is this scenario possible? If possible, how do I do it?

Thanks a bunch,
Gabe

Posted: Wed Aug 11, 2004 3:45 pm
by feyd
you can use [php_man]file_get_contents[/php_man]() or [php_man]curl[/php_man] to get the remote pages.. then use some regular expressions or other string functions to get at the data contained in the rendered html..

Posted: Wed Aug 11, 2004 3:49 pm
by qads
google offers a API service, you could use that, more information is here-> http://www.google.com/apis/index.html

Posted: Thu Aug 12, 2004 10:53 am
by eyor312
Thanks for the reply guys.... I look into it and see if it works.