This is an important message requiring you to make a choice if you're based in the EU.
PHP does not have a special undo for what you delete from anywhere. Get an example of how to remove files from folder permanently using PHP.
PHP mail is the built in PHP function that is used to send emails from PHP scripts. See an example of how to send mail via PHP.
There are some ways to validate a URL via PHP. See an example of how to validate a URL via PHP with the help of preg_match regular expression.