Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php check if link exists

function check_link_existency($url) {

  // Use get_headers() function
    $headers = @get_headers($url);

    // Use condition to check the existence of URL
    if ($headers && strpos($headers[0], '200')) {
        echo "URL Exist";
        return true;
    } else {
        echo "URL Doesn't Exist";
        return false;
    }
}
Comment

PREVIOUS NEXT
Code Example
Php :: magento 2 get number of cart items 
Php :: laravel Please provide a valid cache path 
Php :: operators in php 
Php :: laravel log query for model 
Php :: wordpress get product category name by termid 
Php :: wordpress remove taxonomy from post 
Php :: generate unique order id in php 
Php :: laravel migrations generator laravel 
Php :: a php session was created by a session_start() 
Php :: laravel count distance lat/longtidue 
Php :: json stringify to php array 
Php :: php find if string contains words from list index 
Php :: how to sort with array and after print by for loop in php 
Php :: https://www.60d48b1061adf.site123/wp-login.php 
Php :: laravel file store 
Php :: get user auth in laravel 
Php :: php move element to beginning of array 
Php :: create symfony 4 project 
Php :: Uncaught ReferenceError: commonL10n is not defined 
Php :: php laravel dump 
Php :: what is abstract class in php 
Php :: if user name is wordpress 
Php :: laravel faker select between options 
Php :: Redirect to a specific html element - Laravel 
Php :: php check if valid xml 
Php :: laravel model uploaded file name 
Php :: drupal get node id from twig 
Php :: Woocommerce get image galleries by product id 
Php :: vs code php tag shortcut 
Php :: laravel 8 with jetstream 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =