Note that in the third tutorial where the app "clicks" the ads the USER AGENT is changed to bot-like so it's not a hidden evil click-fraud app. The use of the app is one of many possible (it also may not click them, just count how much adds shows up on certain pages etc.), and not all ads are contextual like Google Ads but randomly displayed from a pool of adds for a given page - so refreshing gets more data.
This tutorial shows whats possible with WebKit, which isn't possible with CURL :)