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

    laravel 5.4 New Feature - Add eloquent whereKey method

    laravel 5.4 New Feature - Add eloquent whereKey method

    Open Post

    How to create quick apache virtual host in Ubuntu?

    How to create quick apache virtual host in Ubuntu?

    Open Post

    How to use sweetalert message box in laravel 5?

    How to use sweetalert message box in laravel 5?

    Open Post

    PHP - File upload progress bar with percentage using form jquery example

    PHP - File upload progress bar with percentage using form jquery example

    Open Post

    Bootstrap daterangepicker example code with demo using daterangepicker.js

    Bootstrap daterangepicker example code with demo using daterangepicker.js

    Open Post

    Mailgun setup with Laravel 5 example

    Mailgun setup with Laravel 5 example

    Open Post