diff options
Diffstat (limited to 'html')
-rw-r--r-- | html/public/index.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/html/public/index.php b/html/public/index.php index eee4f27..3ed5805 100644 --- a/html/public/index.php +++ b/html/public/index.php @@ -1,3 +1,19 @@ <?php -echo "hai :3" +// 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); ?> |