Question : check if the link is image or url php
Answered by : splendid-stoat-wyg10kuj7db2
$headers = get_headers('https://media.giphy.com/media/BvvBz8BnRqZOg/giphy.gif', 1);
if (strpos($headers['Content-Type'], 'image/') !== false) { echo "Work";
} else { echo "Not Image";
}
Source : https://stackoverflow.com/questions/40694640/php-check-if-link-is-image-and-check-if-exists | Last Update : Thu, 09 Dec 21