Page 1 of 1

need file name for filesize()

Posted: Thu Jul 23, 2009 9:58 am
by ebookers
Hi,

I'm using fread() PHP methods so I gotta use the filesize() method.
But this method works only with a file name (zeze.html, popo.txt, titi.xml, etc...)

The problem is that I have to fread() content on a webpage who is in url rewriting format (default display of apache server)
EXEMPLE IMG HERE : http://translator.ebookers/folder_server.gif
the url is written this way (http://www.site.com/folder/folder/folder/)
And has no file at the end.

Do you know :
1 > If there s a file by default on Apache folders presentation (that I can add at the end) http://translator.ebookers/folder_server.gif ?
2 > Or If I can use filesize() differently
3 > if ther is other ways to get http streams

Merci,
Sylvain.

Re: need file name for filesize()

Posted: Thu Jul 23, 2009 5:12 pm
by andyhoneycutt
If you're just scraping the data, you could use

Code: Select all

$data = file_get_contents("http://location.of.webpage");
-Andy