This project can be useful for you if you can't get static IP address from your internet provider and you have a website that you can use to keep the data.
In this project the WiFi module is set to Client mode and it sends data of the Arduino analogue input A0 and digital input D3 to a website. At the same time the Arduino reads the buttons state which selected on the website and switches output 7. I can browse at the Arduino inputs data or control the Arduino output by logging to a page in my website from anywhere.
Changes to the code allows for transfer of more data. A disadvantage of this system is that you can't access the wifi module directly from a browser on the internet. The idea is taken from here: https://thingspeak.com/. The process is to request a file and to add the data using URL parameters. The PHP file (a31.php) records the data on another file a32.php. To read inputs and select output log to page a33.php (a34.php records the output state). I added a suggestion for a PHP script. To see my data log to page: http://moty22.co.uk/a33.php. The Arduino's output is updated when the wifi module sends data every 20 seconds.
In the code add SSID and PASSWORD of the wifi network, change also the name of my website to yours. You can use my website to test your project.
You can download the php files and get more info on my website: http://moty22.co.uk/wIfI.php