{"id":1018,"date":"2020-06-08T22:02:46","date_gmt":"2020-06-08T22:02:46","guid":{"rendered":"https:\/\/html5-chat.com\/blog\/?p=1018"},"modified":"2020-10-28T20:19:53","modified_gmt":"2020-10-28T20:19:53","slug":"integrate-html5-chat-with-chameleon-software-online","status":"publish","type":"post","link":"https:\/\/html5-chat.com\/blog\/integrate-html5-chat-with-chameleon-software-online\/","title":{"rendered":"Integrate HTML5 chat with chameleon software online"},"content":{"rendered":"\n<p>Here is the step to integrate html5 chat with <a href=\"https:\/\/www.chameleonsoftwareonline.com\/\">https:\/\/www.chameleonsoftwareonline.com\/<\/a><\/p>\n\n\n\n<p>Create html5chat.php on root and paste there this code:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php\nif (empty($_GET['cmd']) || $_GET['cmd'] != 'lang')\n    $area = \"login\";\ninclude(\".\/_include\/core\/main_start.php\");\ninclude(\".\/_include\/current\/menu_section.class.php\");\n$_GET['display'] = get_param('display', User::displayProfile());\n$where = ' u.user_id = ' . to_sql(guid(), 'Number');\n$webmasterid = xxxxx;\n$password = \"yyyyyy\";\n$id = $GLOBALS['g_user']['user_id'];\n$avatars = <em>glob<\/em>(\"_files\/photo\/\" . $id . \"_*_m.jpg\");\n$avatar = (<em>count<\/em>($avatars)) ? \"\/\/{$_SERVER['SERVER_NAME']}\/\" . $avatars[0] : '';\nswitch($GLOBALS['g_user']['gender']) {\ncase 'C':\n$gender = 'male';\nbreak;\ncase 'F':\n$gender = 'female';\nbreak;\ndefault:\n$gender = 'male';\nbreak;\n}\n$myuser = array(\n    'username'  => $GLOBALS['g_user']['name'],\n    'password'  => $password,\n    'gender'    => $gender,\n    'role'      => $GLOBALS['g_user']['role'],\n    'image'     => $avatar,\n    'profile'   => base64_encode(\"\/\/{$_SERVER['SERVER_NAME']}\/users_online.php?display=profile&amp;uid=$id&amp;offset=1\")\n);\n$json = <em>json_encode<\/em>($myuser);\n$encoded = <em>file_get_contents<\/em>(\"https:\/\/jwt.html5-chat.com\/protect\/\" . <em>base64_encode<\/em>($json));\n?>\n&lt;!doctype html>\n&lt;html lang<strong>=\"en\"<\/strong>>\n&lt;head>\n    &lt;meta charset<strong>=\"UTF-8\"<\/strong>>\n    &lt;meta name<strong>=\"viewport\" <\/strong>content<strong>=\"width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0\"<\/strong>>\n    &lt;meta http-equiv<strong>=\"X-UA-Compatible\" <\/strong>content<strong>=\"ie=edge\"<\/strong>>\n    &lt;title><strong>Webcam Chat<\/strong>&lt;\/title>\n    &lt;style>\n        html, body {\n            <em>width<\/em>: 100%;\n            <em>height<\/em>: 100%;\n        }\n    &lt;\/style>\n&lt;\/head>\n&lt;body>\n    &lt;script src<strong>=\"https:\/\/html5-chat.com\/script\/<\/strong>&lt;?=$webmasterid?><strong>\/<\/strong>&lt;?= $encoded ?><strong>\"<\/strong>>&lt;\/script>\n&lt;\/body>\n&lt;\/html><\/pre>\n\n\n\n<p>Replace xxxx and yyyy by your webmasterid and your html5-chat password account.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is the step to integrate html5 chat with https:\/\/www.chameleonsoftwareonline.com\/ Create html5chat.php on root and paste there this code: &lt;?php if (empty($_GET[&#8216;cmd&#8217;]) || $_GET[&#8216;cmd&#8217;] != &#8216;lang&#8217;) $area = &#8220;login&#8221;; include(&#8220;.\/_include\/core\/main_start.php&#8221;); include(&#8220;.\/_include\/current\/menu_section.class.php&#8221;); $_GET[&#8216;display&#8217;] = get_param(&#8216;display&#8217;, User::displayProfile()); $where = &#8216; u.user_id = &#8216; . to_sql(guid(), &#8216;Number&#8217;); $webmasterid = xxxxx; $password = &#8220;yyyyyy&#8221;; $id = $GLOBALS[&#8216;g_user&#8217;][&#8216;user_id&#8217;]; $avatars = [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1020,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-1018","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cms"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/posts\/1018","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/comments?post=1018"}],"version-history":[{"count":5,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/posts\/1018\/revisions"}],"predecessor-version":[{"id":1089,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/posts\/1018\/revisions\/1089"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/media\/1020"}],"wp:attachment":[{"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/media?parent=1018"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/categories?post=1018"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/tags?post=1018"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}