PageRenderTime 44ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/TBDev/installer_v4_1/imdb/doc/apidoc/Api/BrowserEmulator.html

https://github.com/cybernet/CyBerFuN-CoDeX
HTML | 204 lines | 169 code | 5 blank | 30 comment | 0 complexity | f3b963c104029da2b06a760da5877961 MD5 | raw file
Possible License(s): GPL-2.0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
  2. <!-- Generated by phpdocgen 0.16 on Wed Sep 17 18:43:07 2008 -->
  3. <HTML>
  4. <HEAD>
  5. <TITLE>IMDBPHP</TITLE>
  6. <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7. <link REL ='stylesheet' TYPE='text/css' HREF='../stylesheet.css' TITLE='Style'>
  8. <script language='JavaScript1.2'>
  9. <!--
  10. function swaptreecontent(elID) {
  11. b = document.getElementById(elID).innerHTML;
  12. a = document.getElementById(elID + "off__").innerHTML;
  13. if (a.length == 0) { document.getElementById(elID).innerHTML = "";
  14. } else {
  15. document.getElementById(elID).innerHTML = a;
  16. }
  17. document.getElementById(elID + "off__").innerHTML = b;
  18. }
  19. function swaptreeicon(elID) {
  20. a = document.getElementById(elID + "plusminus").src;
  21. if (a.indexOf("minus.gif") != -1) a = "../plus.gif";
  22. else a = "../minus.gif";
  23. document.getElementById(elID + "plusminus").src = a;
  24. }
  25. function swaptree(elID) {
  26. swaptreecontent(elID);
  27. swaptreeicon(elID);
  28. }
  29. function swaptree2(elID1,elID2) {
  30. swaptreecontent(elID1);
  31. swaptreecontent(elID2);
  32. swaptreeicon(elID1);
  33. }
  34. //-->
  35. </script>
  36. </HEAD>
  37. <BODY>
  38. <table BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
  39. <tr>
  40. <td COLSPAN=2>
  41. <table BORDER="0" CELLPADDING="0" CELLSPACING="3">
  42. <tr ALIGN="center" VALIGN="top">
  43. <td>&nbsp;<A HREF="../overview-summary.html"><b>Overview</b></A>&nbsp;</td>
  44. <td>&nbsp;<A HREF="../Api/package-summary.html"><b>Package</b></A>&nbsp;</td>
  45. <td>&nbsp;<A HREF="../overview-tree.html"><b>Tree</b></A>&nbsp;</td>
  46. <td>&nbsp;<A HREF="../index-0.html" target="classFrame"><b>Index</b></A>&nbsp;</td>
  47. </tr>
  48. </table>
  49. </td>
  50. <td ALIGN="right" VALIGN="top" ROWSPAN=3><em><b>IMDBPHP</b></em></td>
  51. </tr>
  52. <tr>
  53. <td BGCOLOR="white"><SPAN CLASS='small'>PREV&nbsp;&nbsp;<A HREF="../Api/imdb.html">NEXT</A></SPAN>
  54. </td>
  55. <td><SPAN CLASS='small'><A HREF="../index.html" target="_top"><b>Frames</b></A>&nbsp;&nbsp;<A HREF="../Api/BrowserEmulator.html" target="_top"><b>No Frame</b></A>&nbsp;</SPAN>
  56. </td>
  57. </tr>
  58. <tr><td VALIGN="top"><SPAN CLASS='small'>SUMMARY: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#_section_method_summary">METHOD</A></SPAN>
  59. </td>
  60. <td VALIGN="top"><SPAN CLASS='small'>DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#_section_method_detail">METHOD</A></SPAN>
  61. </td>
  62. </tr>
  63. </table>
  64. <HR>
  65. <H2><FONT SIZE="-1">Api</FONT><BR>
  66. Class BrowserEmulator</H2>
  67. <HR>
  68. <DL>
  69. <DT>class <B>BrowserEmulator</B><P>BrowserEmulator class. Provides methods for opening urls and emulating
  70. a web browser request.</P>
  71. <DL><DT><B>Authors:</B></DT><DD>Kai Blankenhorn (kai AT bitfolge DOT de)</DD></DL>
  72. </DL>
  73. <HR>
  74. <P><TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'><THEAD><TR><TD CLASS='tabletitle' COLSPAN='3'><B>Method Summary</B></TD></TR></THEAD>
  75. <TBODY><TR><TD valign='top' align='left'>void </TD><TD WIDTH='100%' valign='top' align='left'><b><A HREF="#addheaderline()">addHeaderLine</A></b>(string $name, string $value)<BR>
  76. Add a single header field to the HTTP request header.</TD></TR><TR><TD valign='top' align='left'>void </TD><TD WIDTH='100%' valign='top' align='left'><b><A HREF="#addpostdata()">addPostData</A></b>(string $name, string $value)<BR>
  77. Add a post parameter.</TD></TR><TR><TD valign='top' align='left'>mixed </TD><TD WIDTH='100%' valign='top' align='left'><b><A HREF="#file()">file</A></b>(string $url)<BR>
  78. Make an file call to $url with the parameters set by previous member
  79. method calls.</TD></TR><TR><TD valign='top' align='left'>mixed </TD><TD WIDTH='100%' valign='top' align='left'><b><A HREF="#fopen()">fopen</A></b>(string $url)<BR>
  80. Make an fopen call to $url with the parameters set by previous member
  81. method calls.</TD></TR><TR><TD valign='top' align='left'>array </TD><TD WIDTH='100%' valign='top' align='left'><b><A HREF="#getlastresponseheaders()">getLastResponseHeaders</A></b>()<BR>
  82. Get the latest server response</TD></TR><TR><TD valign='top' align='left'>void </TD><TD WIDTH='100%' valign='top' align='left'><b><A HREF="#resetheaderlines()">resetHeaderLines</A></b>()<BR>
  83. Delete all custom header lines.</TD></TR><TR><TD valign='top' align='left'>void </TD><TD WIDTH='100%' valign='top' align='left'><b><A HREF="#resetport()">resetPort</A></b>()<BR>
  84. Reset the port used for request to the HTTP default (80).</TD></TR><TR><TD valign='top' align='left'>void </TD><TD WIDTH='100%' valign='top' align='left'><b><A HREF="#resetpostdata()">resetPostData</A></b>()<BR>
  85. Delete all custom post parameters.</TD></TR><TR><TD valign='top' align='left'>void </TD><TD WIDTH='100%' valign='top' align='left'><b><A HREF="#setauth()">setAuth</A></b>(string $user, string $pass)<BR>
  86. Set an auth user and password to use for the request.</TD></TR><TR><TD valign='top' align='left'>void </TD><TD WIDTH='100%' valign='top' align='left'><b><A HREF="#setport()">setPort</A></b>(integer $portNumber)<BR>
  87. Select a custom port to use for the request.</TD></TR></TBODY>
  88. </TABLE></P>
  89. <A NAME="_section_method_detail"></A><P><TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'><THEAD><TR><TD CLASS='largetabletitle'>Method Detail</TD></TR></THEAD></TABLE><BR>
  90. <A NAME="addheaderline()"></A><H3>addHeaderLine()</H3>
  91. <PRE>
  92. void <b>addHeaderLine</b>(string $name, string $value)</PRE>
  93. <DL><DD><P>Add a single header field to the HTTP request header. The resulting
  94. header line will have the format "$name: $value\n"</P>
  95. <DL><DT><B>Parameters:</B></DT><DD><code>name</code> - <BR>
  96. <code>value</code> - </DD></DL>
  97. </DD></DL><HR>
  98. <A NAME="addpostdata()"></A><H3>addPostData()</H3>
  99. <PRE>
  100. void <b>addPostData</b>(string $name, string $value)</PRE>
  101. <DL><DD><P>Add a post parameter. Post parameters are sent in the body of an HTTP POST request.</P>
  102. <DL><DT><B>Parameters:</B></DT><DD><code>name</code> - <BR>
  103. <code>value</code> - </DD></DL>
  104. </DD></DL><HR>
  105. <A NAME="file()"></A><H3>file()</H3>
  106. <PRE>
  107. mixed <b>file</b>(string $url)</PRE>
  108. <DL><DD><P>Make an file call to $url with the parameters set by previous member
  109. method calls. Send all set headers, post data and user authentication data.</P>
  110. <DL><DT><B>Parameters:</B></DT><DD><code>url</code> - </DD></DL>
  111. <DL><DT><B>Returns:</B></DT><DD>array file on success, FALSE otherwise</DD></DL>
  112. </DD></DL><HR>
  113. <A NAME="fopen()"></A><H3>fopen()</H3>
  114. <PRE>
  115. mixed <b>fopen</b>(string $url)</PRE>
  116. <DL><DD><P>Make an fopen call to $url with the parameters set by previous member
  117. method calls. Send all set headers, post data and user authentication data.</P>
  118. <DL><DT><B>Parameters:</B></DT><DD><code>url</code> - </DD></DL>
  119. <DL><DT><B>Returns:</B></DT><DD>file handle on success, FALSE otherwise</DD></DL>
  120. </DD></DL><HR>
  121. <A NAME="getlastresponseheaders()"></A><H3>getLastResponseHeaders()</H3>
  122. <PRE>
  123. array <b>getLastResponseHeaders</b>()</PRE>
  124. <DL><DD><P>Get the latest server response</P>
  125. <DL><DT><B>Returns:</B></DT><DD>lastResponse <ul>
  126. <li>0: HTTP response (e.g. "HTTP/1.1 404 Not Found")</li>
  127. <li>1: Date (e.g. "Date: Sun, 08 Jun 2008 16:36:37 GMT")</li>
  128. <li>2: ServerInfo (e.g. "Server: Apache/2.2.3 (Ubuntu) PHP/5.2.1"</li>
  129. <li>3: Content length (e.g. "Content-Length: 214"</li>
  130. <li>4: Connection (e.g. "Connection: close")</li>
  131. <li>5: Content type (e.g. "Content-Type: text/html; charset=iso-8859-1")</li></ul></DD></DL>
  132. </DD></DL><HR>
  133. <A NAME="resetheaderlines()"></A><H3>resetHeaderLines()</H3>
  134. <PRE>
  135. void <b>resetHeaderLines</b>()</PRE>
  136. <DL><DD><P>Delete all custom header lines. This will not remove the User-Agent
  137. header field, which is necessary for correct operation.</P>
  138. </DD></DL><HR>
  139. <A NAME="resetport()"></A><H3>resetPort()</H3>
  140. <PRE>
  141. void <b>resetPort</b>()</PRE>
  142. <DL><DD><P>Reset the port used for request to the HTTP default (80).</P>
  143. </DD></DL><HR>
  144. <A NAME="resetpostdata()"></A><H3>resetPostData()</H3>
  145. <PRE>
  146. void <b>resetPostData</b>()</PRE>
  147. <DL><DD><P>Delete all custom post parameters.</P>
  148. </DD></DL><HR>
  149. <A NAME="setauth()"></A><H3>setAuth()</H3>
  150. <PRE>
  151. void <b>setAuth</b>(string $user, string $pass)</PRE>
  152. <DL><DD><P>Set an auth user and password to use for the request.
  153. Set both as empty strings to disable authentication.</P>
  154. <DL><DT><B>Parameters:</B></DT><DD><code>user</code> - <BR>
  155. <code>pass</code> - </DD></DL>
  156. </DD></DL><HR>
  157. <A NAME="setport()"></A><H3>setPort()</H3>
  158. <PRE>
  159. void <b>setPort</b>(integer $portNumber)</PRE>
  160. <DL><DD><P>Select a custom port to use for the request.</P>
  161. <DL><DT><B>Parameters:</B></DT><DD><code>portNumber</code> - </DD></DL>
  162. </DD></DL><HR>
  163. <table BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
  164. <tr>
  165. <td COLSPAN=2>
  166. <table BORDER="0" CELLPADDING="0" CELLSPACING="3">
  167. <tr ALIGN="center" VALIGN="top">
  168. <td>&nbsp;<A HREF="../overview-summary.html"><b>Overview</b></A>&nbsp;</td>
  169. <td>&nbsp;<A HREF="../Api/package-summary.html"><b>Package</b></A>&nbsp;</td>
  170. <td>&nbsp;<A HREF="../overview-tree.html"><b>Tree</b></A>&nbsp;</td>
  171. <td>&nbsp;<A HREF="../index-0.html" target="classFrame"><b>Index</b></A>&nbsp;</td>
  172. </tr>
  173. </table>
  174. </td>
  175. <td ALIGN="right" VALIGN="top" ROWSPAN=3><em><b>IMDBPHP</b></em></td>
  176. </tr>
  177. <tr>
  178. <td BGCOLOR="white"><SPAN CLASS='small'>PREV&nbsp;&nbsp;<A HREF="../Api/imdb.html">NEXT</A></SPAN>
  179. </td>
  180. <td><SPAN CLASS='small'><A HREF="../index.html" target="_top"><b>Frames</b></A>&nbsp;&nbsp;<A HREF="../Api/BrowserEmulator.html" target="_top"><b>No Frame</b></A>&nbsp;</SPAN>
  181. </td>
  182. </tr>
  183. <tr><td VALIGN="top"><SPAN CLASS='small'>SUMMARY: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#_section_method_summary">METHOD</A></SPAN>
  184. </td>
  185. <td VALIGN="top"><SPAN CLASS='small'>DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#_section_method_detail">METHOD</A></SPAN>
  186. </td>
  187. </tr>
  188. </table>
  189. <HR>
  190. <P><SPAN CLASS='small'><A HREF="http://www.arakhne.org/bugtrack/" target="_top">Submit a bug</A></SPAN>
  191. </P>
  192. <P><SPAN CLASS='small'>This document was generated by <A HREF="http://www.arakhne.org/tools/phpdocgen/" target="_top">phpdocgen 0.16</A>.<BR>
  193. Copyright &copy; 2002-03 <A HREF="mailto:galland@arakhne.prg">Stéphane GALLAND</A> (under the <A HREF="http://www.gnu.org/copyleft/gpl.html" target="_top">GNU General Public License</A>)</SPAN>
  194. </P>
  195. </BODY>
  196. </HTML>