 |
 |
|
|
| |
| |
| |
|
Statistics |
| Unique Visitors: 148 |
| Total Unique Visitors: 2730002 |
| Visitors Out: 4682 |
| Total Visitors Out: 23180 |
|
|
|
| |
|
|
| |
|
| Random Password Generator - PHP |
| 2009-10-02 03:00:00 |
function fnRandomPasswordGenerator($length = 6) { $pass = ''; $new = ''; // all the chars we want to use $all = explode(" ", "a b c d e f g h i j k l m n o p q r s t u v w x y z " ."A B C D E F G H I J K L M N O P Q R S T U V W X Y Z " ."0 1 2 3 4 5 6 7 8 9"); for($i=0; $i < $length; $i++) { srand((double)microtime()*1000000); $pass .= $all[rand(0,61)]; $arr[] = $all[rand(...
|
| |
|
| Validate Email -PHP |
| 2009-10-02 02:59:00 |
function fnValidateEmail($varEmail) { if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $varEmail)) return(true); else return(false); }Disclaimer: Any code or advice given is for instructional purposes only. We will not be responsible for any loss or damage caused by using this script...
|
| |
|
| Read From File - PHP |
| 2009-10-02 02:58:00 |
function fnReadFromFile($sFileName) { $sReturn = ''; $fHandle = fopen($sFileName, "r"); while (!feof($fHandle)) $sReturn .= fread($fHandle, 4096); fclose($fHandle); return($sReturn); } Disclaimer: Any code or advice given is for instructional purposes only. We will not be responsible for any loss or damage caused by using this script...
|
| |
|
| Validation (Select ,selectedCount,checkpassword) - Javascript |
| 2009-10-02 02:42:00 |
//function setSelectOptions(the_form, the_select, do_check){ var selectObject = document.forms[the_form].elements[the_select]; var selectCount = selectObject.length; for (var i = 0; i < selectCount; i++) { selectObject.options[i].selected = do_check; } // end for return true;}function selectedCount(the_form, the_select){ var count = 0; var selectObject = document.forms[the_form...
|
| |
|
| fopen — Opens file or URL - PHP |
| 2009-05-22 23:22:00 |
Disclaimer: Any code or advice given is for instructional purposes only. We will not be responsible for any loss or damage caused by using this script....
|
| |
|
| Curl - PHP5 |
| 2009-05-22 23:20:00 |
Disclaimer: Any code or advice given is for instructional purposes only. We will not be responsible for any loss or damage caused by using this script....
|
| |
|
| Country Listing - PHP |
| 2009-05-13 00:53:00 |
function fnCountryOptionsList($varSelected = "us") { $varCountryList = array( "ac" => "Ascension Island", "ad" => "Andorra", "ae" => "United Arab Emirates", "af" => "Afghanistan", "ag" => "Antigua and Barbuda", "ai" => "Anguilla", "al" => "Albania", "am" => "Armenia", "an" => "Netherlands Antilles", "ao" => "Angola", "aq" => "Antarctica", "ar" => "Argentina", "as" => "American Samoa", "at" => "Austria", "au" => "Australia", "aw" => "Aruba", "az" => "Azerbaijan", "ba" => "Bosnia and Herzegovina", "bb" => "Barbados", "bd" => "Bangladesh", "be" => "Belgium", "bf" => "Burkina Faso", "bg" => "Bulgaria", "bh" => "Bahrain", ...
|
| |
|
| Truncate Memo Field based on specified length, string truncated to nearest space or CrLf - PHP |
| 2009-05-13 00:51:00 |
function TruncateMemo($str, $ln){ if (strlen($str) > 0 && strlen($str) > $ln) { $k = 0; while ($k >= 0 && $k < strlen($str)) { $i = strpos($str, " ", $k); $j = strpos($str,chr(10), $k); if ($i === false && $j === false) { // Not able to truncate return $str; } else { // Get nearest space or CrLf if ($i > 0 && $j > 0) { if ($i < $j) { $k = $i; } else { $k = $j; } } elseif ($i > 0) { $k = $i; } elseif ($j > 0) { $k = $j; } // Get truncated text if ($k >= $ln) { return substr($str, 0, $k) . "..."; } else { $k ++; } } } } else { return $str; }}Disclaimer: Any code or advice given is for instructional purposes only. We will not be responsible for any loss or damage caused by using this script....
|
| |
|
| Load Text Files - PHP |
| 2009-05-13 00:50:00 |
function LoadTxt($fn){ global $ewPathDelimiter; // Get text file content $filepath = realpath(".") . $ewPathDelimiter . $fn; $fobj = fopen ($filepath , "r"); return fread ($fobj, filesize ($filepath));}Disclaimer: Any code or advice given is for instructional purposes only. We will not be responsible for any loss or damage caused by using this script....
|
| |
|
| Load Email - PHP |
| 2009-05-13 00:49:00 |
function LoadEmail($fn){ global $sEmailSubject; global $sEmailFrom; global $sEmailTo; global $sEmailCc; global $sEmailBcc; global $sEmailFormat; global $sEmailContent; $sWrk = LoadTxt($fn); // Load text file content if ($sWrk "") { // Locate Header & Mail Content if (strtolower(substr(PHP_OS, 0, 3)) === 'win') { $i = strpos($sWrk, "\r\n\r\n"); } else { $i = strpos($sWrk, "\n\n"); if ($i === false) $i = strpos($sWrk, "\r\n\r\n"); } if ($i > 0) { $sHeader = substr($sWrk, 0, $i); $sEmailContent = trim(substr($sWrk, $i, strlen($sWrk))); if (strtolower(substr(PHP_OS, 0, 3)) === 'win') { $arrHeader = split("\r\n",$sHeader); } else { $arrHeader = split("\n",$sHeader); } for ($j = 0; $j < count($arrHeader); $j++) { $i = strpos($arrHeader[$j], ":"); if ($i > 0)...
|
| |
|
| |
 |
|
| |
| |
|
 |