PHP Detecting if source image url link leads to a “broken” image?

前端 未结 8 1612
迷失自我
迷失自我 2020-12-30 03:56

Suppose you have a thumbnail generator script that accepts source images in the form of a URL. Is there a way to detect if the source URL is \"broken\" - whether nonexistent

8条回答
  •  北荒
    北荒 (楼主)
    2020-12-30 04:38

    did you try file_get_contents() method?

    http://php.net/manual/en/function.file-get-contents.php

提交回复
热议问题