1234567891011121314151617181920212223242526272829 |
- <?php
- //$key = '6a7bdbaa-6bc1-4159-a2f4-07a13c8907d1';
- //$url = '62.141.88.61:8085/Thingworx/Things/connSmoppLibrary/Services/get_employee_status';
- $url = "http://127.0.0.1:8545";
- $jsonEncoded = '
- {"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0xe757132e564f270fff79fff81510f83f86ceecbe567014f70cf278137cb57d60"],"id":1}
- ';
- //$jsonEncoded = json_encode(['dateTime' => , 'kind'=> 3, 'diagnosticCard' => '123e4567-e89b-12d3-a456-426655440000', 'subnumber' => '23456787', 'number'=> '34', 'series'=> '2']);
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, $url);
- curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-Type: application/json","Accept: application/json","appKey: " . $key));
- curl_setopt($curl, CURLOPT_TIMEOUT, 20);
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($curl, CURLOPT_POST, 1);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $jsonEncoded);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- $result = curl_exec($curl);
- echo $result;
- curl_close($curl);
- ?>
|