added sendDebugLog and php lib for converting everything to php and JSON