Gold data is an online form authoring tool that is powerful and provides developers with a gold data development platform
Now share the PHP language request gold Data interface method according to own development experience
The development platform provides the following two main interfaces (where APIKEY,Apisecret from the Personal Center), and interfaces are based on HTTP Basic authentication
First, get a form interface (a form ID is known to get the fields it contains by ID)
The reference code is as follows:
$url = ' https://APIKEY:apisecret@jinshuju. net/api/v1/forms/'. FORMID; $res file_get_contents ($url); return json_decode ($res,true);
Ii. Fill out a form (known as a form ID and field list)
The reference code is as follows:
$url= ' https://APIKEY:apisecret @jinshuju. net/api/v1/forms/'.FORMID;$data=Array( ' Field_1 ' = ' xxx ', ' field_4 ' and ' xxx ',);$query=Http_build_query($data);$options[' http '] =Array( ' Timeout ' =>30, ' method ' = ' POST ', ' header ' = ' content-type:application/x-www-form-urlencoded ', ' Content ' =$query);$context=stream_context_create($options);$result=file_get_contents($url,false,$context);returnJson_decode ($result,true);
Gold Data Form Interface Request (PHP)