Forum Moderators: coopster

Message Too Old, No Replies

other including my scripts

other including my scripts

         

nick_laws

1:07 am on Aug 19, 2008 (gmt 0)

10+ Year Member



hi
can anyone tell me how to disallow others to include my php files

i have a file which show some data and i dont allow any others to include these on there site
already tried these but not working

include_once("somefile.php"); < at the start of my data file but when i tried to include data file from my other site so its including without any error

any solution?

eelixduppy

1:13 am on Aug 19, 2008 (gmt 0)



Are you talking about including a file across a shared server between accounts? Or across the web? If the latter, I'm afraid you might have an issue completely restricting that.

nick_laws

1:21 am on Aug 19, 2008 (gmt 0)

10+ Year Member



let me give you more details
1st my file

there is a file which get data from mysql and show very simple

but other sites are just using
<?php include "myfile.php"; ?>
and including my file and showing data to there sites i just want to disallow including and that's why i just added include_once("somefile.php"); on the start of my data file after that i checked by including my data file from my other site so its showing data
in my other site there was no somefile.php

so now ok or need more details ?

nick_laws

1:24 am on Aug 19, 2008 (gmt 0)

10+ Year Member



i was trying this
include_once("somefile.php");
because in the somefile.php i added a code which data file read before showing data

nick_laws

2:23 am on Aug 19, 2008 (gmt 0)

10+ Year Member



no help :(

Tommybs

7:45 am on Aug 19, 2008 (gmt 0)

10+ Year Member



Try searching for .htaccess and hotlinking to prevent other people using it. Or you could try placing the file a level above the root directory