Now sends JSON as a response. A site parameter can be passed around and an encryption function was added to the php script