HTML5 game discussion, how to make WeChat games only run on WeChat, html5 Discussion

Source: Internet
Author: User

HTML5 games: How to make games run only in China; html5 games

The general file layout is as follows: an html file, a loading. js file, loading other required js and css in loading. js.

For specific speed, we recommend that you load up to 6 js files in cdn or a domain. Before loading js and css in loading. js, check whether the browser is a browser. If so, go. If not, the system jumps to the prompt.

function isWeiXin(){    var ua = window.navigator.userAgent.toLowerCase();    if(ua.match(/MicroMessenger/i) == 'micromessenger'){        return true;    }else{        return false;    }}if(!isWeiXin()){    location.href="http://www.gbtags.com";}

Of course, the above method only prevents users. For developers, it is too simple to crack. Maybe the token generated by the fromname MD5 encryption is used to verify the resource file. Do some friends have a good and easy way to prevent the issue of html5 games from having a fake copy?


Ask how to access the Background Development page of the public platform, and how can HTML5 be integrated with background development?

First, edit mode
Log on to the public platform
Click "advanced functions" in the menu"
Enable "edit mode"
Set automatic reply, add a text and text content, and set the original link to your website.
By entering your website, users will be behind you.

Second, Development Mode
Log on to the public platform
Click "advanced functions" in the menu"
Open "development mode"
Click "view document" to go to the development interface documentation.
Develop and deploy a Web service with an Internet IP address and port 80 according to the interface documentation.
Enter your URL and Token on the "development mode" page of the public platform
OK


Is html5 implemented for accessing a website on? Can I directly use the functions of an existing website to show them to users? How to implement it?

Website access is implemented by HTML5. As long as your website is implemented by HTML5, you can directly access your website by posting your website address. The specific display is related to your website's original functions.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.