| | |||||
| ||||||||
| CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Senior Member Join Date: Aug 2005 Location: East Yorkshire, England
Posts: 2,689
![]() ![]() ![]() ![]() ![]() ![]() ![]() | Simple Search Engine Demo What this does is search a pages contents for a keyword, if the keyword is found, the uri is added to an array, and every page on the array is scanned for links, which are then scanned for the keyword, etc. ????: NamePros.com http://www.namepros.com/code/242552-simple-search-engine.html The array returned is a user-definable size, and it includes options to limit the spider to only crawl specific domains. It's a bit slow because it indexes all the pages on the fly, if you made it store them in a database, and then search through the database it would be so much faster, but this is just a simple bit of code for people. Also: because it can be slow, I wouldnt recommend setting the max number of pages to much more than 100, thats what the demo is set to and you can see how slow it is (over a minute and a half, lol) ToDo:
|
| |
| | #2 (permalink) |
![]() Join Date: Jul 2006
Posts: 4,609
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Yeah, I think additional caching function would make it awesome search engine script. Looking forward to stable version.
__________________ juegosjuegos Your Hotel in Austria Matratzen Domain Acquisition | Store all your favorite links! | Web Proxies Proxy List | Bookmarks | Creative Enquiry | Web Proxy List |
| |
| | #4 (permalink) | ||||
| NamePros Member Join Date: Mar 2006 Location: Belgium
Posts: 77
![]() |
| ||||
| |