IMDBPHP

Overview | Package | Tree | Index

IMDBPHP

PREV NEXT | Frames No Frame
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Api
Class BrowserEmulator

class BrowserEmulator

BrowserEmulator class. Provides methods for opening urls and emulating a web browser request.

Method Summary
void | addHeaderLine() Adds a single header field to the HTTP request header.
void | addPostData() Add a post parameter.
void | file() Make an file call to $url with the parameters set by previous member method calls.
void | fopen() Make an fopen call to $url with the parameters set by previous member method calls.
void | resetHeaderLines() Deletes all custom header lines.
void | resetPort() Resets the port used for request to the HTTP default (80).
void | resetPostData() Deletes all custom post parameters.
void | setAuth() Sets an auth user and password to use for the request.
void | setPort() Selects a custom port to use for the request.

Method Detail

### addHeaderLine()

    void addHeaderLine()

  Adds a single header field to the HTTP request header. The resulting header line will have the format $name: $value\n

### addPostData()

    void addPostData()

  Add a post parameter. Post parameters are sent in the body of an HTTP POST request.

### file()

    void file()

  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. Returns the requested file as an array on success, or false on failure.

### fopen()

    void fopen()

  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. Returns a file handle on success, or false on failure.

### resetHeaderLines()

    void resetHeaderLines()

  Deletes all custom header lines. This will not remove the User-Agent header field, which is necessary for correct operation.

### resetPort()

    void resetPort()

  Resets the port used for request to the HTTP default (80).

### resetPostData()

    void resetPostData()

  Deletes all custom post parameters.

### setAuth()

    void setAuth()

  Sets an auth user and password to use for the request. Set both as empty strings to disable authentication.

### setPort()

    void setPort()

  Selects a custom port to use for the request.

Overview | Package | Tree | Index

IMDBPHP

PREV NEXT | Frames No Frame
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug

This document was generated by phpdocgen 0.16.
Copyright © 2002-03 Stéphane GALLAND (under the GNU General Public License)