Well I have this code:
// horoscope.php
<?php
include_once('config.php');
include_once('database.php');
for($i=0; $i < count($data); $i++) {
if($username == $data[$i]['username']) && ($password == $data[$i]['password'])) {
$authorised = 'true';
}
}
if(!isset($authorised)) {
exit('You are not authorised to run this script.');
}
// the rest of the horoscope.php script goes here
?>
// config.php
<?php
$username = 'bob';
$password = '12345';
?>
// database.php
<?php
$data[0]['username'] = 'bob';
$data[0]['password'] = '12345';
$data[1]['username'] = 'joe';
$data[1]['password'] = '67890';
$data[2]['username'] = 'jill';
$data[2]['password'] = 'abcde';
$data[2]['username'] = 'jane';
$data[2]['password'] = 'fghij';
?>
I have those scripts up on my server and running ok.
Now I want to have the database.php file on another server. So If I give a horoscope script to my users and someone after doesn't want to pay the next month or next year subscription then remotely from my server to delete the password and user name from the database.php so that he can't run the script.
So How can I include the database.php file from another server?
Because if I use
include_once('http://mydomain.com/database.php'); it doesn't work.
Is there a way to do that?
Thanks for your help and time in advance
James