Monthly Archives: August 2009


Linux NAT Masquerading HOWTO

Here’s a really quick rundown on setting up masquerading. You’d use this to share one internet connection between multiple local network machines. It’s what most regular ‘routers’ that your ISP sends out do and it’s really easy to set up under Linux in it’s most simplest form […]

By | August 20th, 2009|Technology|0 Comments

PHP Developer – PHP Sessions

Sessions are a useful web technology that are used on just about every interactive site out there. Sessions are an important part of all PHP development. A session is a useful method of keeping track of a user’s browser throughout different page requests. The session is dealt with via a cookie sent to the user’s browser, with an expiry time of 0, that is to say, as soon as the browser window is closed, the cookie is destroyed and the session is over. Examples when you might use a session: A user logs in to your site, on successful login, a session is created, and the ID stored in the database along with the user’s username and password. The user does not need to pass his username and password to subsequent pages as he’s recognised by his session ID. A user is not required to log in, however as he selects options and browses through subsequent pages, we store his information entered in a session. It is important that a PHP developer also know what not to do in a session: Do not store sensitive information in a session. It’s just a plaintext cookie sent each time the browser requests a page from your site. Do not initialize a session on the site’s landing page unless you have good reason to. Some browsers do not accept cookies and besides, it’s not polite to trigger a cookie on the user’s machine without him performing an action that warrants it. […]

By | August 10th, 2009|Development, PHP, PHP, PHP Articles, Technology|0 Comments