This file contains hidden or 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 | |
for ($x = 0; $x <= 10; $x++) { | |
echo "The number is: $x <br>"; | |
} | |
?> |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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 | |
$post_exp = $_POST['post_exp']; | |
/* | |
expire codes | |
0 = never expire (not used in switch) | |
1 = 10 mins | |
2 = 1 hour | |
3 = 1 day | |
4 = 1 month | |
*/ |
This file contains hidden or 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="email@thisemailisnotvaild.com"; | |
if (isValidEmail($email)) | |
{ | |
echo "Hooray! Adress is correct."; | |
} | |
else | |
{ | |
echo "Sorry! No way."; | |
} |
This file contains hidden or 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
# Current .htaccess file (07-25-14) | |
Options +FollowSymLinks | |
RewriteEngine ON | |
RewriteCond %{HTTP_HOST} ^127.0.0.1 | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule (.*) http://domain.com/pbclone/post.php?pid=$1 [R=301,L] | |
# raw format | |
RewriteRule ^raw/([^/.]+)/?$ /pbclone/raw/raw.php?rid=$1 [L] | |
# users profiles |
This file contains hidden or 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 | |
// don't timeout | |
set_time_limit (0); | |
// set some variables | |
$host = "127.0.0.1"; | |
$port = "5552"; | |
// create socket | |
$socket = socket_create(AF_INET, SOCK_STREAM, 0) or die("Could not create socket\n"); |