Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   PHP (http://www.programmingforums.org/forum29.html)
-   -   extracting info from a remote site. (http://www.programmingforums.org/showthread.php?t=4452)

scorpiosage Jun 15th, 2005 1:24 AM

extracting info from a remote site.
 
I haven't been on in a while, mostly due to some projects that have been way too time consuming, but, I am running across a problem.

I have 2 websites. One is a real estate site.
I have my listings on the RE site, in such a way that it's one page that just loads depending on the MLS number. so it would be details.php?mls=12345

Now, on my other website, I want to be able to extract information from the RE details page.

I can not connect to the database, from the remote site.

and I don't want to use frames.

I do not want to use a database to store the information on the second site from the RE site, I just would like to show the information that is available on the mls pages.

There is a page on the RE site that lists the ml numbers, so I may have to extract the ml numbers from the first page and then loop them through?

Not sure, does anyone know how to do this?
Thanks
Mike

M.Hirsch Jul 8th, 2005 4:41 AM

PHP supports transparent remote files access via http.

i.e. you can fopen("http://your-domain/file", "r") and read from it.

The most simple way is:
$lines=file("http://your-domain/file");
which returns an array of the lines of the html code.

But file() can waste a lot of memory so use with care...

M.


All times are GMT -5. The time now is 2:02 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC