* Thus wrote Andrea Tricco ([EMAIL PROTECTED]):
> Hi,

Hello

> 
> I'm using the function "file_get_contents()" to replicate the content of a
> remote html page on my server.
> 
> But, the function file_get_contents() works even when the name of the file
> is not specified. For example:
> 
> "http://www.php.net"; rather that "http://php.net/index.php";

http://php.net/           - apache serves index.php
http://php.net            - apache redirects to http://php.net/
http://php.net/index.php  - servers index.php

All three of these will show the same content.

> 
> Does a method exist to know the name of the file received form web server?

Nope

> 
> I would like to write a program that automatically downloads the images
> inserted into a html page.

The odds are if you right one, it wont be 100% compatible with all
sites.  What in essance you are doing is writing a web browser, and
there are a lot of things that need to be taken care of to handle
special cases.


> 
> For this reason, I need to determine the paths of the images in order to get
> them from the web server.

For starters probably reading up on HTML and HTTP specifications
might be a good place to start. ( http://w3c.org )

> 
> In other words, my program should work as the "Save as" function (File menu)
> of any Web browser.

There are alternative choices, there are programs out there like
webget and wget that will automatically do what you want to do. You
could use those programs with a system call. 

> 
> 
> 
> Can anybody help me?

I hope I did already :)


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to