hi.

I'm working on a project where I must observe form submissions in websites and detect a search engine if a form is used consistently.
I don't really want any help with coding this. I just want some ideas for an algorithm.

Like, for example if I were to come to Daniweb and search for something everyday, after sometime I must be suggested to use Daniweb as a search engine.

A typical algorithm would count the number of times I searched in Daniweb and if it exceeds a number, it should detect the Daniweb search form as a search engine. This seems too trivial.
I have not the experience to tell if this would practically work and produce neat results.

Assume I have the technical ability and resources (like form history, databases) to implement any algo.

Please suggest any ideas you have.
Thank you

Recommended Answers

All 8 Replies

you tell me how do you observe form submitions and what website the user is submiting it on,
and I'll tell you absolutely everything else you need to know, I'll even write the original code you are asking for...

you tell me how do you observe form submitions and what website the user is submiting it on,
and I'll tell you absolutely everything else you need to know, I'll even write the original code you are asking for...

If I am working with a browser's source code, I can use their API to observe form submissions, know what website and even maintain a record of previous searches. I am not aware of how to do this from scratch, but I can use those APIs.

I didn't ask for any code. That was why I didn't mention any of this.
I'm asking for ideas. Please tell me.

This sound more like a brower plugin than a website using javascript

Butt:
I is posible to directly read the historydatabase for firefox using php.
but only for localhost and loged in as a specific user
(this one is for a window7 machine)
$HistoryFile="C:\\Users\\username\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\somethingrandom.default\\places.sqlite";

open it using PDO

This sound more like a brower plugin than a website using javascript

It sounds like spyware to me...

It sounds like spyware to me...

I'm sorry, it's not. May I ask why it sounds like that? Detecting any website as a search engine so the data can be kept inside the user's computer? Anyway it's not.

I is posible to directly read the historydatabase for firefox using php.

Since I am trying to extend a browser's functionality, I do have direct access to that data. My question was different.

I hope I asked the question clearly.
Say,
A user searches a lot in a website. That site could be detected as a search engine.
The straight forward way: check how many times he searched. If too many, maybe it is a search engine.
I just asked for ideas that could improve this, and perhaps where this would fail.

Thanks

Okay, perhaps I am just misreading. It sounds like you want to capture the searches that a user is doing on a website, or in other words capture the form data since there isn't a way to tell a search form from any other form.

Which brings me to my next point, how are you going to determine that someone is "searching" on a website? You search on anything, it is just a form that passes that user input.

The submission form u use the most is in fact a user name and a password, so - this is, what you thing it is - exactly!

Which brings me to my next point, how are you going to determine that someone is "searching" on a website? You search on anything, it is just a form that passes that user input.

True. It isn't possible to be sure if it is a search form or some other form.
That is one of the reasons why the staright forward algorithm would fail. So I was asking here for ideas that might meaningfully understand that it is a search. I really don't know the answer to this, and I thought I could find answers here. I asked for help in these issues.

The submission form u use the most is in fact a user name and a password, so - this is, what you thing it is - exactly!

Not sure what you're trying to say. If I wanted usernames and passwords I could have taken that information directly. It is not hard to identify login forms. Why find out if a form is a search form?
Besides why would anyone run such a script? If the script was pulled into the browser's source repo, it would get run, and why would developers pull malicious scripts into their code?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.