setup a 'proxy'
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Elizabeth Hunt 2024-03-09 17:55:58 -07:00
parent 19649ea71d
commit 2c4b0cf6c4
Signed by: simponic
GPG Key ID: 52B3774857EB24B1

View File

@ -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);
?>