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 | | 571 Viewer | Category : PHP
READ MORE

    CRUD (Create Read Update Delete) Example in Laravel 5.2 from Scratch

    CRUD (Create Read Update Delete) Example in Laravel 5.2 from Scratch

    Open Post

    Solved - Access Not Configured. Google+ API (truncated...) on google console developer

    Solved - Access Not Configured. Google+ API (truncated...) on google console developer

    Open Post

    How to retrieve number of twitter followers count without authentication or api ?

    How to retrieve number of twitter followers count without authentication or api ?

    Open Post

    Laravel 5 - Barcode generator example using milon/barcode package

    Laravel 5 - Barcode generator example using milon/barcode package

    Open Post

    How to add multiple markers in google map

    How to add multiple markers in google map

    Open Post

    How to add CKEditor with image upload using KCFinder in PHP Example Code?

    How to add CKEditor with image upload using KCFinder in PHP Example Code?

    Open Post