Archived

This topic is now archived and is closed to further replies.

Necro-File

Searchable HTML pages...?

Recommended Posts

I have been coding with HTML for quite some time now, and is the first computer language I was ever able to use skillfully. I recently had an idea for a searchable dictionary of sorts (not telling the whole thing, don''t want my idea stolen), but I never learned how to make search pages like Dictionary.com. If anyone can give me some help/tips/source code to familiarize myself with, or point me in the right direction, I would be most pleased.

Share this post


Link to post
Share on other sites
You can''t make them in HTML, as HTML is not a programming language.
Most search pages are written in Perl, PHP, or (rarely) compiled languages like C/C++.

Basicly you write a Perl/PHP/C program that writes the HTML of the search results page, based on the search string.

Share this post


Link to post
Share on other sites
They *can* be made in HTML, that is what META tags are for. Infoseek uses an HTML search structure system capable of searching any for these META tags, as do most other popular search engines (Google, Yahoo!, MSN, etc). I know little about Perl, but I thought it was an extension of JAVA, and I know that even JAVA incapable browsers can use search engines, and also that PHP hasn''t been around as long as most of these search engines have been.

I found a snippet of code on the web for an HTML search page, however, it didn''t give any explination of what the code actually means, so for one who is just learning how to do these functions, it was totally unusable.

Share this post


Link to post
Share on other sites
quote:
Original post by Necro-File
They *can* be made in HTML, .... more complete bullshit

That is so horribly wrong, it''s not funny. HTML merely describes a page layout, it CANNOT be used as a programming lanuage.

Also, Perl is not even remotely related to Java, and predates it by a good ten years. Perl is based on regex, and is fantastic for text processing. Java is more closely related to C, but still distinct.

Search engines that predate PHP/ASP used CGI programs (Common Gateway Interface). If you ever see ''cgi-bin'' or the like in a URL, that''s what it is.

The actual search page will be written in HTML, but it will use forms or similar to access a backend CGI program or PHP/ASP script. It seems to me that Google is written in Python, but I''m not sure.

I don''t know how to do what you''re trying, but Google is your friend. I just wanted to clear up some horribly false info.





"The sun is the same in a relative way,
but you''re older"
--Pink Floyd

Share this post


Link to post
Share on other sites
quote:
Original post by Necro-File
They *can* be made in HTML, that is what META tags are for.

No, they can't. HTML → HyperText Markup Language, ergo no
programmable features. Meta tags can be evaluated by scripts (e.g. written in Perl). I'd suggest you to read a little about
CGI and how how the Internet actually works. You will find that
*programming* languages (Perl, Java, ...) and things like XSL
can translate code (or XML in case of XSL) into browsable HTML
code on the server side, so the client only receives HTML code
and doesn't know about what's actually done on the server.

That might lead you to the assumption that you can do things
like searching in HTML (as you only see HTML when viewing the
page source), which is certainly not the case.

Nevertheless you can add some dynamic features like searching
to HTML code by using client-side scripting (e.g. javascript
or VisualBasic).

[edit]
ze_jackal was faster
[/edit]

[edited by - darookie on May 8, 2003 6:48:06 PM]

Share this post


Link to post
Share on other sites
Ok fine, lets say I believe you. Where can I find a tutorial on making a searchable database without PHP/MySQL (since my stupid web server doesn''t allow PHP scripting) and can run locally, without anything like a CGI-BIN folder or similar thing like some other Perl scripts I have seen?

Share this post


Link to post
Share on other sites
quote:
Original post by Necro-File
Ok fine, lets say I believe you. Where can I find a tutorial on making a searchable database without PHP/MySQL (since my stupid web server doesn''t allow PHP scripting) and can run locally, without anything like a CGI-BIN folder or similar thing like some other Perl scripts I have seen?

You can''t. Period. Give it up. Nothing doing.

Well, I suppose you could do it in javascript, but you''d have to have the entire index coded into the script, which means the page would be **huge**, and there''d be no reason to have a search script in the first place.

So, in conclusion, give it up.


How appropriate. You fight like a cow.

Share this post


Link to post
Share on other sites
Well, after much diliberation and squabiling with you, somehwat lacking, gentlemen/women, I have found what I was looking for initially, and HTML searching *IS* possible. So goodday to you. I will post back once I have finished my database.

Share this post


Link to post
Share on other sites
Wow... You come here for help and insult those who give it to you. Anyway, it can''t be done, complete and utter bullshit if you say it can. I would have helped you but after reading your posts I don''t think I feel like it anymore...

Share this post


Link to post
Share on other sites
quote:
Original post by Necro-File
Well, after much diliberation and squabiling with you, somehwat lacking, gentlemen/women, I have found what I was looking for initially, and HTML searching *IS* possible. So goodday to you. I will post back once I have finished my database.

Can you show us what you've found, is it Teh Html Variabelz?!?!?!

[edited by - kordova on May 8, 2003 9:42:04 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by The Heretic
Wow... You come here for help and insult those who give it to you. Anyway, it can''t be done, complete and utter bullshit if you say it can. I would have helped you but after reading your posts I don''t think I feel like it anymore...


That''s meaningless if you actually read his last post...

-~-The Cow of Darkness-~-

Share this post


Link to post
Share on other sites
quote:
Original post by Necro-File
I know little about Perl, but I thought it was an extension of JAVA, and I know that even JAVA incapable browsers can use search engines, and also that PHP hasn't been around as long as most of these search engines have been.



PHP & Perl (and all other languages used for CGI) are Server Side .
Which means all browsers support them, because they just output HTML. (Well, not exactly. You can output images, plain text, programs, etc just as easily with CGI programs)

Your browser doesn't care if www.sunyaco.com/whatever.html is an actual file sitting on the server, or a program the creates the file.

HTML isn't a programming language. You need a programming languge to write a search engine.

It MIGHT be possible to write a (client-side) javascript/ECMA-Script search engine, but it would be slow as smeg and just a hack.
(And might not work at all, depends how well you can script across frames. I haven't done javascript in a while, so I forget)

Have a layout like this:

---------
|PAGE A |
---------
|B|C|D|E|
---------

Have page A load the first 4 pages on your site into B,C,D,E.
Wait for them to finish loading. Search through them for the search string. (showing results in A)
Load the next 4 pages, wait, search, repeat.

Needless to say, this is a very bad idea.


[edited by - TravisWells on May 9, 2003 2:37:52 AM]

Share this post


Link to post
Share on other sites
hmmmm, couldn''t you write the pages in HTML, and embed XML data islands, then use javascript/ecmascript to search the data islands? I''m not too familiar with javascript, but I imagine that it should be able to look up nodes via SAX, though I''m not sure if javascript is powerful enough to hold the entire XML tree like DOM would require.

Heck, you could get rid of HTML altogether and just have XML pages that are marked up through CSS (I''d do it through XSLT, but since his server doesn''t support server-side processing that''s probably not possible). This way you have built in data-structuring which should be relatively easy to search with the javascript looking node by node until it finds the matching parameters.

Share this post


Link to post
Share on other sites
quote:
Original post by Necro-File
I have found what I was looking for initially, and HTML searching *IS* possible.

HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA

Share this post


Link to post
Share on other sites
HTML doesn''t do anything. It is a markup language. It simply describes a page. Nothing can be done with HTML, it is completely useless for anything other than markup.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by Necro-File
Well, after much diliberation and squabiling with you, somehwat lacking, gentlemen/women, I have found what I was looking for initially, and HTML searching *IS* possible. So goodday to you. I will post back once I have finished my database.



http://www.w3c.org/TR/html4/


Maybe you could point out which part of the standard handles "searchable documents". I suppose it must be the MAGICSEARCH tag.

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
Maybe you could point out which part of the standard handles "searchable documents". I suppose it must be the MAGICSEARCH tag.


http://www.w3.org/TR/html401/interact/forms.html#h-17.8

Of course, you pretty much need to write a CGI script for ISINDEX to actually be useful, but you could cobble together a search using a set of static pages if you wanted to be obtuse and (incredibly) inefficient just to prove a point.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by CheeseGrater
[quote]Original post by Anonymous Poster
Maybe you could point out which part of the standard handles "searchable documents". I suppose it must be the MAGICSEARCH tag.


http://www.w3.org/TR/html401/interact/forms.html#h-17.8

Of course, you pretty much need to write a CGI script for ISINDEX to actually be useful, but you could cobble together a search using a set of static pages if you wanted to be obtuse and (incredibly) inefficient just to prove a point.

Um, no, that''s just a deprecated synonym for a text input field. It just so happens that their example contained a search field.

It doesn''t change the fact that HTML is a markup language, it simply doesn''t do functional stuff like searching. Nyah.

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
It doesn't change the fact that HTML is a markup language, it simply doesn't do functional stuff like searching. Nyah.


Back in the day when no one used forms, ISINDEX was almost always used for searching. That's why it's named 'INDEX', for search index.

It's defined to parse URLs into a specific format (much like the GET method used by form tags.)

If you generate a bunch of html files with the keywords embedded appropriately in the filenames, you can in fact get a basic search to work this way.

It sucks and no one should ever do it, but I remember one or two sites that actually did search this way a long time ago.



[edited by - cheesegrater on May 12, 2003 5:07:23 PM]

Share this post


Link to post
Share on other sites
Come on, people. This must surely be a joke. Right? Right?!?

  • I have been coding with HTML for quite some time now, and is the first computer language I was ever able to use skillfully.
  • (not telling the whole thing, don''t want my idea stolen)
  • They *can* be made in HTML, that is what META tags are for.
  • Infoseek uses an HTML search structure system capable of searching any for these META tags, as do most other popular search engines (Google, Yahoo!, MSN, etc
  • I know little about Perl, but I thought it was an extension of JAVA
  • HTML searching *IS* possible
  • I will post back once I have finished my database.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
*continues to laugh*

HTML is evaluated once and only once, it is static, it doesn''t change. You can''t use it to make a search engine.

Share this post


Link to post
Share on other sites
Its perfectly possible to search an html page. Press Ctrl+F, then type in what you''re searching for , But as for what you''re trying to do... no.

Share this post


Link to post
Share on other sites
If he has coded an HTML "program" which searches HTML pages, then I will quit my 6-year job as a professional PHP/ASP database programmer. Now, he may have come up with some kind of hack in javascript, but that is not HTML.

With HTML and nothing else, it simply CANNOT BE DONE.

Edit:

Also, I will never, ever stop laughing if his database is a bunch of HTML files.

To the original guy--it's all about your attitude, man.

[edited by - Ronin Magus on May 12, 2003 6:30:44 PM]

Share this post


Link to post
Share on other sites