Forum Moderators: coopster

Message Too Old, No Replies

redirected urls

the way to protect my content?

         

macdar

7:45 pm on Feb 4, 2006 (gmt 0)

10+ Year Member



hi guys,

is it possible to open in a php/asp/jsp etc.. script a page which is redirected?

in other words: can I protect my content with the following url: www.example.com/redirect.php?id=1,
so that no one will be able to get the content with the file_get_contents() function?
I've tested it and it seems to be fine: can not fetch the final destination.
So, please let me know if there's a way to overcome this.

Thanks.

mike73

7:18 pm on Feb 7, 2006 (gmt 0)

10+ Year Member



As I understand it, and outside server can only see what your server presents to it, which would be a rendered page without the source code. In other words, no one can get your code simply by calling file_get_contents on a page on your server- unless maybe it's a coworker on the same server/domain, for example.

coopster

8:42 pm on Feb 7, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



That's true, Mike73. But it really depends on what macdar is defining as "content" here. If "content" means the rendered HTML page, then no, you can't do anything about it. That's how the web works. Whether the URL is keyed into the browser's address bar or if a script retrieves your web page they are going to get the rendered HTML.

vevs

10:27 pm on Feb 8, 2006 (gmt 0)

10+ Year Member



I think macdar has some page somewhere
www.domain.com/page.html

and he is trying to redirect users to that page.html page using header or javascript redirection in the redirect.php script
so id=1 will redirect to page.html, id=2 may redirecr to nextpage.html

and if this is the case, then you should probably use javascript redirect on the redirect.php page, because it's possible to follow the header redirects.