Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Emu_status {
- public $host;
- public $port;
- public $emusocket;
- public function __construct(){
- $this->host = '127.0.0.1';
- $this->port = 30000;
- $this->emusocket = fsockopen($this->host, $this->port, $errno, $errstr, 10);
- }
- public function emu_ist_an(){
- if($this->emusocket){
- return true;
- }
- return false;
- }
- }
- $emu_status = new Emu_status;
- if($emu_status->emu_ist_an() == true){
- # Der Emulator ist geöffnet
- } else {
- # Der Emulator ist nicht geöffnet
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement