Hotlinking is the act of one site embedding content (such as images, audio files, and videos) hosted on another site. This uses up the ‘bandwidth’ (data transfer allowance) of the site hosting the file, which can be very expensive for webmasters who pay for hosting by the amount of data transferred — as a result, hotlinking is often called ‘leeching’ or ‘bandwidth theft’.
Hotlinking can be prevented using the .htaccess file on an Apache web server, but cheaper web hosting packages often don’t allow webmasters to change this file. The code...
Tuesday, February 10, 2009
How can we destroy the session, how can we unset the variable of a session?
11:56 AM
No comments
session_unset() function frees all session variables currently registered.
If $_SESSION (or $HTTP_SESSION_VARS for PHP 4.0.6 or less) is used, use unset() to unregister a session variable.
i.e. unset ($_SESSION['varname']...
What is the difference between Split and Explode in PHP?
11:05 AM
No comments
The split() function splits the string into an array using a regular expression and returns an array.
Ex: split(":","India:Pakistan:Srilanka"); returns an array that contains India, Pakistan, Srilanka.
The explode() function splits the string by string.
Ex: explode("and", "India and Pakistan and Srilanka"); returns an array that contains India, Pakistan, Srilanka.
split() function is deprecated as of php5.3.0 . Use preg_split instead of split...
Monday, February 9, 2009
Would you initialize your strings with single quotes or double quotes?
3:04 PM
No comments
Since the data inside the single-quoted string is not parsed for variable substitution, it’s always a better idea speed-wise to initialize a string with single quotes, unless you specifically need variable substituti...
What's PHP ?
2:47 PM
No comments
The PHP Hypertext Preprocessor is a programming language that allows web developers to create dynamic content that interacts with databases. PHP is basically used for developing web based software applicatio...
Subscribe to:
Posts (Atom)