Dear All,
I noticed in centain websites, they pull some search engine result and display on their own website. e.g
http://magix-search.com/search/movies/web/1
Any idea how did they do it? is it possible to do it using PHP?
Thanks in advance
second level search directory
Moderator: General Moderators
-
php.newbie
- Forum Newbie
- Posts: 16
- Joined: Wed Sep 20, 2006 3:28 am
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
You could use file_get_contents() to "get" a page from a search engine, then parse out the resuts:
At this point I'd try importing the source into a DOM tree and transforming it with XSLT.
Cheers,
Kieran
Code: Select all
$google_search = file_get_contents('http://www.google.com/search?q=buffy+the+vampire+slayer');Cheers,
Kieran
-
php.newbie
- Forum Newbie
- Posts: 16
- Joined: Wed Sep 20, 2006 3:28 am