-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinfo.php
More file actions
executable file
·39 lines (30 loc) · 840 Bytes
/
info.php
File metadata and controls
executable file
·39 lines (30 loc) · 840 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
36
37
38
39
<?php
// phpinfo();
if( $_POST['lang']) {
$lang = $_POST['lang'];
// English
$url = 'image.eecs.yorku.ca:20541';
if ($lang == "Spanish"){
$url = 'image.eecs.yorku.ca:20542';
} elseif ($lang == "Chinese"){
$url = 'image.eecs.yorku.ca:20543';
}
$fields = array(
'mode' => $_POST['mode'],
'text' => $_POST['text'],
'lang' => $_POST['lang']
);
// build the urlencoded data
$postvars = http_build_query($fields);
// open connection
$ch = curl_init();
// set the url, number of POST vars, POST data
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, count($fields));
curl_setopt($ch, CURLOPT_POSTFIELDS, $postvars);
// execute post
$result = curl_exec($ch);
// close connection
curl_close($ch);
}
?>