Deleting Cookies in PHP
It's a good idea to make the expiration time a few hours or an entire day in the past, in case your server and the user's computer have unsynchronized clocks. For example, if your
Read tutorialTHE TUTORIAL LIBRARY
It's a good idea to make the expiration time a few hours or an entire day in the past, in case your server and the user's computer have unsynchronized clocks. For example, if your
Read tutorialA cookie's value isn't available in $_COOKIE during the request in which the cookie is set. In other words, the setcookie() function doesn't alter the value of $_COOKIE. On subsequ
Read tutorialYou can pass additional arguments to setcookie() to control cookie behavior. The third argument to setcookie() is an expiration time, expressed as an epoch timestamp. For example,
Read tutorialThe mcrypt extension is an interface with mcrypt, a library that implements many different encryption algorithms. The data is encrypted and decrypted by mcrypt_encrypt()and mcrypt_
Read tutorialPHP can support a few different kinds of DBM backends: GDBM, NDBM, DB2, DB3, DBM, and CDB. The DBA abstraction layer lets you use the same functions on any DBM backend. All these b
Read tutorialStoring your data in a text file doesn't require any additional database software to be installed, but that's pretty much its only advantage. Its main disadvantages are clumsiness
Read tutorialFTP stands for File Transfer Protocol and is a method of exchanging files between one computer and another. Unlike with HTTP servers, it's easy to set up an FTP server to both send
Read tutorialThe unzip.php sample program below, extracts files from a ZIP archive. It uses the pc_mkdir_parents() function. The program also requires PHP's zip extension to be installed. You c
Read tutorialThe zlib extension contains versions of many file-access functions, such as fopen(), fread(), and fwrite() (called gzopen(), gzread(), gzwrite(), etc.) that transparently compress
Read tutorialThe function parse_ini_file() reads configuration files structured like PHP's main php.ini file. Instead of applying the settings in the configuration file to PHP's configuration,
Read tutorialProcessing every word proceeds differently depending on how "word" is defined. The code in this recipe uses the Perl-compatible regular-expression engine's \s whitespace metacharac
Read tutorialYou want to count the number of lines, paragraphs, or records in a file.To count lines, use fgets(). Because it reads a line at a time, you can count the number of times it's calle
Read tutorialOne example today. A better developer tomorrow.