tilde.club/html/public/index.php
Elizabeth Hunt 2c4b0cf6c4
All checks were successful
continuous-integration/drone/push Build is passing
setup a 'proxy'
2024-03-09 17:55:58 -07:00

20 lines
420 B
PHP

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