How to send data to an external Web site to query and return the results of an external Web site query
Source: Internet
Author: User
How to send data to an external Web site to query and return the results of an external Web site query
For example Express http://www.kuaidi100.com/This website, it can be the user in this website to enter the courier number sent to The courier company's website for inquiries, and The courier company website query results returned to the site.
This is generally through what technology to achieve Ah, is the AJAX technology, or PHP in the Curl technology, I think it is very magical, because it does not need to query the verification code is not required input. Is there any great God who can elaborate on the principle, or give me a sample source program, please?
------to solve the idea----------------------
I think it should be an API call, thank you.
------to solve the idea----------------------
Take a look at the API section for yourself.
------to solve the idea----------------------
If the API is not available on other sites
Only use curl to crawl, and then use the regular match to the content you need it
Now that you're using curl, there's no need to convert to JSON.
It is best to grab the necessary resources to their own server to save, and then call, if the dynamic to crawl a lot of time
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.