The Send POST request has the following data content in request
Interface instance:
http://199.199.99.199:8080/cloudTVPlatform/external/api?act=notifyNewDeveloper&PID=CloudTVDN&pversion= 1.0&format=json
Request Method: POST
Request URL Parameter Description:
Act: Type of operation, Notifynewdeveloper, must
Pversion: protocol version, default = 1.0
PID: Partner Code PID, fill in Cloudtvdn, must
Format: Data formats returned, XML and JSON supported, JSON by default
Notification data (POST data) instance
The POST request takes the parameter data content in request in the following
{
"Developercount": 2,
"Data": [
{
"Originalid": "123",
"Developername": "Liux",
"Developertype": "Personal",
"Truename": "Liu",
"Email": "[email protected]",
"Phone": "86-10-62565615-208",
"Mobile": "86-13900000000",
"Fax": "86-10-62565615-208",
"Ecurl": "Http://DNS/123.JPG",
"Crurl": "",
"Cturl": "",
"Registertime": "2014-04-02 14:14:19"
},
{
"Originalid": "124",
"Developername": "Liux1",
"Developertype": "Company",
"Truename": "Baidu",
"Email": "[email protected]",
"Phone": "86-10-62565615-208",
"Mobile": "86-13900000000",
"Fax": "86-10-62565615-208",
"Ecurl": "Http://DNS/124.JPG",
"Crurl": "Http://DNS/125.JPG",
"Cturl": "Http://DNS/126.JPG",
"Registertime": "2014-04-02 14:14:19"
}
]
}
Return Data:
Return Data format: JSON
To return an instance:
{
"ResultCode": "Success",
"Resultmessage": "Successful Processing"
}
That is the interface provided by the client, and I am on the server side I call this interface, and then use post to his data content, this should do? I am a novice ~ ~ ~
------Solution--------------------
References:
Quote: References:
PHP uses the curl extension to simulate post submissions. Reference Code
}
And then how to invoke it?
$data = Json_encode (Array (the data array you want to send));
$rs = Curl_post ("http://199.199.99.199:8080/cloudTVPlatform/external/api?act=notifyNewDeveloper&PID= Cloudtvdn&pversion=1.0&format=json ", $data);