Now there is such a demand, as shown in the picture
This is the information I returned through the form post order number and key to a logistics company interface. How can I use php or jquery to read the above time, status and other information, and then display it on another html page? ? urgent! ! !
Now there is such a demand, as shown in the picture
This is the information I returned through the form post order number and key to a logistics company interface. How can I use php or jquery to read the above time, status and other information, and then display it on another html page? ? urgent! ! !
http://www.runoob.com/php/func-simplexml-load-string.html
http://www.w3school.com.cn/jquery/ajax_ajax.asp
---Update---
If you cannot submit it to the logistics website directly using ajax (jsonp is almost never supported, so it is impossible to submit it.)
Use the form to submit it to your own PHP program. The PHP program constructs the request content, curls the request to the logistics website, receives the returned XML, and parses it.
Or if the interface of the logistics website supports asynchronous return of results, it is also possible.
You want to ask how to send HTTP request using PHP
<code>function send_post($url, $post_data) { $postdata = http_build_query($post_data); $options = array( 'http' => array( 'method' => 'POST', 'header' => 'Content-type:application/x-www-form-urlencoded', 'content' => $postdata, 'timeout' => 15 * 60 // 超时时间(单位:s) ) ); $context = stream_context_create($options); $result = file_get_contents($url, false, $context); return $result; }</code>
The above return value is the above xml content. If I don’t know the specific interface, I can’t write an example.
Forget about jQuery, it is a cross-domain interface and does not support jsonp
It is recommended to use PHP for processing: PHP processing XML