Tag : FILTER_VALIDATE_URL


How to check if string is URL or not in PHP?

Sometimes, we require to check the given argument or string is URL or not, as specially i did need to check image column is url or not like i give you example how to do this. If you also need to do this then you can use filter_var(). <strong>Example:</strong> <pre class="prettyprint lang-php"> if(filter_var($imagePath, FILTER_VALIDATE_URL) === FALSE){ print_r("Not valide URL"); }else{ print_r("valide URL"); } </pre>

By Hardik Savani | April 18, 2016 | | 1084 Viewer | Category : PHP
READ MORE

    Laravel 5 - generate PDF from html view file and download using dompdf

    Laravel 5 - generate PDF from html view file and download using dompdf

    Open Post

    How to use login throttle in laravel 5?

    How to use login throttle in laravel 5?

    Open Post

    How to get current month records in Laravel 5?

    How to get current month records in Laravel 5?

    Open Post

    AngularJS - How to render HTML value in ng-repeat ?

    AngularJS - How to render HTML value in ng-repeat ?

    Open Post

    How to disable model timestamps in Laravel 5.3?

    How to disable model timestamps in Laravel 5.3?

    Open Post

    Bootstrap - maxlength validation with count remaining character example

    Bootstrap - maxlength validation with count remaining character example

    Open Post