Php verifies whether a page contains a specific content. how can this problem be solved?

Source: Internet
Author: User
Php verifies whether a page contains a specific content. it is used to make a submission form, submit multiple URLs to php for processing, and determine whether the content of this URL contains a specific sentence. compare the URL with the url in the database to check whether the url exists in the database. the pop-up prompt for both matches is passed. the prompt for non-conformances fails. can you help me with PHPcode? you can put the website in your data into a php file to verify whether a page contains a specific content?
It is to make a submission form, submit multiple URLs to php for processing, and determine whether the content of this URL contains a specific sentence. compare the URL with the url in the database to check whether the url exists in the database. the pop-up prompt for both matches is passed. the prompt for non-conformances fails.
Can you help me?

------ Solution --------------------
PHP code
You can put the URLs in your data into an array. Suppose it is $ arrif (strpos (file_get_contents ($ _ POST ['URL']), 'specific sentence ')! = False & in_array ($ _ POST ['URL'], $ arr) {echo 'passed';} else {echo "failed ";}
------ Solution --------------------
Yes?

Print_r ($ _ POST); check whether data exists.

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.