Validating emails with php
Sanitizing and validating email syntax $email = $_POST['email']; //getting the posted email //sanitizing the email using FILTER_SANITIZE_EMAIL //removes all illegal e-mail characters from a string $email=filter_var($email, FILTER_SANITIZE_EMAIL); //validating the email using FILTER_VALIDATE_EMAIL //validates e-mail returning true if valid and false if invalid (filter_var($field,
Read MoreLeave a CommentSending emails with php
Set up the variables: $to = "email@address.com"; //where the email will go $subject = "Our Subject"; //the subject $message = "The message to send"; //the message $from = "you@email.com"; //from email $header = "From: $from"; //header including the from email Sending the email: mail($to, $subject, $message, $header); //send the email Sending the email and
Read MoreLeave a CommentTernary Conditionals
I know most of you allready use them, but there are still people that don`t know about them, so to make the following tutorials easyer, I`ll do a small example. First of all you must know that all you will see here is a simpler way to write not so complex if statements. Traditional way: if (condition) { echo "true"; } else { echo "false"; } The shorter way: echo
Read MoreView Comments (1)YouTube one click video download
As you know, if you add "&fmt=18" at the end of a YouTube video url you can watch it in higher resolution if available. Normal YouTube url: http://www.youtube.com/watch?v=ckKFxMw6z0c High resolution YouTube url: http://www.youtube.com/watch?v=ckKFxMw6z0c&fmt=18 This also means that you can download the videos in the same high quality, but as mp4 in stead of flv. To download in
Read MoreView Comments (1)Free youtube video downloader script
Here`s a free php youtube video downloader script. It can be integrated in wordpress or any other site that uses php. You can use it as by linking to yoursite/youtube.php or by including it with a iframe. To include it with a iframe you have to upload youtube.php to your blog and then go to the wp-admin and create a new post or page. Put the following code there: <iframe
Read MoreView Comments (11)




