Re: [Nolug] Web Development Problems

From: Michael <mogmios_at_mlug.missouri.edu>
Date: Tue, 18 Jun 2002 09:33:37 -0500 (CDT)
Message-ID: <Pine.LNX.4.44.0206180926550.29659-100000@mlug.missouri.edu>

Do you have a way to list enviroment variables? The http refer should be
in there most liekly.

As for sessions you can probably make your own management package if your
language doesn't already have one (might look online for one). Basiclly
just need to create a unique hard to guess key. .. an MD5 of a random
number would probably work fine.. and send that key to the browser in a
cookie and use it in your backend db to track data about that user. For
instance if the user contacts your site from any other site you record the
refering page so that you can send the user back there later. Usually
you'll want to also include a cleanup function that runs on a probability
of some sort (1 of 100 chance maybe) to see how long it's been since each
session in your db has been used and delete any older than maybe 12 hours.

As for cookies you can just send them in your header data and you should
be able to read them from the info your webserver provides. There is
probably a package to make it easier but that way HAS to work as it's all
raw data.

The girl who stoops to conquer usually wears a low-cut dress.

;):):-):):-):):-)8')
Michael McGlothlin <mogmios@mlug.missouri.edu>
http://mlug.missouri.edu/~mogmios/projects/

On Fri, 14 Jun 2002, Jeff Lee wrote:

>
> The page server is using RPG to do all of the programing ... html is
> incorperated in this and so is java script. Im not sure about PHP or
> anyother lang. I can ask tommorow but is there a way to find out if i have
> capabilities of http_redir. refer. on the current server b/c i do not
> remember the name of it. although i know it is not apache. The RPG lang. can
> handle java though i dont know if there is an added mod to handle this.
>
> >From: Scott Harney <scotth@scottharney.com>
> >Reply-To: nolug@patientcarerx.com
> >To: nolug@patientcarerx.com
> >Subject: Re: [Nolug] Web Development Problems
> >Date: Thu, 13 Jun 2002 15:58:22 -0500
> >
> >This is pretty specific to the language you're using. You would not
> >want to use javascript for cookie setting/tracking in this instance.
> >javascript is client-side language and what you need to do is all
> >server-side. That means using CGI or something like PHP or mod_perl or
> >java server pages.
> >
> >What you're looking for is known in web development circles as
> >"session management". You use cookies to keep track of user "sessions"
> >and you can control them from there. I do this all the time with PHP
> >and perl-based web apps.
> >
> >Typically what I'll do is create a session with a cookie and the cookie
> >is the "key" to a backend database (mysql, postgresql, even filesystem
> >only)
> >In that database I can store things such as the HTTP_REFERRER URL that
> >they started the session on. Then once they complete a form, for example,
> >I can use php to set an HTTP Location: header to redirect the user back
> >to that original URL.
> >
> >that's an outline of what you need to do, but what you're talking about
> >is fairly language and platform specific. What you need to do
> >is find out about 'session management' using cookies in your environment
> >of choice. You'll also need to know how to manipulate HTTP headers directly
> >using your environment of choice.
> >
> >As you probably already know, this is a fairly common issue with web
> >development. If you're using an open-source setup, you'll undoubtedly
> >find tons of docs on the web as well as in things like O'Reilly books for
> >doing this. With a proprietary vendor language, online resource _might_
> >be a little harder to come by; you may need to consult with the vendor.
> >
> >
> >On Thu, Jun 13, 2002 at 08:37:26PM +0000, Jeff Lee wrote:
> > >
> > >
> > > I am working on an AS/400 Developing web based ordering carts. A problem
> >I
> > > have run into is redirecting the customer back to the page he ordered
> >from
> > > after his order is complete.
> > > I have the site set up where different types of products are on
> >different
> > > pages and I would like the customer to be redirected back to the exact
> >site
> > > they ordered from. NOT to http://setsite.com/setpage.htm
> > > but http://referedsite.com/referedpg.htm
> > >
> > > Second I want to make sure that any customer who is using the site has
> > > cookies enabled since it is the method being used to track the order.
> > > I suppose that this can be done with Java Script but im not sure. I want
> >to
> > > check to see if they have cookies enabled (maybe by sending a test
> >cookie)
> > > and then if they dont i want them to be alerted.
> > >
> > > Thanks,
> > > Jeff Lee
> > > Think Solutions Inc.
> > >
> > > _________________________________________________________________
> > > Chat with friends online, try MSN Messenger: http://messenger.msn.com
> > >
> > > ___________________
> > > Nolug mailing list
> > > nolug@nolug.org
> >
> >--
> >Scott Harney<scotth@scottharney.com>
> >___________________
> >Nolug mailing list
> >nolug@nolug.org
>
>
>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
>
> ___________________
> Nolug mailing list
> nolug@nolug.org
>

___________________
Nolug mailing list
nolug@nolug.org
Received on 06/18/02

This archive was generated by hypermail 2.2.0 : 12/19/08 EST