View previous topic :: View next topic |
Author |
Message |
gentoonewb39 Guru
Joined: 28 Jul 2005 Posts: 317
|
Posted: Tue Jun 27, 2006 12:29 pm Post subject: Extract direct link from php file |
|
|
Hi one webserver that I frequently use uses the download method of having the files linked to as www.foo.com/some.php/someotherfile.zip is there anyway I can find/extract a direct link to the someotherfile.zip?
PS No I don't intended to use this for hotlinking. |
|
Back to top |
|
|
martin.k Guru
Joined: 28 Nov 2004 Posts: 493 Location: Wylatowo, Polska
|
Posted: Tue Jun 27, 2006 12:55 pm Post subject: |
|
|
What for ??? _________________ linux-2.6.17 +ck +R4 +lockless +genetic-as +... więcej nie pamiętam
LRU #299256 |
|
Back to top |
|
|
gen2fox Guru
Joined: 25 May 2004 Posts: 544
|
Posted: Tue Jun 27, 2006 12:59 pm Post subject: |
|
|
It may not be possible if they store the files in a directory outside public_html (or whatever it's called). _________________ python>>> q="'";s='q="%c";s=%c%s%c;print s%%(q,q,s,q)';print s%(q,q,s,q)
blog |
|
Back to top |
|
|
gentoonewb39 Guru
Joined: 28 Jul 2005 Posts: 317
|
Posted: Tue Jun 27, 2006 1:20 pm Post subject: |
|
|
@gen2fox
The files are availibale to the public so dosn't that mean that they are inside the public_html? |
|
Back to top |
|
|
Cocker68 Apprentice
Joined: 16 Jan 2003 Posts: 227 Location: Germany
|
Posted: Tue Jun 27, 2006 1:37 pm Post subject: |
|
|
gentoonewb39 wrote: | The files are availibale to the public so dosn't that mean that they are inside the public_html? | No. apache can only reach files in a defined document-root-dir, whereever PHP is able to reach files from the whole filesystem.
They probably use kind of URL-rewriting from www.foo.com/some.php/someotherfile.zip to www.foo.com/some.php?parameter=someotherfile.zip and PHP can lookup this file in /downloads/someotherfile.zip for example.
- Cocker :wq |
|
Back to top |
|
|
gen2fox Guru
Joined: 25 May 2004 Posts: 544
|
Posted: Tue Jun 27, 2006 2:53 pm Post subject: |
|
|
Cocker68 wrote: | gentoonewb39 wrote: | The files are availibale to the public so dosn't that mean that they are inside the public_html? | No. apache can only reach files in a defined document-root-dir, whereever PHP is able to reach files from the whole filesystem.
They probably use kind of URL-rewriting from www.foo.com/some.php/someotherfile.zip to www.foo.com/some.php?parameter=someotherfile.zip and PHP can lookup this file in /downloads/someotherfile.zip for example.
- Cocker :wq |
No need for a rewrite rule by the way, requesting foo.php/bar does call foo.php, in this case "bar" can be accessed via $_SERVER['REQUEST_URI']. _________________ python>>> q="'";s='q="%c";s=%c%s%c;print s%%(q,q,s,q)';print s%(q,q,s,q)
blog |
|
Back to top |
|
|
|