diff options
Diffstat (limited to 'html/public/fruitvote/GoPage.php')
-rw-r--r-- | html/public/fruitvote/GoPage.php | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/html/public/fruitvote/GoPage.php b/html/public/fruitvote/GoPage.php index 27fc361..864c1f7 100644 --- a/html/public/fruitvote/GoPage.php +++ b/html/public/fruitvote/GoPage.php @@ -4,28 +4,19 @@ class GoPage { private $socket; private $template; - public function __construct($page, $socket = "/home/simponic/fruitvote/http.sock", $start_cmd="/home/simponic/fruitvote/start.sh", $template = "../template.html") { + public function __construct($page, $socket = "/home/simponic/fruitvote/http.sock", $template = "../template.html") { $this->page = $page; $this->socket = $socket; $this->template = $template; - // test if socket exists - if (!file_exists($socket)) { - // start the server - exec($start_cmd); - } - for ($i = 0; $i < 10; $i++) { if (file_exists($socket)) { break; } usleep(100_000); // wait 100ms } - - if (!file_exists($socket)) { - throw new Exception("Could not start server"); - } } + public function go() { $ch = curl_init(); $url = "http://localhost".$this->page; |