summaryrefslogtreecommitdiff
path: root/html/public/index.php
blob: 3ed5805de7b2c863e1b95efb039cf52db090762c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
// todo: startup go program if not started. use low cpu priority.

$ch = curl_init();

$url = "http:/localhost";
$unix = "/home/simponic/http.sock";

if (defined('CURLOPT_UNIX_SOCKET_PATH')) {
    curl_setopt($ch, CURLOPT_UNIX_SOCKET_PATH, $unix);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    $response = curl_exec($ch);
	echo $response;
}

curl_close($ch);
?>