php script to log in js console