-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrtx.php
More file actions
35 lines (25 loc) · 730 Bytes
/
Copy pathrtx.php
File metadata and controls
35 lines (25 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
function rtx_post($url, $post_data) {
$postdata = http_build_query($post_data);
$options = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type:application/x-www-form-urlencoded',
'content' => $postdata,
'timeout' => 15 * 60
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
return $result;
}
$msg = iconv('UTF-8', 'gbk', $_GET['msg']);
$post_data = array(
'sender' => 'robot',
'pwd' => 'robot',
'receivers' => 'julian',
'msg' => $msg,
'sessionid' => '123123'
);
$rep = rtx_post('http://192.168.172.2:8012/SendIM.cgi', $post_data);
echo $rep;