PHP AND JAVA CODES