I second the iphone Air Mouse app [track pad, air mouse, keyboard w media keys]. There are also
VLC and
Media Player Classic remote controls iphone apps, even a
VNC app. I have used 3 of those 4 [have not used the VLC app] and they all work well, the VNC app isn't the speediest so don't expect too much from it on your iPhone

I also second the 360 wireless controller. Use something like
xpadder with it. I've done this, it works well. NOTE: xpadder is no longer free [$10], but some of us still have the free version.
If you have some sort of PC-compatible remote such as a X10 device or Gyration remote,
Intelliremote may be a handy piece of software. It costs $25, but if you want to make your remote work with a wide variety of applications, use the remotes regularly, and the bundled software just isn't capable or friendly then itelliremote may be worth the investment. It allows the creation of per-program profiles and you can set binds/actions/scripts for each individual button on your remote.