URL Exist or Not Exist Check PHP

Posted By TimesCoding Staff | June 9, 2022 | PHP

We can easily check a given URL or Link is active or not. By using below PHP function we can easily get whether the given URL is active or not active.



$array = get_headers($url);
$string = $array[0];
    echo 'URL Exist';
    echo 'URL does not exist';

Author: TimesCoding Staff

TimesCoding Staff is a member of the team, and an expert in HTML, CSS, JavaScript, PHP, Ajax, and WordPress theme development.

Read Next