For the past months I have found several websites using some kind of \"widget\".
If I open a website having this widget with my iPhone, it will display a link to the (we
You're looking for "Smart App Banners".
http://developer.apple.com/library/ios/#documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html
Usage is as simple as adding the following meta tag to your web page's source code, specifying the Apple App Store ID some affiliate data, and even a URL scheme argument.