Recommend this page to Google

cookies and headers

One of the most frustrating problems I ever had with PHP was with with headers. I was writng some authentication code which would verify login password combination. If the combination is erroneous, I include a standard relogin page with a message. Otherwise I wanted to set a cookie and included another page.

This is where I was getting the following warning:

Warning: Cannot add header information - headers already sent

You are supposed to get this error if you try to call header() or setcookie() after a header has been called. A header is called with:

*

header()

PHP - String Encryption

If you want to know how to encrypt a string in PHP, then you have come to the right place.

The easiest way to encrypt a string is to use the crypt() function. There are only 2 things you need to know:

*

How to encrypt a string
*

How to match an encrypted string

Encrypting a String

To encrypt a string, you have to do the following.

$password = "password";
$encryptedPassword = crypt($password);

If you want to see the encrypted string, print $encryptedPassword.

Matching an Encrypted String

SSH - installing and using

SSH stands for Secure Shell. To access a remote Linux/Unix system, you can use either telnet or SSH. The problem with telnet is that your telnet session is visible in plain text on your local network and the local network of the machine you are connected to. SSH works like a telnet but it encrypts the data being sent. SSH programs are available for every major operating systems.
Downloading, installing, using a SSH client on Windows

Converting *.doc to *.pdf

A document with a .doc extension is a Microsoft Word document. A document with a .pdf extension is an Adobe Acrobat document. Microsoft Word is the most popular word processor and pdf is the standard for publishing printable documents over the Internet.

Background

Syndicate content