Commit e494e435 authored by 梁俊杰's avatar 梁俊杰

1

parent 3a242e2d
<?php
/**
* Created by PhpStorm.
* User: 梁俊杰
* Date: 2019/12/02
* Time: 15:16
* Description:
*/
$header[] = "Content-Type: application/json;charset=utf-8";
$sendData = json_encode([
'assignedTo'=>'liangjunjie',
'text'=>'111'
]);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://dingding.test.huaperfect.com/index.php');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_NOSIGNAL, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POSTFIELDS, $sendData);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$result = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$error = curl_error($ch);
curl_close($ch);
......@@ -12,7 +12,9 @@ include_once 'vendor/autoload.php';
include "sdk/TopSdk.php";
$data = json_decode(file_get_contents('php://input'), true);
$f = fopen("./txt/test.txt", "a");
fwrite($f, print_r($_REQUEST,true));
fclose($f);die();
$users=[
'liangjunjie'=>['userid'=>'5360236526369319','name'=>'梁俊杰'],
'jiangkebao'=>['userid'=>'016740060622772430','name'=>'姜克保'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment