Gii ipFilters: Using A Dynamic IP

I work mostly from home and like a lot of people in that situation, I have a dynamic IP. For VPN access into my network when I’m elsewhere, I use dyndns.org to maintain a hostname like “myname.dyndns.org”. A dns client updates dyndns.org whenever my IP address changes. Pretty common stuff.

Anyway, to access Gii (from home) on a web hosted install, I use the following simple change to the main.php config file:


....

'ipFilters'=>array(gethostbyname('myname.dyndns.org')),

....

I had just made the decision to extend the code to accept hostnames when a light bulb went off. I hope this helps someone in a similar situation.