You are going to want to take a look at this MSDN article on Getting Mobile: Using WML and WAP to Display Web Sites on Mobile Devices. By designing WML, the mobile phone knows to use the low-res version.
This page here on Detecting Mobile Devices using ASP.NET and C# shows you how to do it with classes ported from PHP. The API in that link can detect iPhones, Androids, Blackberries, Symbion, etc.
WML decks are stored on an ordinary
web server trivially configured to
serve the text/vnd.wap.wml MIME type
in addition to plain HTML and
variants. The WML cards when requested
by a device are accessed by a bridge
WAP gateway, which sits between mobile
devices and the World Wide Web,
passing pages from one to the other
much like a proxy. The gateways send
the WML pages on in a form suitable
for mobile device reception (WAP
Binary XML). This process is hidden
from the phone, so it may access the
page in the same way as a browser
accesses HTML, using a URL (for
example, http://example.com/foo.wml).
(Provided the mobile phone operator
has not specifically locked the phone
to prevent access of user-specified
URLs.)
Wikipedia Source