PHP Session and CookiesMore than 730 titles from different sources. Prepared by gotAPI.com |
|
|
1 - 75 76 - 150 151 - 225 226 - 300 301 - 375 376 - 450 451 - 525 526 - 600 601 - 675 676 - 750 www.gotAPI.com |
Best Practices: Sessions
It is the intention of this article to discuss and generate further debate surrounding best practices in developing database driven, session orientated dynamic websites and to present some adopted styles and conventions. The ideas and approaches that are developed here could be realised with almost any combination of server side scripting language and relational database. Sessions and relational databases both offer the opportunity of storing in...
Custom Session Handlers in PHP4
This document describes how to customize the session handlers in PHP4. We will provide examples of how to write a fully functional session handler that works with DBM files and one that works with a MySQL database. New to PHP4 was a set of native session handling functions which was badly missing from PHP3. By default, each session is stored as a separate file in your temporary directory (eg. /tmp in Unix). This may or may not be appropriate dep...
Developing a User Personalization System with PHP and Cookies
Everyone is looking for ways to make their sites attract more repeat traffic. Even after you have content, bulletin boards and search functions, there s still more you can do. As you probably know, different people that come to your site probably come for different parts of your site, but there s no way to please everyone, is there?
Implementing Cross-Domain Cookies
Cookies are a great invention, allowing the web developer to maintain the login status of their users. However, problems occur when your site or network has more than one domain. The cookie specification says that any cookie set for one domain, must not be sent to any other domain. Therefore, if you set a cookie in your user s browser on one domain, that cookie will not be available on any other domain. This is a big problem, if you want your us...
Introduction to Maintaining the State of Applications with PHP Sessions
In PHP, session management is used to help web applications maintain their state across several HTTP requests when needed. In this first part of a series, you will learn the basics of the PHP built-in session mechanism, as well as some of its many useful functions.
Managing Sessions and State with PHP
MVC Frameworks, such as WASP, provide a solid jumping-off point for entry-level programmers to produce strong, well-formed code. The framework simplifies such things as creating a page (using a kind of page object) and creating or searching for data (using database table objects). // ); //]] However, probably the most difficult concept for novice PHP programmers to grasp is handling their application s state and session data. This article will a...
Mini Shopping Basket with only PHP4 Sessions
If you haven t done your own shopping basket with PHP yet, you should be able to build one after reading this article. Even if you have a basket already, some of the tips I provide here could help you improve your system. I will give you some hints about how you could perhaps save yourself endless queries to the basket table or having endless text files that fill up your file system, because the application just does not remove them. If you re n...
Protecting MySQL Sessions With SSH Tunnel (Port Forwarding)
by kenlin SSH Tunnel What Is SSH? SSH stands for Secure SHell and is typically used as an encrypted version of telnet. In a telnet session, all communications are transmitted in plain-text, allowing anyone to listen-in on your session and steal passwords and other information. Such sessions are also susceptible to session hijacking, where a malicious user takes over your session once you have authenticated. OpenSSH, the tool included with most Li...
Session Management and Authentication with PHPLIB
Let s face it, web pages aren t designed for interaction with users. At one time or another, you ve probably found yourself needing to know what user you are dealing with, and some information about that user. But how do you do it on the web? There are many ways, but most of them are either error prone, or serious security risks. Passing around form data from page to page can easily be sniffed, and even more easily forged. What is a webmaster to...
Session Management in PHP4: A Followup
After my last article about Session Management in PHP4, I got several emails from people that had problems implementing what I tried to describe. All theese emails had the same question: Can you give me example code ? Yes, sure I can. I will assume that you have read my previous article ( it s here in case you missed it). As I described earlier, you have to tell PHP that the current page use session variables by calling the session_start() funct...
Session Management with PHP4
One of the new great features with PHP4 is the session management feature. It allows you to store variables in a session object during a user visit. I used this feature recently while re-making my swedish community website (http://coolt.nu/) and thought I d share some of the experience I gained from that. What is a Session? First off I d like to explain what a session is, in case you don t know what it is. A session begins when a user surfs in...
Session Tracking: Part 2
As you learned in the last article, session tracking can add a whole new dimension to your web site. This week, I ll build upon what we learned, and show you how to create custom functions to store user session data. However, before delving further into how these functions are created, let s take a moment to ask why we would want to do this in the first place. // ); //]] Why would it be necessary to create custom functions instead of using the d...
Session Tracking: Part I
The ability to gather, analyze, and implement information about visitors to your organization s web site is one of the most powerful aspects of this new media. The advantages of doing this are manifold -- this information is not only useful for analyzing the patterns of visitors who are interested in your products and/or services, but also allows you to provide customized services to these visitors. For example, not only could you learn which pag...
Using Advanced Functions to Maintain the State of Applications with PHP Sessions
Here we are again. This is part two of the series Maintaining the state of applications with PHP sessions. In three parts, this series ranges from the basics of session management in PHP, such as creating, registering session data, and destroying sessions, to exploring advanced concepts, like working with different session storage modules and creating custom session handling objects.
Using Session Handling Objects to Maintain the State of Applications with PHP Sessions
Here you have it. The tutorial that you were waiting for! Welcome to the concluding part of the series Maintaining the state of applications with PHP sessions. In several tutorials, this series goes through the key points of managing sessions in PHP, and explores some of their most advanced features, such as developing user-defined session storage modules and using session handling objects.
Validating PHP User Sessions
Before we start digging into how to manage user sessions, it is important to first understand what sessions are for. In a nutshell, sessions are the way that we maintain state from one page to the next, that is, how we identify specific users across multiple page requests. The ability to track users as they go from one page to the next using sessions allows us a number of options, such as tracking where they are going (web statistics) or to ver...
Working with MySQL and Sessions to Serialize Objects in PHP
If you re interested in learning how to combine objects, sessions and MySQL, this is the article that you ve been waiting for. It s the final part of the series Serializing objects in PHP. In three parts, this series goes through the fundamentals of serializing objects in PHP applications, and explores some advanced topics with regard to this subject, including the use of the magic __sleep() and __wakeup() functions, and the manipulation of...
|