How can I check that a link is automatically added to an article? -Php Tutorial

Source: Internet
Author: User
How can I check that a link is automatically added to an article? I think it is impossible to use the existing resources on the Internet and the difficult points... that is, the content may also need to filter the image and video URL (iframe)

I used the following sections for automatic detection.

But the problem is that sometimes the image

The video is displayed in iframe mode.

So I would like to ask how I can take an Image () film () Filter such items (skip and ignore) </strong> <br/> The $ content obtained is already HTML code. <br/> <pre class = "sycode" name =" code "> $ content = preg_replace_callback ('#(? : Https? : // \ S +) | (? : Www. \ S +) | (? : \ S + \. \ S +) # ', function ($ arr) {if (strpos ($ arr [0], 'http ://')! = 0) {$ arr [0] = 'http ://'. $ arr [0] ;}$ url = parse_url ($ arr [0]); // links return sprintf ('% 1 $ s ', $ arr [0]) ;}, $ content); </pre> <p> </p> <br/> reply to the discussion (solution) <p class = "sougouAnswer">? Exam: http://blog.baiwand.com /? Post = 150 </p> <p class = "sougouAnswer"> <p class = "yy"> Reference: http://blog.baiwand.com /? Post = 150 </p> Thanks <br/> for learning the key points <br/> Originally, we had to mark the key and then process it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.