R: [PHP-WIN] PHP and Apache
| From: | Giuseppe D'Ambrosio | Date: | Tue, 05 Sep 2000 10:45:59 +0000 |
| Subject: | R: [PHP-WIN] PHP and Apache | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-2415@lists.php.net to get a copy of this message | ||
-----Messaggio originale-----
Da: Andreas Lange <CodeDuck@gmx.net>
A: php-windows@lists.php.net <php-windows@lists.php.net>
Data: lunedì 4 settembre 2000 19.06
Oggetto: RE: [PHP-WIN] PHP and Apache
>
>Hi
>
>I try to explain it a bit ...
>
>I comment the lines down here
>
>> -----Original Message-----
>> From: Giuseppe D'Ambrosio [mailto:gdambrosio@cspnet.it]
>> Sent: Monday, September 04, 2000 5:14 PM
>> To: php-windows@lists.php.net
>> Subject: [PHP-WIN] PHP and Apache
>>
>>
>> ok,
>> php produces HTML and apache sends it back to the browser (or client)
>>
>> but now I've got a similar question (not strictly php-related I
>> admit) that
>> starts from the fsockopen() example on php-manual:
>> ____________________________________________________________
>> $fp = fsockopen ("www.php.net", 80, &$errno, &$errstr, 30);
>> if (!$fp) {
>> echo "$errstr ($errno)<br>\n";
>> } else {
>> fputs ($fp, "GET / HTTP/1.0\n\n");
>> while (!feof($fp)) {
>> echo fgets ($fp,128);
>> }
>> fclose ($fp);
>> }
>> ____________________________________________________________
>>
>> this gets the entire page (plus http headers) but /doesn't/ get the
images
>> (or any other linked object)..
>>
>> anybody knows why this happens ?
>
>it is simple. Every file on the webserver must be requested seperatly!
>
>> how does it work between server and browser?
>
>1. the browser request the page (i.E. the php-file)
>2. the server executes the php-file and sends the generated file bak to the
>browsers
> (generally a html-page)
>3. the browser try to display the page an realize, that there are images
>linked in
> the html-page, so the browser send requests for each embeded file (i.E.
>images)
>4. the server send these files back to the browser. viola, all should now
to
>be
> viewed correctly.
>
>> how can I get the page /together/ with the images? (I know how to get
>> separately the images..)
>
>that's the way you must do it: analyse the page for linked images, and get
>them seperatly.
>
>> anybody has a script to do this work?
>
>don't know, cause it's too easy ;)
>try to programm a class, that makes this all to you ... and finally, share
>it with us =8:)
>
>
>> TIA
>> Giuse
>
>CodeDuck, the best programms are the self-written ones
>
thank you everybody who helped me,
on and off the list
I simply tried to get the home page of my local web server (so 127.0.0.1),
copied the apache-logo (a .gif) from htdocs (where it stands normally) to
the same directory of the php script.. and now I get it (!) (sure, it's just
the same as saving pages with IE..)
(I've to say I feel a bit idiot..)
TY
Giuse