我们告诉你如何使用 API 例子

How to use the API?

我们以 Email 在 C#的API来实例

We give an example about email api by C#

图例和关键的C#代码

See the pictures & C# coding as below

首先是调用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 query IP地址查询

我们提供的IP地址查询服务,我们提供免费的全球IP地址查询服务,而且我们提供免费API供大家调用。

We support IP address query and IP API Server, all of them Free.

Learn more »

电子邮件发送

我们提供电子邮件代发服务,针对那些没有主机的网站、留言板、会员注册、邮件通知单等。

We provide email delivery services for websites, message boards, member registrations, email notifications, etc. without a host.

Learn more »

新闻内容

我们提供中文、英文新闻数据,您的网站不再需要数据库。

We provide news data in Chinese and English, then your website no longer needs any database.

Learn more »

更多服务

我们随机提供更多的服务。

We will support more service recently.

Learn more »



欢迎邮件告知你们的使用反馈.

Welcome you email to us with your feedback.

Support: iwill2.com@gmail.com

feedback list

VC Green 房地产培训学校

cyh律师楼

58同城

我也愿意

中国防伪网

it数据网

纽约666

我爱美国

香港无线