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 | |
/* | |
How to use | |
/940x278 | |
/940x278/000000 | |
/940x278&text=Texto | |
/940x278/000000&text=Texto | |
RewriteEngine On |
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> | |
<head> | |
<!--Little CSS fade in --> | |
<style> | |
.fade-in{ | |
-webkit-animation: fade-in 2s ease; | |
-moz-animation: fade-in ease-in-out 2s both; | |
-ms-animation: fade-in ease-in-out 2s both; | |
-o-animation: fade-in ease-in-out 2s both; |
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
<html> | |
<head> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script> | |
<link href="rotate.css" rel="stylesheet" type="text/css" /> | |
<script type="text/javascript" src="rotate.js"></script> | |
<script type="text/javascript"> | |
$(window).load(function() { | |
startRotator("#rotator"); | |
}) | |
</script> |
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
LOWER(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(TRIM('My String'), ':', ''), ')', ''), '(', ''), ',', ''), '\\', ''), '\/', ''), '\"', ''), '?', ''), '\'', ''), '&', ''), '!', ''), '.', ''), ' ', '-'), '--', '-'), '--', '-')) AS `post_name` |
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
function CleanUp_Cache_Folder(){ | |
## Automatic cleanup Cache folder | |
$cache_folder = 'cache/'; | |
$file_type = '*.mp3'; | |
$files = glob($cache_folder.$file_type); | |
$time = time(); | |
foreach ($files as $file) | |
if (is_file($file)) | |
if ($time - filemtime($file) >= 60*60*24*1) // 1 days |
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
# -----------------------Force https---------------------------------------------------------- | |
RewriteEngine On | |
# This will enable the Rewrite capabilities | |
RewriteOptions InheritDownBefore | |
# This prevents the rule from being overrided by .htaccess files in subdirectories. | |
RewriteCond %{HTTPS} !=on | |
# This checks to make sure the connection is not already HTTPS |
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
//Create a File | |
$my_file = 'file.txt'; | |
$handle = fopen($my_file, 'w') or die('Cannot open file: '.$my_file); //implicitly creates file | |
//Open a File | |
$my_file = 'file.txt'; | |
$handle = fopen($my_file, 'w') or die('Cannot open file: '.$my_file); //open file for writing ('w','r','a')... | |
//Read a File | |
$my_file = 'file.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
wget http://akamaras.com/bench.sh | |
sh bench.sh |
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 (!empty($_SERVER['HTTP_CLIENT_IP'])) { | |
$ip = $_SERVER['HTTP_CLIENT_IP'];} | |
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { | |
$ip = $_SERVER['HTTP_X_FORWARDED_FOR']; | |
} else { | |
$ip = $_SERVER['REMOTE_ADDR']; | |
} | |
$url = "http://api.wipmania.com/".$ip; | |
$country = file_get_contents($url); //ISO code for Nigeria it is NG check your country ISO 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
Header unset Cookie | |
Header unset Set-Cookie |
OlderNewer