/TBDev/installer_v4_1/imdb/doc/apidoc/Api/BrowserEmulator.html
HTML | 204 lines | 169 code | 5 blank | 30 comment | 0 complexity | f3b963c104029da2b06a760da5877961 MD5 | raw file
Possible License(s): GPL-2.0
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
-
- <!-- Generated by phpdocgen 0.16 on Wed Sep 17 18:43:07 2008 -->
-
- <HTML>
- <HEAD>
- <TITLE>IMDBPHP</TITLE>
- <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <link REL ='stylesheet' TYPE='text/css' HREF='../stylesheet.css' TITLE='Style'>
- <script language='JavaScript1.2'>
- <!--
- function swaptreecontent(elID) {
- b = document.getElementById(elID).innerHTML;
- a = document.getElementById(elID + "off__").innerHTML;
- if (a.length == 0) { document.getElementById(elID).innerHTML = "";
- } else {
- document.getElementById(elID).innerHTML = a;
- }
- document.getElementById(elID + "off__").innerHTML = b;
- }
-
- function swaptreeicon(elID) {
- a = document.getElementById(elID + "plusminus").src;
- if (a.indexOf("minus.gif") != -1) a = "../plus.gif";
- else a = "../minus.gif";
- document.getElementById(elID + "plusminus").src = a;
- }
-
- function swaptree(elID) {
- swaptreecontent(elID);
- swaptreeicon(elID);
- }
-
- function swaptree2(elID1,elID2) {
- swaptreecontent(elID1);
- swaptreecontent(elID2);
- swaptreeicon(elID1);
- }
- //-->
- </script>
- </HEAD>
- <BODY>
- <table BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
- <tr>
- <td COLSPAN=2>
- <table BORDER="0" CELLPADDING="0" CELLSPACING="3">
- <tr ALIGN="center" VALIGN="top">
- <td> <A HREF="../overview-summary.html"><b>Overview</b></A> </td>
- <td> <A HREF="../Api/package-summary.html"><b>Package</b></A> </td>
- <td> <A HREF="../overview-tree.html"><b>Tree</b></A> </td>
- <td> <A HREF="../index-0.html" target="classFrame"><b>Index</b></A> </td>
- </tr>
- </table>
- </td>
- <td ALIGN="right" VALIGN="top" ROWSPAN=3><em><b>IMDBPHP</b></em></td>
- </tr>
- <tr>
- <td BGCOLOR="white"><SPAN CLASS='small'>PREV <A HREF="../Api/imdb.html">NEXT</A></SPAN>
- </td>
- <td><SPAN CLASS='small'><A HREF="../index.html" target="_top"><b>Frames</b></A> <A HREF="../Api/BrowserEmulator.html" target="_top"><b>No Frame</b></A> </SPAN>
- </td>
- </tr>
- <tr><td VALIGN="top"><SPAN CLASS='small'>SUMMARY: FIELD | CONSTR | <A HREF="#_section_method_summary">METHOD</A></SPAN>
- </td>
- <td VALIGN="top"><SPAN CLASS='small'>DETAIL: FIELD | CONSTR | <A HREF="#_section_method_detail">METHOD</A></SPAN>
- </td>
- </tr>
- </table>
- <HR>
- <H2><FONT SIZE="-1">Api</FONT><BR>
- Class BrowserEmulator</H2>
-
- <HR>
- <DL>
- <DT>class <B>BrowserEmulator</B><P>BrowserEmulator class. Provides methods for opening urls and emulating
- a web browser request.</P>
- <DL><DT><B>Authors:</B></DT><DD>Kai Blankenhorn (kai AT bitfolge DOT de)</DD></DL>
- </DL>
- <HR>
- <P><TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'><THEAD><TR><TD CLASS='tabletitle' COLSPAN='3'><B>Method Summary</B></TD></TR></THEAD>
- <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>
- 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>
- 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>
- Make an file call to $url with the parameters set by previous member
- 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>
- Make an fopen call to $url with the parameters set by previous member
- 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>
- 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>
- 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>
- 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>
- 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>
- 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>
- Select a custom port to use for the request.</TD></TR></TBODY>
- </TABLE></P>
-
- <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>
- <A NAME="addheaderline()"></A><H3>addHeaderLine()</H3>
- <PRE>
- void <b>addHeaderLine</b>(string $name, string $value)</PRE>
- <DL><DD><P>Add a single header field to the HTTP request header. The resulting
- header line will have the format "$name: $value\n"</P>
- <DL><DT><B>Parameters:</B></DT><DD><code>name</code> - <BR>
- <code>value</code> - </DD></DL>
- </DD></DL><HR>
- <A NAME="addpostdata()"></A><H3>addPostData()</H3>
- <PRE>
- void <b>addPostData</b>(string $name, string $value)</PRE>
- <DL><DD><P>Add a post parameter. Post parameters are sent in the body of an HTTP POST request.</P>
- <DL><DT><B>Parameters:</B></DT><DD><code>name</code> - <BR>
- <code>value</code> - </DD></DL>
- </DD></DL><HR>
- <A NAME="file()"></A><H3>file()</H3>
- <PRE>
- mixed <b>file</b>(string $url)</PRE>
- <DL><DD><P>Make an file call to $url with the parameters set by previous member
- method calls. Send all set headers, post data and user authentication data.</P>
- <DL><DT><B>Parameters:</B></DT><DD><code>url</code> - </DD></DL>
- <DL><DT><B>Returns:</B></DT><DD>array file on success, FALSE otherwise</DD></DL>
- </DD></DL><HR>
- <A NAME="fopen()"></A><H3>fopen()</H3>
- <PRE>
- mixed <b>fopen</b>(string $url)</PRE>
- <DL><DD><P>Make an fopen call to $url with the parameters set by previous member
- method calls. Send all set headers, post data and user authentication data.</P>
- <DL><DT><B>Parameters:</B></DT><DD><code>url</code> - </DD></DL>
- <DL><DT><B>Returns:</B></DT><DD>file handle on success, FALSE otherwise</DD></DL>
- </DD></DL><HR>
- <A NAME="getlastresponseheaders()"></A><H3>getLastResponseHeaders()</H3>
- <PRE>
- array <b>getLastResponseHeaders</b>()</PRE>
- <DL><DD><P>Get the latest server response</P>
- <DL><DT><B>Returns:</B></DT><DD>lastResponse <ul>
- <li>0: HTTP response (e.g. "HTTP/1.1 404 Not Found")</li>
- <li>1: Date (e.g. "Date: Sun, 08 Jun 2008 16:36:37 GMT")</li>
- <li>2: ServerInfo (e.g. "Server: Apache/2.2.3 (Ubuntu) PHP/5.2.1"</li>
- <li>3: Content length (e.g. "Content-Length: 214"</li>
- <li>4: Connection (e.g. "Connection: close")</li>
- <li>5: Content type (e.g. "Content-Type: text/html; charset=iso-8859-1")</li></ul></DD></DL>
- </DD></DL><HR>
- <A NAME="resetheaderlines()"></A><H3>resetHeaderLines()</H3>
- <PRE>
- void <b>resetHeaderLines</b>()</PRE>
- <DL><DD><P>Delete all custom header lines. This will not remove the User-Agent
- header field, which is necessary for correct operation.</P>
- </DD></DL><HR>
- <A NAME="resetport()"></A><H3>resetPort()</H3>
- <PRE>
- void <b>resetPort</b>()</PRE>
- <DL><DD><P>Reset the port used for request to the HTTP default (80).</P>
- </DD></DL><HR>
- <A NAME="resetpostdata()"></A><H3>resetPostData()</H3>
- <PRE>
- void <b>resetPostData</b>()</PRE>
- <DL><DD><P>Delete all custom post parameters.</P>
- </DD></DL><HR>
- <A NAME="setauth()"></A><H3>setAuth()</H3>
- <PRE>
- void <b>setAuth</b>(string $user, string $pass)</PRE>
- <DL><DD><P>Set an auth user and password to use for the request.
- Set both as empty strings to disable authentication.</P>
- <DL><DT><B>Parameters:</B></DT><DD><code>user</code> - <BR>
- <code>pass</code> - </DD></DL>
- </DD></DL><HR>
- <A NAME="setport()"></A><H3>setPort()</H3>
- <PRE>
- void <b>setPort</b>(integer $portNumber)</PRE>
- <DL><DD><P>Select a custom port to use for the request.</P>
- <DL><DT><B>Parameters:</B></DT><DD><code>portNumber</code> - </DD></DL>
- </DD></DL><HR>
- <table BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
- <tr>
- <td COLSPAN=2>
- <table BORDER="0" CELLPADDING="0" CELLSPACING="3">
- <tr ALIGN="center" VALIGN="top">
- <td> <A HREF="../overview-summary.html"><b>Overview</b></A> </td>
- <td> <A HREF="../Api/package-summary.html"><b>Package</b></A> </td>
- <td> <A HREF="../overview-tree.html"><b>Tree</b></A> </td>
- <td> <A HREF="../index-0.html" target="classFrame"><b>Index</b></A> </td>
- </tr>
- </table>
- </td>
- <td ALIGN="right" VALIGN="top" ROWSPAN=3><em><b>IMDBPHP</b></em></td>
- </tr>
- <tr>
- <td BGCOLOR="white"><SPAN CLASS='small'>PREV <A HREF="../Api/imdb.html">NEXT</A></SPAN>
- </td>
- <td><SPAN CLASS='small'><A HREF="../index.html" target="_top"><b>Frames</b></A> <A HREF="../Api/BrowserEmulator.html" target="_top"><b>No Frame</b></A> </SPAN>
- </td>
- </tr>
- <tr><td VALIGN="top"><SPAN CLASS='small'>SUMMARY: FIELD | CONSTR | <A HREF="#_section_method_summary">METHOD</A></SPAN>
- </td>
- <td VALIGN="top"><SPAN CLASS='small'>DETAIL: FIELD | CONSTR | <A HREF="#_section_method_detail">METHOD</A></SPAN>
- </td>
- </tr>
- </table>
- <HR>
- <P><SPAN CLASS='small'><A HREF="http://www.arakhne.org/bugtrack/" target="_top">Submit a bug</A></SPAN>
- </P>
- <P><SPAN CLASS='small'>This document was generated by <A HREF="http://www.arakhne.org/tools/phpdocgen/" target="_top">phpdocgen 0.16</A>.<BR>
- Copyright © 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>
- </P>
-
- </BODY>
- </HTML>