Justtechjobs.com Find a programming school near you






Online Campus Both


php-db | 2001072

[PHP-DB] Re: the body of the response From: CC Zona (cczona <email protected>)
Date: 07/16/01

In article <008101c10e0f$379207e0$c844500c <email protected>>,
 mrsql.php <email protected> (Ken Sommers) wrote:

> PHP manual says:
> fopen
> fopen -- Opens file or URL
> Description
> int fopen (string filename, string mode [, int use_include_path])
>
> If filename begins with "http://" (not case sensitive), an HTTP 1.0
> connection is opened to the specified server, the page is requested using
> the HTTP GET method, and a file pointer is returned to the beginning of the
> body of the response.
> --------
> can someone explain the clause:
>
> "and a file pointer is returned to the beginning of the
> body of the response."
>
> can someone explain and describe what this "body" is?

Presumably that's what RFC 2616 refers to as the "message body", the part
of the response that follows the headers. Translated: what you get with
fopen() is what you'd get by fetching the same URL with a browser and then
viewing source.

BTW, fsockopen() can be used to get both headers ("Content-type",
"Content-length", "Expires", "Location", etc.) and body
("<HTML>....</HTML>" or whatever).

-- 
CC

-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>