This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
/* This file is released under the GPL, any version you like | |
* | |
* PHP PSD reader class, v1.3 | |
* | |
* By Tim de Koning | |
* | |
* Kingsquare Information Services, 22 jan 2007 | |
* | |
* example use: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Favicon for old browsers --> | |
<link rel="shortcut icon" type="image/x-icon" href="img/favicon/16.ico"/> | |
<!-- Favicons for browser with out support .ico file --> | |
<link rel="icon" type="image/png" href="img/favicon/16x16.png" sizes="16x16"> | |
<link rel="icon" type="image/png" href="img/favicon/32x32.png" sizes="32x32"> | |
<!-- For Google TV --> | |
<link rel="icon" type="image/png" href="img/favicon/96x96.png" sizes="96x96"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.container { | |
width: 418px; | |
height: 240px; | |
overflow: hidden; | |
} | |
.container img { | |
width: 100%; | |
} | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<meta charset=utf-8 /> | |
<title>Live Word and Character Counter using jQuery</title> | |
<style> | |
textarea{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * | |
FROM tbl_name | |
WHERE creation_time > DATE_SUB(NOW(),INTERVAL 1 HOUR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
DEFINE('DB_USER', 'YOUR_DATA_BASE_USER'); | |
DEFINE('DB_PASSWORD', 'YOUR_DATA_BASE_PASSWORD'); | |
DEFINE('DB_HOST','YOUR_HOST'); | |
DEFINE('DB_NAME','YOUR_DATA_BASE_NAME'); | |
$email = 'email-to-search@mydomain.com'; | |
$con = new PDO( 'mysql:host='.DB_HOST.';dbname='.DB_NAME.';charset=UTF-8',DB_USER,DB_PASSWORD ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright 2011 Martin Hawksey | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$email = "someone@example.com"; | |
if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) { | |
echo "Valid email address."; | |
} | |
else { | |
echo "Invalid email address."; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ($handle = opendir('myFolder')) { | |
echo "Directory handle: $handle\n"; | |
echo "Files:\n"; | |
/* This is the correct way to loop over the directory. */ | |
while (false !== ($file = readdir($handle))) { | |
echo $file."<br />"; | |
} |
NewerOlder