Modified the php script