To an XML format and a server address, how to write interfaces in PHP
Source: Internet
Author: User
To an XML format and a server address, how to write an interface with PHP
I am writing recently, I do not know how Daniel will write, want to learn
^............
------Solution--------------------
What's the interface for?
------Solution--------------------
This is the commit data, the invocation is simple, direct fso_get_contents, and then parse the XML on the line
$url = "Https://xxx.com/xml";
Apply the XML to our curl call
curl_setopt ($ch, Curlopt_post, 1);
curl_setopt ($ch, Curlopt_postfields, $xmlcontent);
$data = curl_exec ($ch);
if (Curl_errno ($ch)) {
Die (' Meeting information error, it's possible the meeting hasn't started yet! ');
Exit
} else {
Show me The result
Var_dump ($data);
Curl_close ($ch);
}
------Solution--------------------
discuss
What's the port of PHP? Is it a male or a female?
Is the public study data
It's the mother. Output XML for others to analyze
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.