Edited Shagor's PHP file