Php script for app