$file = $_SERVER['SCRIPT_FILENAME']; $host = $_SERVER['SERVER_ADDR']; $db = mysql_pconnect("mysql1.000webhost.com", "a3310457_counter", "a3310457_akis", "*****"); #i changed host and details here $counter = counter( $file, $db, $host );