-
- $url="http://XXXXX/article/012.html";
- $content=file_get_contents($url); //Read the article page source code
- if(preg_match("/img/" ){
- echo "Picture detected";
- }else{
- echo "Picture not found";
- }
-
Copy code
But to be honest, this method of judgment is too far-fetched
For examples of determining whether there are pictures in an article, please refer to the following article:
- php preg_match_all matches pictures in articles
- How to use php to process images in articles
- How to filter pictures in articles using PHP regular rules
- php uses preg_match_all to match pictures in articles
|