RE: [PHP-WIN] PHP and Apache

From: Date: Mon, 04 Sep 2000 17:16:18 +0000
Subject: RE: [PHP-WIN] PHP and Apache
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-2405@lists.php.net to get a copy of this message
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

« previous php.windows (#2405) next »