How to send a notification when a device connects to a Wi-Fi network without an app?

I was staying in a hotel last week and when I connected to their Wi-Fi network with my iPhone 4S, after agreeing on their terms and conditions (you must choose their network and this takes you automatically to the hotel's site where you agree some terms to complete the connection) a push notification trying to sell something came into my screen; this notification had "accept" and "later" buttons. Does anyone know how this happened, is it a notification launched by the website or sent directly though the Wi-Fi network? I didn't have any apps related to the hotel which may have launched it.

Some websites have fake notifications. They're really just pop-up advertisements disguised as notifications. Yesterday I was on a website and it said "free iPad offer" and then had "accept" and "ignore" as options. I could tell by the way the box looked it was just something the website was saying to me and I ignored it.

As you said it was a PUSH notification. THEY pushed it to YOUR device ( is what PUSH means) Just decline the thing (later) and unistall it when you no longer need their network.