首先是调用API
using cyhlaw.com.iwill2.ws;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace project.Commons
{
public class iwill2Helper
{
// some api need to apply the Authkey. http://ws.iwill2.com/Account/Register
static string AuthKey = "00000000-0000-0000-0000-000000000000";
/// <summary>
/// get Ip info
/// </summary>
/// <param name="ip">ip can be empty</param>
/// <returns></returns>
public static string getIp(string ip)
{
WS01 Ws = new WS01();
return Ws.GetIpLocation(ip);
}
/// <summary>
/// request send an email
/// </summary>
/// <param name="subject"> the length must over 6 </param>
/// <param name="body"> the length must over 20 </param>
/// <param name="recieverName"></param>
/// <param name="receiverEmail"></param>
/// <returns>{"Status":"success","info":""}</returns>
public static string sendEmail(string subject, string body, string recieverName, string receiverEmail)
{
// return success: {"status":"success","info":""}
// return success: {"status":"failed","info":"Error detail"}
// how to get an AuthKey? http://ws.iwill2.com/Account/Register
WS01 Ws = new WS01();
JObject obj = JObject.Parse(Ws.SendEmail(AuthKey, recieverName, receiverEmail, subject, body));
// if obj["info"] value equl empty, so email success.
return obj["info"].ToString();
}
}
}
我们提供的IP地址查询服务,我们提供免费的全球IP地址查询服务,而且我们提供免费API供大家调用。
We support IP address query and IP API Server, all of them Free.
我们提供电子邮件代发服务,针对那些没有主机的网站、留言板、会员注册、邮件通知单等。
We provide email delivery services for websites, message boards, member registrations, email notifications, etc. without a host.
我们提供中文、英文新闻数据,您的网站不再需要数据库。
We provide news data in Chinese and English, then your website no longer needs any database.
欢迎邮件告知你们的使用反馈.
Welcome you email to us with your feedback.
Support: iwill2.com@gmail.com
feedback list