Re: PHP / ASP problem....

From: Date: Tue, 01 Aug 2000 14:28:43 +0000
Subject: Re: PHP / ASP problem....
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-9449@lists.php.net to get a copy of this message
I don't think standard session support will work for what he's trying to do, at least without some fancy alterations. The "application" stuff in ASP holds a common set of state variables across the board. For example, Application(count) = 0 On every page we can do something like Application(count) = Application(count) +1 Printing out the value of application(count) will always show an increasing number, and that number will be increasing for your visits AND mine, not simply mine, like a standard session variable. I wrote privately to Richard initially suggesting that the only real way to do this is to use a file that is common to all pages to hold these values, or write them to a database. You'd have to do this anyway if you went to multiple servers, as there isn't a native way to save application or session variable state across servers without shared filesystem or database calls. "Robert V. Zwink" wrote: > PHP4 has session support. Check out www.phpbuilder.com for a great > tutorial. If you have to use php3, you can use php-lib for simliar > functionality. > > -Rob Z. > > > > > > My name is Richard Edens and again i'm asking for help... > > I need to create a chat program with PHP... > > This chat script needs to work together with Macromedia Director > > Shockwave. Don't worry... You don't need to explain to me how to do the > part > > from Director. I know how that goes.. This is because i'm an Macromedia > > Director Specialist and also a Multimedia Authoring Designer... > > (If you have anny questions about Director or about my, be my quest...) > > > > Meanwhile you could be wondering, how does this all gonne look like? > > How will it work... Well i'll explain it to you now... > > > > -> I make a shockwave movie that has links to PHP sites. > > The links that are used are setup to get HTML text from the PHP sites. > > So what ever the PHP sites contains will be grabbed by the > > shockwave movie.... > > > > -> PHP and ASP and even JavaScript can controll there own content of the > > HTML formatted file.. This means that PHP and ASP can do stuff to > > create temporary or specific content of pages... > > In other words, it can send back the contant of the chat sessions... > > In this chat case i set the PHP or ASP file up to create chat sessions > > and users and etc... everyting thats needed for a good chat site. > > > > The problem i'm having is that ASP can create server variables that are > kept > > alive for ever until the server is broke or you tell ASP to just delete > it. > > These variables can be modifyed and used for users who have opened the ASP > > file its created from... In other words: > > > > Aldo every user can have its own session, usergroups or what ever, they > all > > use one ASP file with one servervariable... > > This greet feature also protects the variable for other ASP files... > > So that effentually you have a very simple clean, chat application. > > Its like the sessions handle for individual users but than used for ASP > > applications... > > > > The code for this all, looks like this: > > > > Application.Lock > > If action = "send" Then > > ' Add the string to the chat session > > list = Application(id) > > list = list + user + ": " + msg + chr(13) > > Application(id) = list > > ElseIf action = "clear" Then > > ' Clear the chat session > > list = "" > > Application(id) = list > > Else 'If action = "update" Then > > ' Just return the current chat session > > list = Application(id) > > End If > > Application.Unlock > > > > Now is there a way to do this also with PHP... > > I really need a good answer for this own, because i couldn't find anny > > on the webpages like webmonkey.... > > Thanks... > > > > ...Richard > -- ========================== Michael Kimsal http://www.tapinternet.com 734-480-9961

« previous php.general (#9449) next »