simanovich it is totally same.. you just use more memory for ip_adrr array and check with contain function, but really is better to check with equal only first three symbols. (first code).
as for setting sv_downloadurl a lot of times.. some times when players join to server (two or more players at one time, e.g. at map change).
sv_downloadurl can sometimes for LAN players http://mydomain/cstrike/. cause plugin can with this sequence:
LAN JOIN: http://10.91.140.125/cstrike/
WAN JOIN: http://mydomain/cstrike/