⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 httpapi.asp

📁 简单的asp论坛源码系统,很适用于初学者!界面简洁,功能齐全
💻 ASP
📖 第 1 页 / 共 5 页
字号:
		Response.Write("" & _
		vbCrLf & "<ApiResponse>" & _
		vbCrLf & " <ErrorCode>0</ErrorCode>" & _
		vbCrLf & " <ErrorDescription/>" & _
		vbCrLf & " <ResultData recordcount=""" & CLng(Ubound(sarryRecords,1) + 1) & """>")
		
		'Loop throug array and display all the records
		For intRecordLoop = 0 TO Ubound(sarryRecords,1)
		
			Response.Write("" & _
			vbCrLf & "  <Record>" & _
			vbCrLf & "   " & sarryRecords(intRecordLoop) & _
			vbCrLf & "  </Record>")
		Next
		
		Response.Write("" & _
		vbCrLf & " </ResultData>" & _
		vbCrLf & "</ApiResponse>")
	End If


'Else there is no XML action so display HTTP XML API documentation
Else
%>
<!-- #include file="includes/browser_page_encoding_inc.asp" -->
<title>Web Wiz Forums HTTP XML API Documentation</title>
<meta name="generator" content="Web Wiz Forums" />
<%

Response.Write(vbCrLf  & vbCrLf & "<!--//" & _
vbCrLf & "/* *******************************************************" & _
vbCrLf & "Software: Web Wiz Forums(TM) ver. " & strVersion & "" & _
vbCrLf & "Info: http://www.webwizforums.com" & _
vbCrLf & "Copyright: (C)2001-2008 Web Wiz(TM). All rights reserved" & _
vbCrLf & "******************************************************* */" & _
vbCrLf & "//-->" & vbCrLf)
'***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******

%>
<link href="css_styles/default/default_style.css" rel="stylesheet" type="text/css" />
<link href="<% = strCSSfile %>default_style.css" rel="stylesheet" type="text/css" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
</head>
<body>
<img src="<% = strImagePath %>web_wiz_forums.png" alt="Web Wiz Forums Logo" hspace="10" vspace="5" align="middle" />
<h1>&nbsp;&nbsp;Web Wiz Forums HTTP XML API Documentation </h1>
<br />
<table width="98%" align="center" cellpadding="3" cellspacing="1" class="tableBorder">
 <tr>
  <td class="tableLedger"> Version: </td>
  <td class="tableLedger"><% = strAPIversion %></td>
 </tr>
 <tr>
  <td valign="top" class="tableRow"><strong> Description </strong></td>
  <td class="tableRow"> This API has been designed to be used by    external systems. The documentation
   below illustrates the methods that are available in this API. You can
   click on the method name in the list of <a href="#AvailableMethods">Available Methods</a> below to get more details about the parameters that
   it needs and also a test form to try out the method against your own control panel.</td>
 </tr>
</table>
<br />
<table width="98%" align="center" cellpadding="3" cellspacing="1" class="tableBorder">
 <tr>
  <td class="tableLedger"> Usage</td>
 </tr>
 <tr>
  <td valign="top" class="tableRow">Use
   &quot;HttpAPI.aspx?action=[MethodName]&amp;Username=[MasterAdminLoginName]&amp;Password=[MasterAdminPassword]&amp;{AdditionalData}&quot; <br />
   <br />
   e.g.&quot;HttpAPI.aspx?action=GetUsers&amp;Username=Adminsitrator&amp;Password=letmein&quot; <br />
   <br />
   Both GET and POST methods are supported and results are returned in XML format.<br />
   <br />
   You can use the Microsoft HTTPXML object in your own ASP or ASP.NET applications to call methods using this HTTP API, the result will be returned in XML format.</td>
 </tr>
</table>
<br />
<br />
<h2><a name="AvailableMethods" id="AvailableMethods"></a>Available Methods</h2>
<table align="center" cellpadding="3" cellspacing="1" class="tableBorder">
 <tbody>
  <tr>
   <td colspan="2" class="tableLedger">General</td>
  </tr>
  <tr>
   <td width="17%" class="tableSubLedger">Name</td>
   <td width="83%" class="tableSubLedger">Description</td>
  </tr>
  <tr>
   <td class="tableRow"><a href="#APIVersion">APIVersion</a></td>
   <td class="tableRow">Returns the current version of this API</td>
  </tr>
  <tr>
   <td class="tableRow"><a href="#WebWizForumsVersion">WebWizForumsVersion</a></td>
   <td class="tableRow">Returns the current version of Web Wiz Forums</td>
  </tr>
 </tbody>
</table>
<br />
<table align="center" cellpadding="3" cellspacing="1" class="tableBorder">
 <tbody>
  <tr>
   <td colspan="2" class="tableLedger">Member Management</td>
  </tr>
  <tr>
   <td width="17%" class="tableSubLedger">Name</td>
   <td width="83%" class="tableSubLedger">Description</td>
  </tr>
  <tr>
   <td class="tableRow"><a href="#CreateNewMember">CreateNewMember</a></td>
   <td class="tableRow">Creates a new Web Wiz Forums Member</td>
  </tr>
  <tr>
   <td class="tableRow"><a href="#GetMemberByName">GetMemberByName</a></td>
   <td class="tableRow">Returns details on the member by Member Name</td>
  </tr>
  <tr>
   <td class="tableRow"><a href="#GetMemberByID">GetMemberByID</a></td>
   <td class="tableRow">Returns details on the member by Member ID (Author_ID in database)</td>
  </tr>
  <tr>
   <td class="tableRow"><a href="#ActivateMember">ActivateMember</a></td>
   <td class="tableRow">Sets members account status to active</td>
  </tr>
  <tr>
   <td class="tableRow"><a href="#SuspendMember">SuspendMember</a></td>
   <td class="tableRow">Sets members account status to suspended</td>
  </tr>
  <tr>
   <td class="tableRow"><a href="#UnsubspendMember">UnsubspendMember</a></td>
   <td class="tableRow">Remove suspended status from members account</td>
  </tr>
  <tr>
   <td class="tableRow"><a href="#LoginMemberCookie">LoginMemberCookie</a></td>
   <td class="tableRow">Returns members login cookie data, to create your own login cookie to the forum</td>
  </tr>
  <tr>
   <td class="tableRow"><a href="#LogoutMember">LogoutMember</a></td>
   <td class="tableRow">Forces logout of member</td>
  </tr>
  <tr>
   <td class="tableRow"><a href="#ChangeMemberPassword">ChangeMemberPassword</a></td>
   <td class="tableRow">Changes the password for a members account</td>
  </tr>
 </tbody>
</table>
<br />
<table align="center" cellpadding="3" cellspacing="1" class="tableBorder">
 <tbody>
  <tr>
   <td colspan="2" class="tableLedger">Forum Management</td>
  </tr>
  <tr>
   <td width="17%" class="tableSubLedger">Name</td>
   <td width="83%" class="tableSubLedger">Description</td>
  </tr>
  <tr>
   <td class="tableRow"><a href="#GetForums">GetForums</a></td>
   <td class="tableRow">Returns  list of forums</td>
  </tr>
  <tr>
   <td class="tableRow"><a href="#LockForumByID">LockForumByID</a></td>
   <td class="tableRow">Locks a Forum by Forum ID (Forum_ID in database) to prevent new posts being made</td>
  </tr>
  <tr>
   <td class="tableRow"><a href="#UnLockForumByID">UnLockForumByID</a></td>
   <td class="tableRow">UnLocks a Forum by Forum ID (Forum_ID in database) </td>
  </tr>
 </tbody>
</table>
<br />
<table align="center" cellpadding="3" cellspacing="1" class="tableBorder">
 <tbody>
  <tr>
   <td colspan="2" class="tableLedger">Topic Management</td>
  </tr>
  <tr>
   <td width="17%" class="tableSubLedger">Name</td>
   <td width="83%" class="tableSubLedger">Description</td>
  </tr>
  <tr>
   <td class="tableRow"><a href="#GetTopicNameByID">GetTopicNameByID</a></td>
   <td class="tableRow">Returns details on the topic by Topic ID (Topic_ID in database)</td>
  </tr>
  <tr>
   <td class="tableRow"><a href="#GetLastPosts">GetLastTopics</a></td>
   <td class="tableRow">Gets the Last Topics (Unlike RSS Feeds this also returns results for non-public forums)</td>
  </tr>
  <tr>
   <td class="tableRow"><a href="#GetLastTopicsByForumID">GetLastTopicsByForumID</a></td>
   <td class="tableRow">Gets the Last Topics by Forum ID (Forum_ID in database)</td>
  </tr>
  <tr>
   <td class="tableRow"><a href="#CloseTopicByID">CloseTopicByID</a></td>
   <td class="tableRow">Closes Topic by ID</td>
  </tr>
  <tr>
   <td class="tableRow"><a href="#OpenTopicByID">OpenTopicByID</a></td>
   <td class="tableRow">Opens Locked  Topic By ID</td>
  </tr>
 </tbody>
</table>
<br />
<table align="center" cellpadding="3" cellspacing="1" class="tableBorder">
 <tbody>
  <tr>
   <td colspan="2" class="tableLedger">Post Management</td>
  </tr>
  <tr>
   <td width="17%" class="tableSubLedger">Name</td>
   <td width="83%" class="tableSubLedger">Description</td>
  </tr>
  <tr>
   <td class="tableRow"><a href="#GetLastPosts">GetLastPosts</a></td>
   <td class="tableRow">Gets the Last Posts  across all forums (Unlike RSS Feeds this also returns results for non-public forums)</td>
  </tr>
  <tr>
   <td class="tableRow"><a href="#GetLastPostsByForumID">GetLastPostsByForumID</a></td>
   <td class="tableRow">Gets the Last Topics  from a particular forum by Forum ID (Forum_ID in database)</td>
  </tr>
 </tbody>
</table>
<br />
<br />
<h2><span class="tableLedger"><a name="Returns" id="Returns"></a></span>Returned Results<br />
</h2>
<table align="center" cellpadding="3" cellspacing="1" class="tableBorder">
 <tbody>
  <tr>
   <td class="tableLedger">Returned Results</td>
  </tr>
  <tr>
   <td class="tableRow"><b><u>Successful Result in XML</u></b><br />
    The following is an example of data being returned if the method is successful. The ErrorCode will be 0 with a blank ErrorDescription. Depending on the method will determine how many records are returned in the ResultData.<br />
    <br />
    <code> &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; standalone=&quot;yes&quot; ?&gt;<br />
    &lt;ApiResponse&gt;<br />
    &nbsp;&lt;ErrorCode&gt;0&lt;/ErrorCode&gt;<br />
    &nbsp;&lt;ErrorDescription/&gt;<br />
    &nbsp;&lt;ResultData recordcount=&quot;2&quot;&gt;<br />
    &nbsp;&nbsp;&lt;Record&gt;<br />
    &nbsp;&nbsp;&nbsp;&nbsp;&lt;FirstField&gt;first Field value&lt;/FirstField&gt;<br />
    &nbsp;&nbsp;&nbsp;&nbsp;&lt;SecondField&gt;second Field value&lt;/SecondField&gt;<br />
    &nbsp;&nbsp;&lt;/Record&gt;<br />
    &nbsp;&nbsp;&lt;Record&gt;<br />
    &nbsp;&nbsp;&nbsp;&nbsp;&lt;FirstField&gt;more data&lt;/FirstField&gt;<br />
    &nbsp;&nbsp;&nbsp;&nbsp;&lt;SecondField&gt;more data again&lt;/SecondField&gt;<br />
    &nbsp;&nbsp;&lt;/Record&gt;<br />
    &nbsp;&lt;/ResultData&gt;<br />
    &lt;/ApiResponse&gt;</code><br />
    <br />
    <b><u>Unsuccessful Result in XML</u></b><br />
The following is an example of data being returned if the method is unsuccessful. The ErrorCode will be a negative number (eg. -150), and the ErrorDescription will contain a description of the error. The ResultData will be blank.<br />
<br />
<code> &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; standalone=&quot;yes&quot; ?&gt;<br />
&lt;ApiResponse&gt;<br />
&nbsp;&lt;ErrorCode&gt;-150&lt;/ErrorCode&gt;<br />
&nbsp;&lt;ErrorDescription&gt;Admin Login Fail&lt;/ErrorDescription&gt;<br />
&nbsp;&lt;ResultData/&gt;<br />
&lt;/ApiResponse&gt;</code></td>
  </tr>
 </tbody>
</table>
<br />
<br />
<h2>General Method Details<br /></h2>
<h3><a name="APIVersion" id="APIVersion"></a>APIVersion
Returns the current version of this API</h3><br />

<h4>Test Form</h4>
<form action="HttpAPI.asp" method="get" name="test-APIVersion" target="test-APIVersion" id="test-APIVersion">
<input name="action" value="APIVersion" type="hidden" />
<table width="98%" align="center" cellpadding="3" cellspacing="1" class="tableBorder">
  <tr>
   <td width="16%" class="tableSubLedger">Parameter</td>
   <td width="84%" class="tableSubLedger">Value</td>
  </tr>
  <tr>
   <td class="tableRow"> Username* </td>
   <td class="tableRow"><input name="Username" value="" type="text" />
    (required) </td>
  </tr>
  <tr>
   <td class="tableRow"> Password* </td>
   <td class="tableRow"><input name="Password" value="" type="password" />
    (required) </td>
  </tr>
  <tr>
   <td class="tableRow"></td>
   <td class="tableRow"><input value="Test APIVersion" type="submit" /></td>
  </tr>
</table>
</form>
<br />
Back to <a href="#">Top</a> or <a href="#AvailableMethods">Available Methods</a><br />
<br />
<h3>
<a name="WebWizForumsVersion" id="WebWizForumsVersion"></a>WebWizForumsVersion
</h3>
<p><span class="tableRow">Returns the current version of Web Wiz Forums</span><br />
</p>
<h4>Test Form</h4>
<form action="HttpAPI.asp" method="get" name="test-WebWizForumsVersion" target="test-WebWizForumsVersion" id="test-WebWizForumsVersion">
 <input name="action" value="WebWizForumsVersion" type="hidden" />
 <table width="98%" align="center" cellpadding="3" cellspacing="1" class="tableBorder">
  <tr>
   <td width="16%" class="tableSubLedger">Parameter</td>
   <td width="84%" class="tableSubLedger">Value</td>
  </tr>
  <tr>
   <td class="tableRow"> Username* </td>
   <td class="tableRow"><input name="Username" value="" type="text" />
    (required) </td>
  </tr>
  <tr>
   <td class="tableRow"> Password* </td>
   <td class="tableRow"><input name="Password" value="" type="password" />
    (required) </td>
  </tr>
  <tr>
   <td class="tableRow"></td>
   <td class="tableRow"><input value="Test WebWizForumsVersion" type="submit" /></td>
  </tr>
 </table>
</form>
<br />
Back to <a href="#">Top</a> or <a href="#AvailableMethods">Available Methods</a><br />
<br />
<br />
<h2>Member Management Method Details </h2>
<h3>
 <a name="CreateNewMember" id="CreateNewMember"></a>CreateNewMember </h3>
<p>Creates a new Web Wiz Forums Member<br />
</p>
<h4>Test Form</h4>
<form action="HttpAPI.asp" method="get" name="test-CreateNewMember" target="test-CreateNewMember" id="test-CreateNewMember">
 <input name="action" value="CreateNewMember" type="hidden" />
 <table width="98%" align="center" cellpadding="3" cellspacing="1" class="tableBorder">
  <tr>
   <td width="16%" class="tableSubLedger">Parameter</td>
   <td width="84%" class="tableSubLedger">Value</td>
  </tr>
  <tr>
   <td class="tableRow"> Username* </td>
   <td class="tableRow"><input name="Username" value="" type="text" />
    (required) </td>
  </tr>
  <tr>
   <td class="tabl

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -