indexing a webbsite

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pelegk1
Forum Newbie
Posts: 9
Joined: Tue Aug 31, 2004 12:30 am

indexing a webbsite

Post by pelegk1 »

i am lookign for a free code that index the pages of a website
so when i searc for a keword on my websiite i get results (like google for example does(
does any 1 know of a good and free ready made scruipta?
thnaks in advance
peleg
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

hotscripts.com likely has some...
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

Is your website content stored in a database or in flat files?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
foobar
Forum Regular
Posts: 613
Joined: Wed Sep 28, 2005 10:08 am

Re: indexing a webbsite

Post by foobar »

pelegk1 wrote:i am lookign for a free code that index the pages of a website
so when i searc for a keword on my websiite i get results (like google for example does(
does any 1 know of a good and free ready made scruipta?
thnaks in advance
peleg
Not sure off the top of my head if Google search on your own website is free, but I'd check it out. If the customizable package isn't, what you can do is make your search form submit to Google.

If you don't want to use a proprietary app/script, which shows good initiative, try figuring out something for your own website. Like a CronJob that indexes all new static pages every once in a while and saves the results in a relational database for speed. I would recommend a Regex that filters out the keywords & description of a page, much like what Google does. Optionally, you could of course search through the entire page for certain keywords, such as unique words, author info, etc. (check Wikipedia for the system Amazon.com uses, forgot the name).
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

yes i have a db

Post by pelegk2 »

pickle wrote:Is your website content stored in a database or in flat files?
that holds the content ofthe pages
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: yes i have a db

Post by pickle »

pelegk2 wrote:
pickle wrote:Is your website content stored in a database or in flat files?
that holds the content ofthe pages
Um.. ok. That doesn't really answer my question though. Indexing your site will take two drastically different routes depending on whether your website content is stored in individual files (such as individual .php files or .html files) or if its stored in a database.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

well pickle

Post by pelegk2 »

some of it is in a databse but most of it in php files
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

Well, the database stuff can be easily searched by setting up a FULLTEXT index and searching with that.

Looking through the files might be more difficult. Try Googling or looking at Hotscripts. You're going to want a script that opens the directory, looks for each file, then indexes each of those files. The problem you're going to have is making the indexing script separate content from PHP code.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
chrys
Forum Contributor
Posts: 118
Joined: Tue Oct 04, 2005 9:41 am
Location: West Roxbury, MA (Boston)

Post by chrys »

If you mean indexing it to be searched... check out htdig
Post Reply