Search
 
SCRIPT & CODE EXAMPLE
 

PHP

check if a string is url or not php

<?php
  if(filter_var($imagePath, FILTER_VALIDATE_URL) === FALSE){
      echo "Not valide URL";
  }else{
      echo "valide URL";
  }
Comment

php check if string contains url

preg_match('/(http|ftp|mailto)/', $string, $matches);
var_dump($matches);
Comment

PREVIOUS NEXT
Code Example
Php :: php get all the mondays of the year 
Php :: how can get url from $request in laravel 
Php :: laravel deployment 
Php :: laravel s3 presigned url 
Php :: codeigniter 3 Configured database connection has cache enabled 
Php :: rtl file manager laravel 
Php :: wordpress disable posts 
Php :: laravel migrate specific file 
Php :: laravel with trashed 
Php :: Latest 5 records - Laravel 
Php :: wp do sql query from function 
Php :: CORSS oauth/token lavarel 
Php :: laravel optimize 
Php :: laravel blade short if 
Php :: laravel 5.4 forelse 
Php :: wordpress wp_head 
Php :: php remove last character from string if comma 
Php :: pdo fetchall as object 
Php :: laravel dusk run failed tests 
Php :: for i php 
Php :: echo session 
Php :: php get domain name with https 
Php :: required field in laravel admin 
Php :: href in laravel view 
Php :: laravel excel set cell height 
Php :: php json request get value 
Php :: guzzlehttp php basic auth 
Php :: php max value in associative array 
Php :: wordpress get perma link 
Php :: woocommerce get user id by email 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =