« Back to profile of Yacin

  • php

    التحقق من رابط

    دالة بسيطة للتحقق من رابط أدا كان صحيحا أم لا

    05:19 Aug 19 2010 | Tags : URL,VALIDATION,
    						$url = 'http://example.com';
$validation = filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_HOST_REQUIRED);

if ( $validation ) $output = 'proper URL';
else $output = 'wrong URL';

echo $output;    			         

    1 comments

  • Dante says :

    Thanks you used filter

Add comment
To add a comment, please : Login or Sign up
    Yacin
    The Ycn
    • Biography مصمم و مطور مواقع .. و هاوي تعلم برمجة !!

    • View full profile »
  • New visitor?

    On setCode, you can save your codes, functions and classes, you can also share them with your friends, and track your favorite developer

    Join the SetCode community
  • Your language here :