busnut Posted April 21, 2009 Share Posted April 21, 2009 G'day again. Still after doing more research, haven't been able to find a way to have a script running on someone else's server to look at my server to display the last updated date of my table. This is the code so far, but what is needed so this code can be put on someone else's server? (thats if its possible?) <?php include("dbconnectionfilename"); // Otherwise we connect to our Database mysql_connect("$hostname", "$user", "$pass")or die("cannot connect"); mysql_select_db("$dbase")or die("cannot select DB"); $res = mysql_query("SHOW TABLE STATUS FROM bla_bla LIKE 'busfleet'") ; echo "Last Updated: ". date('l, F j, Y @ h:ia', strtotime(mysql_result($res,0,'Update_time'))); ?> Quote Link to comment https://forums.phpfreaks.com/topic/155032-display-updated-date-of-mysql-table-but-from-another-server/ Share on other sites More sharing options...
gffg4574fghsDSGDGKJYM Posted April 21, 2009 Share Posted April 21, 2009 use mysql_connect to connect to the other database. It may not work some hosting/shared hosting database allow only connection from 1 host for obivious security reason. If you have access to the database with this server just make a script that output the data you want and file_get_content() it with the script on the others host. Quote Link to comment https://forums.phpfreaks.com/topic/155032-display-updated-date-of-mysql-table-but-from-another-server/#findComment-815408 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.