the SDK class, take the code, and use the acquired codes to get an OpenID look at the comments below!
$url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=appidsecret=secretcode=". $_get[' Code ' ." grant_type=authorization_code ";
$res = $weixin->https_request ($url);//Invoke the SDK method to get the OpenID
$res = (Json_decode ($res, True) from the res;//Convert to Array Easy Call
Recently did the development of micro-letter public number payment, because it is the first time to do also grope for a few days, but also only to achieve the level of functionality, and not too much consideration of performance issues, so this article is more suitable for beginners.
The general public number of micro-credit payment is actually very simple, roughly divided into three steps. The first step is to obtain the user authorization; the second step calls the unified next single interfa
Record only: Micro-credit get nickname Auto LoginAfter several repeated verification, I found this method is flawed:The micro-letter did not pay attention to access to the site, can not get nickname.After paying attention, I can get a nickname with this method.Is the nickname not generated because of the first generation of OpenID? Pending Test./*** Get the full URL address of the current page*/function Get_url () {$sys _protocal = isset ($_server[' S
secret.
$weixin=new class_weixin_adv("appid", "secret");
Initialize the SDK class, get the code, and use the obtained code to get the openid. See the following code comment!
$ Url = "https://api.weixin.qq.com/sns/oauth2/access_token? Appid = appid secret = secret code = ". $ _ GET ['code']. " grant_type = authorization_code"; $ res = $ weixin-> https_request ($ url ); // call the SDK method to obtain res. You can obtain
{Code...} has obtained access_token and openid. It is okay to call api. weixin. qq. comsnsauthaccess... to verify access_token. However, if you use access_token and openid to obtain user information, the system always returns errcode: 40001, errmsg: quot; invalidcred...
getToken: function(code) { var url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=idsecret=seccode=" + code +"grant_typ
The recent development of the PC-side web site, the need to use the authorization login, considering the pre-mobile phone has been a large number of users, now thinking about the integration of resources to meet the same user data synchronization.
First, development information
1. Concept differentiation
Since exposure to the development of knowledge, will inevitably contact with the use of OpenID and Unionid, the following is an introduction to the o
Cmseasy full-site user cookie enumeration counterfeit Login
This problem is tricky because of the openid.
We have analyzed a case before:Cmseasy logical defects can be upgraded common users as administrators (shell will be difficult): http://www.bkjia.com/Article/201412/364307.htmlI will not go into details here. How can I modify this openid?Url:Http: // localhost: 8080/cmseasy/uploads/index. php? Case = us
This article describes how to obtain basic information about users on the public platform, including nicknames, portraits, and gender information. The following small series will share with you the latest articles on php public platform development and getting basic user information, if you have any need, you can refer to the methods in this article to include subscription numbers, service numbers, and custom menus. Whether you have advanced interface permissions or not, you can obtain basic use
level of the authorization operation, the authorization link will undergo regular and strong match verification when initiating the authorization request. if the parameter order of the link is incorrect, the authorization page cannot be accessed normally.
Where:
AppID-unique ID of the public accountREDIRECT_URI-jump urlSCOPE-the value is snsapi_base (the authorization page is not displayed, and you can only get the user's openid) or snsapi_userinfo (
Obtain the OpenID from the custom menu of public platform development (99. Keyword public platform custom menu OpenID author: Fang times studio original: www.cnblogs.comtxw1958pweixin-menu-get-openid.html in this public platform development teach keywords public platform custom menu OpenID
Author: Fang times Studio
Original article: http://www.cnblogs.com/txw1958
Development, the user after the attention. I put the user's information OpenID nickname City Sex and other information exists in my own database in the UserInfo table so the problem is that the user through my public number point into a page I developed myself how to recognize that this user points in and then from the database to display his information in the OpenID is the only one on the web. So what's t
the high security level of the authorization operation, the authorization link will undergo regular and strong match verification when initiating the authorization request. If the Parameter order of the link is incorrect, the authorization page cannot be accessed normally.
Where:
AppID-Unique ID of the Public AccountREDIRECT_URI-jump urlSCOPE-the value is snsapi_base (the authorization page is not displayed, and you can only get the user's openid) or
, the ID card is required. If you purchase a number card under the real name system, the ID card is required. If we are the system administrator, I can use your ID card number to find your mobile phone number and bank card number.
With the above idea, we need to find a unique identifier to associate. There is an important role openid. It works with the ID card number we mentioned above, and the account is the unique identifier of a public number.
Us
This article describes how to obtain basic information about users on the public platform, including nicknames, portraits, and gender information. The following small series will share with you the latest articles on php public platform development and getting basic user information, if you have any need, you can refer to the methods in this article to include subscription numbers, service numbers, and custom menus. Whether you have advanced interface permissions or not, you can obtain basic use
Web very few official no instance, fortunately finally from an article to find clues is made, complain about
Other Notes
introduce several parameters first AppID These two parameters are used by calls to and Appsecret can find many interfaces in the public platform.
The most important parameter is also the purpose of invoking the authorization interface, OpenID, which is a number pair should be the only indicator of the public platform, get it can t
, so we do not know how to display it.
3.3 What happened after the user scanned the QR code
3.3.1 What happened after scanning
As mentioned above, the user scans the temporary QR code we generate. if the user does not pay attention to the public number, the user will first jump to the public number follow page, click follow, the session page of the public account is displayed, and an event is pushed to the interface we set. If the user has already noticed the event, the user will jump directly t
the attention, will enter the public number of the session page, and will give us the interface set to push an event. If the user is already concerned, the user jumps directly to the public number session page, and the server pushes an event to the interface we set up.
User concerns or not the event that the server gives us pushes is similar, but the new attention to the user pushes the event in front of the scene_id will add a prefix. The following is a description of the public platform docum
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.