This could be multiple things, try the following;
1. try a different device, side by side with yours, it could be you r router isn't strong enough
2. try a different router; same reason as #1
3. It could be the hardware in your phone is starting to malfunction, try connecting to someone elses router, and see if the results are similar
Originally posted by iHaZeD
My iPhone 4 only connects to wifi when I'm close to the router... Then when I leave the room that the routers in I loose wifi... Does anyone know how to fix this?