当前位置:网站首页>Wechat applet cash red packet returns the error "the IP address is not the available IP address you set on the merchant platform". The ultimate solution
Wechat applet cash red packet returns the error "the IP address is not the available IP address you set on the merchant platform". The ultimate solution
2022-07-28 17:25:00 【mojocube】
Baidu searched , There is no fundamental solution ( The premise is that the allowed... Has been set on the merchant platform IP), It's a hint IP The address is not yours ... Error prompt for ,PS: Despise Tencent , Since you all know me IP What is it? , Why don't you directly tell me the truth when you return the information IP Address .

There are similar solutions :

But actually this IP It's not my truth IP, Because of virtual routing or proxy and other means , Can't get the truth IP Address, etc .
Then how can we get those that really meet the requirements of wechat IP Well , Look at the code below :
public string getTrueIP()
{
String direction = "";
string url = "http://checkip.dyndns.org/";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "PROPFIND";
request.ContentType = "application/x-www-form-urlencoded;charset:utf-8";
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
{
Stream stream = response.GetResponseStream();
using (StreamReader streamReader = new StreamReader(stream, Encoding.UTF8))
{
direction = streamReader.ReadToEnd().ToString();
}
}
//Search for the ip in the html
int first = direction.IndexOf("Address: ") + 9;
int last = direction.LastIndexOf("</body>");
direction = direction.Substring(first, last - first);
return direction;
}Execute this code on the server , Request a third-party tool to obtain the real of this server IP, Put this IP Add it to the merchant platform , solve .
边栏推荐
- Net framework
- Facet experience -- the development side of dragon game client
- 一文了解 Kubernetes 中的服务发现
- Unity shader global fog effect
- Introduction to vscade interface
- WPF command button transparent style
- 【ansible】ansible shell 执行远程命令遇到awk 中$符号的问题
- 数据库故障容错之系统时钟故障
- Unity3d simple implementation of water surface shader
- 高速电路中电感的选型和应用
猜你喜欢

Educational codeforces round 126 (rated for Div. 2) f.teleporters (two sets and two points)

Goweb开发之Beego框架实战:第四节 数据库配置及连接

Unity shader realizes mirror effect with rendered texture

【presto 】presto 新版本升级详情

在android开发过程中遇到.sqlite文件处理

The actual combat of the beego framework of goweb development: Section III program execution process analysis

Atcoder regular contest 133 d.range XOR (digital dp+ classification discussion)

Unity shader cartoon style rendering

Visual studio 2012/2015 releases web applications together with.Cs source code

高速电路中电阻的选择
随机推荐
Unity3d simple implementation of water surface shader
Source code of voice live broadcast app
《Kubernetes》你需要掌握的 Service 和 Ingress
Unity shader texture animation
Pytorch Foundation: similarities and differences between torch.mul, torch.mm and torch.matmul
解决SQL Server数据库独占的问题
Cf/atc/lc topic score website
批量下载文件
Why do I choose to use go language?
格雷码和二进制的转换及典型例题(4bits格雷码计数器)
C#遍历集合
What does the service grid that has been popular for two years bring to microservices? (Reprinted)
Jupyter notebook win installation record
Unity shader procedural texture
Classroom attendance system based on QT design (using RDS for MySQL cloud database)
Verilog daily question (vl29 single port RAM)
WPF command button transparent style
Application of Pegasus d200s UAV and airborne lidar in large-scale DEM construction
2022 Niuke multi school second CDE
mysql 最大建议行数2000w,靠谱吗?