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
if(!jQuery('<input PLACEHOLDER="1" />')[0].placeholder){ //Uppercase attr for IE | |
jQuery(':input[placeholder]').each(function(){ | |
var $this = $(this); | |
if(!$this.val()){ | |
$this.val($this.attr('placeholder')); | |
$this.addClass('input-placeholder'); | |
} | |
}).live('focus', function(e){ | |
var $this = $(this); | |
if($this.hasClass('input-placeholder')){ |
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
order allow,deny | |
allow from [IP here] | |
deny from all |
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 # File created on 11th February 2009 by Mike Rogers (http://www.fullondesign.co.uk/). | |
## Start defining constants ## | |
define(RUN_ERRORS, TRUE); // Do you want the script to display errors? TRUE = yes you do. | |
define(LOG_URL, '/home/user/logs/'); // Put the location of where you want to put the logs. Make sure this is absolute | |
$filename = rawurlencode(base64_encode($_SERVER['PHP_SELF'])); // Takes the filename then makes it network safe. | |
## End defining constants ## | |
## Parse filename ## | |
$filename = LOG_URL.$filename.'.log.txt'; | |
## |
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 | |
// Input must be a number | |
if(is_numeric($input)){ | |
echo 'Input is a number'; | |
} else { | |
echo 'Input is not a number'; | |
} | |
// Input can only contain numbers and letters. | |
if(preg_match('/([^A-z0-9])/', $input)){ |
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 # File created on 11th February 2009 by Mike Rogers (http://www.fullondesign.co.uk/). | |
## Start defining constants ## | |
define(RUN_ERRORS, TRUE); // Do you want the script to display errors? TRUE = yes you do. | |
define(redirect_or_echo, 'redirect'); // Do you want to redirect the user to another website, or just echo the other other webpages' content. 'rediect' will redirect, 'echo' will return the web pages constents. I recommend redirect. | |
## End defining constants ## | |
/* Start the link codes. The code is the ?code=123 part of the URL. The array should be fotmatted like: | |
$link['code'] = 'http://URL'; | |
You may find it easier to do this with MySQL or including this as a seperate file. Too many links could lower performance, but for a small website just trying to cloak a few links this is good :) |
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
Options -Indexes | |
Options -ExecCGI | |
AddHandler cgi-script .php .php3 .php4 .phtml .pl .py .jsp .asp .htm .shtml .sh .cgi |
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 | |
echo file_get_contents('http://tinyurl.com/api-create.php?url='.'http://www.example.com/'); | |
/* For example | |
http://tinyurl.com/api-create.php?url=http://www.fullondesign.co.uk/ | |
Would return: | |
http://tinyurl.com/d4px9f | |
*/ | |
?> |
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 | |
# Start by Defining everything the code needs to talk to facebook. Facebook provides these when you sign up. | |
define(YOUR_API_KEY, ''); | |
define(YOUR_SECRET_CODE, ''); | |
// Include the facebook API PHP classes. | |
require_once('facebook.php'); | |
// Connect to facebook | |
$facebook = new Facebook(YOUR_API_KEY,YOUR_SECRET_CODE); |
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 # File created on 25th April 2009 by Mike Rogers (http://www.fullondesign.co.uk/). | |
## Start defining constants ## | |
define(LOG_URL, '/home/user/download_logs/'); // Put the location of where you want to put the logs. Make sure this is absolute | |
# $_GET['ID'] – this is the ID of the file we want. It gets the value from the URL. | |
## Now set the data you wish to use – this can be moved to an include if you want ## | |
$file[0] = 'http://www.example.com/file.pdf'; | |
## Define the functions required to update the file. |
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
FileETag none # Turn off eTags | |
<IfModule mod_expires.c> # Check that the expires module has been installed | |
ExpiresActive On | |
ExpiresDefault "access plus 10 years" | |
ExpiresByType image/gif "access plus 10 years" | |
ExpiresByType image/jpeg "access plus 10 years" | |
ExpiresByType image/png "access plus 10 years" | |
ExpiresByType text/css "access plus 10 years" | |
ExpiresByType text/html "access plus 1 seconds" | |
ExpiresByType text/javascript "access plus 10 years" |
OlderNewer