forked from napengam/phpWebSocketServer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestWithWebSocket.php
More file actions
42 lines (41 loc) · 1.74 KB
/
testWithWebSocket.php
File metadata and controls
42 lines (41 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WebClient</title>
</head>
<body>
<b>Status: <span id='connect' style="font-size:1.2em">not connected</span></b><p>
<button style="display:inline-block" id="open" >Connect to Server</button>
<button id="close" >Close connection</button><p>
<div style="border:1px solid black;display:inline-block">
<button id="ajax" >CALL Backend via AJAX</button> Here you will see feedback from backend : <b><span id='feedback'></span> </b>
</div><p>
<div style="border:1px solid black;display:inline-block">
<button id="echo" >Echo message</button> Here you will see echo : <b><span id='echomsg'></span> </b>
</div><p>
<!-- <div style="border:1px solid black;display:inline-block">
<button id="ping" >Ping me</button> <b><span id='pingmsg'></span> </b>
</div>-->
<hr>
<button id="ready" >Talk to others; my UUID=<b><span id='uuid'></span></b> </button>
<div id="broadcast">
<b>Messages from other web clients:</b><br>
</div>
<?php
include '../include/adressPort.inc.php';
/*
* ***********************************************
* globals for the client module socketWebClient.js
* ***********************************************
*/
echo "<script>"
. "server='$Address';"
. "port='$Port';"
. "</script>";
?>
<script src="socketWebClient.js"></script>
<script src="startWebClient.js"></script>
</body>
</html>