Archives December 2012

Server: That means "LFD" and "CSF" in cPanel

When you or your hosting company uses cPanel or another Web hosting control panel, you often hear unfamiliar abbreviations, here are two most popular abbreviation:

  • LFD = Login Failure Daemon
  • CSF = Config Server Firewal

Continue reading

Photobooth.js : New JavaScript framework to use the webcam with HTML5

Photobooth.js : New JavaScript framework to use the webcam with HTML5

Photobooth is a new JavaScript framework to integrate in a website fairly easily making a webcam photo exploiting the latest HTML5 API "WebRTC" W3C.

Sites: Photobooth.js website | Demo | Repository

Continue reading

Check your Internet connection | PHP Script Snippet

To check if your Internet connection is enabled, a simple solution is this function:


<?php
/**
 * Check Internet Connection.
 * 
 * @param string $sCheckHost Default: http://www.google.com
 * @return boolean
 */
function check_internet_connection($sCheckHost = 'http://www.google.com') 
{
    return (bool) @fopen($sCheckHost, 'r');
}
?>

A function is a little more advanced:


<?php
/**
 * Check Internet Connection.
 * 
 * @param string $sCheckHost Default: www.google.com
 * @return boolean
 */
function check_internet_connection($sCheckHost = 'www.google.com') 
{
    return (bool) @fsockopen($sCheckHost, 80, $iErrno, $sErrStr, 5);
}
?>

Example of use:


<?php
$bIsConnected = check_internet_connection();
$sText = ($bIsConnected) ? '<p style="color:green">You are currently connected to the Internet.</p>' : '<p style="color:red">You are ...

Continue reading

Daily archives

Previous month

November 2012

Next month

January 2013

Archives