Hi,
On Thu, 1 Aug 2002, HASHEMI wrote:
> I am working on a project in which I'd like to keep track of visitors
> without the use of cookies. The idea is to use Perl, Apache and
> oracle. The oracle db will contain fields about visitors such
> as id and password (after registration), and also topics, links, and
> keywords to the various pages in the site.
Ok: two things:
- Are you really sure Perl is the right choice for this? In order to make
your pages accessible and to fit with various guidelines (for example on
good construction of URIs) you will have to jump through many hoops with
Perl, where other web application frameworks might be better suited to the
job. As per usual, I'd recommend Cocoon - see
http://xml.apache.org/cocoon/ .
- Assuming you want to use Perl, are you sure you want to rule out
cookies? It is possible to build the site without cookies (by appending
the session id to the URI), but these days cookies are a pretty well
accepted way of doing this sort of thing.
That said, you should look at Apache::Session::Perl (I think that's the
right name for it), which is a set of perl modules for handling sessions.
It's relatively easy to get up and running, it allows you to store session
details in a database (such as Oracle), and it handles most of the nasty
stuff for you.
> Using the recorded info the webpage should be able to adapt itself to
> the user on the next visit
The downside of this is that you'll have to either embed HTML in Perl
(use CGI::FastTemplate for example) or embed Perl in HTML (use embperl, or
mod_perl). Neither of these are particularly elegant and don't contribute
to maintainability and separation of concerns (keeping design, logic,
content and management apart).
> 1) how to create sessions in Perl.
See Apache::Session::Perl
> 2) how to record the number of visits and date and time in the
> database
You need to come up with a suitable database schema (ie a design for how
you are going to store the information). I'd suggest as a starting point
you'd need to store registration details and number of visits in one
table, and unique visits (with user id, date and time) in another table.
> 3) how to make suggestions to the user based on the above mentioned info.
Good question ;-)
Andrew.
--
Andrew Savory Email: [log in to unmask]
Managing Director Tel: +44 (0)870 741 6658
Luminas Internet Applications Fax: +44 (0)700 598 1135
This is not an official statement or order. Web: www.luminas.co.uk
|