How to Get WiFi Passwords for an iPhone
When you're on the go and want to connect to the Internet with your iPhone using Wi-Fi instead of a cellular data network, you could find that the Wi-Fi hotspots detected by the device have a lock icon next to their name, indicating that you need to type a password to gain access. The iPhone has a touch-sensitive display and comes with a variety of apps already installed that you can use while connected to the Internet, such as the Safari Web browser and FaceTime for making free video calls. When a Wi-Fi network is locked, you'll need to ask someone for its password.
Visit your neighbor and ask for permission to use her home computer's Wi-Fi network. A friendly neighbor may be happy to give you the password to access her Wi-Fi signal.
Examine your receipt for a temporary password to a locked Wi-Fi hotspot after you buy something at a cafe or a restaurant that offers Wi-Fi only to paying customers.
Ask someone in your company's Information Technology department for a password to the locked company Wi-Fi network so you can access the Internet via Wi-Fi from your iPhone while at work.
Go to the concierge at your hotel and ask for the password for accessing the hotel's locked Wi-Fi network. Ask if the hotel charges an access fee or if it provides free access to paying guests.