you need to use javascript to get thier screen size. then have javascript redirect them to the correct page. since this wont work at all if javascript is turned off, i dont see any reason to even use php, just use js for the whole thing.
if javascript is off this obviously wont work, so youll need to decide on a default page.
i would recomend you just make your design work w/ multiple resolutions.