Subscribe To Our Newsletter

Sign Up Now To Get SEO and Programming Tips

We Hate Spam! Really, It's terrible and we never do it.

PHP | Website Validation Function


php validation function

PHP | Website Validation Function

Could you clarify what type of website validation function you need in PHP? Are you looking for:

URL validation (checking if a URL is valid)
Domain validation (checking if a domain exists)
Form input validation (ensuring users enter a valid website in a form)
Server-side HTTP status check (checking if a website is online or returning a specific response)

Let me know your specific requirement, and I'll provide you with a proper PHP validation function!

function validate_web($input_web)
   {  
   $input_web = preg_match("/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]/i", $input_web);
   $input_web = trim($input_web);  
            $input_web = htmlspecialchars($input_web);  
            $input_web = stripcslashes($input_web);
   return $input_web;
   }

Share this article :

Post a Comment

Give your reviews about this blog. Leave your comments. what do you think about this post?

Comments Description is given below:
1) I love to read comments, but do not spam.
2) Like this blog and also tweet its posts.
3) You can use some xHTML tags.
4) All Comments are Do Follow, Please try to use blog professionally.
5) Mention Your Name below the comment.
6) You can also suggest for improvement.
7) Do not forget to subscribe FusionMarketPro.online blog.

---------------------------------------
Thanks for visiting FusionMarketPro.Online.
==========================================
Join Sami Jeweller and Shop online jewelry for your someone special.
==========================================
Best Regards

 
Copyright © 2013-2016. Samee Articles - All Rights Reserved
Proudly powered by Blogger