[PHP-DB] Re: the body of the response
In article 008101c10e0f$379207e0$c844500c@zeospantera, [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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Re: the body of the response
are you saying that i can grab the output of your echo() statements in YOUR PHP script by Fopen()ing your URL in MY script and then Fread()ing that resulting file pointer? --Yes! That's -exactly- what I've been trying to explain. :) That's the -best- way I can think of retrieving the info from a remote database, unless you allowed remote access directly to the database, which could be a security issue. -Original Message- From: Ken Sommers [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 5:37 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Re: the body of the response thanks CC, are you saying that i can grab the output of your echo() statements in YOUR PHP script by Fopen()ing your URL in MY script and then Fread()ing that resulting file pointer? IF so,, is this done much? or are there easier more stable less error-prone ways to access remote databases? Suppose I had a MUSIC database that you wanted your site visitors to be able to query,and it was OK with me because you had a MOVIE database that i wanted MY site visitors to be able to query, would we set it up this way? ken - Original Message - From: CC Zona [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 16, 2001 2:16 PM Subject: [PHP-DB] Re: the body of the response In article 008101c10e0f$379207e0$c844500c@zeospantera, [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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Re: the body of the response
thanks CC, are you saying that i can grab the output of your echo() statements in YOUR PHP script by Fopen()ing your URL in MY script and then Fread()ing that resulting file pointer? IF so,, is this done much? or are there easier more stable less error-prone ways to access remote databases? Suppose I had a MUSIC database that you wanted your site visitors to be able to query,and it was OK with me because you had a MOVIE database that i wanted MY site visitors to be able to query, would we set it up this way? ken - Original Message - From: CC Zona [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 16, 2001 2:16 PM Subject: [PHP-DB] Re: the body of the response In article 008101c10e0f$379207e0$c844500c@zeospantera, [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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Re: the body of the response
In article 00c801c10e3f$758ba8a0$b943500c@zeospantera, [EMAIL PROTECTED] (Ken Sommers) wrote: Suppose I had a MUSIC database that you wanted your site visitors to be able to query,and it was OK with me because you had a MOVIE database that i wanted MY site visitors to be able to query, would we set it up this way? (Sorry, forgot to respond to this part before...) Well, technically, you could...but generally-speaking, I wouldn't. Not unless the database was very small, the queries were very simple, and there was good reason to avoid using a DBMS (ex. MySQL, PostgreSQL, Access, Oracle, etc.). Also, if either of you considers the contents of your respective databases to be valuable (or sensitive), then you should consider that what you propose to do is put the entire contents of both databases up on the WWW for anyone to view/copy/download in toto. -- CC -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]