Functions
WebDev/*nix assorted functions & hacks
Search
find all
Array
-
Bash
-
Classes
-
Config
-
DateTime
-
Debug
-
dotjs
-
File
-
foooo
-
Git
-
HTML
-
Images
-
Javascript
-
Linux
-
Math
-
Misc
-
MySQL
-
OS X
-
Reading
-
Redis
-
Shell scripts
-
snippets
-
SQL
-
Strings
-
TextMate
-
Web
-
\(^o^)/ Fun!
-
_Misc hacks
-
_Pages
Misc
* Readme
** Meta: todo
bash colors. thing.
getset($key, $val=null)
get_vars_from_file($file)
googlinks($links, $total, $return=0)
header_404()
return_bytes($val)
valid_email($address)
9
found
auth
Name:
Category: Misc
Body:
// .. It saves keystrokes. //________________________ // valid_email($address) / function valid_email($address) { return filter_var($address, FILTER_VALIDATE_EMAIL); } // or for older php servers.. //________________________ // valid_email($address) / function valid_email($address) { return preg_match("/^[A-Za-z0-9_+-]+([\.]{1}[A-Za-z0-9_+-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(\.[A-Za-z0-9]{2,6})+$/", $address); } //_____________________________ // valid_telephone($telefoon) / function valid_telephone($telefoon) { return strlen(preg_replace('/\D/', '', $telefoon)) > 9; }
Footer