nofel — 2013-10-15T12:42:41-04:00 — #1
I am new to php and wanted to ask, how to read this code.
droopsnoot — 2013-10-15T13:28:18-04:00 — #2
Seems to me that if the client IP address is an even number, it redirects to the specified location, otherwise it does not. Post the code here though for more comments.
scallioxtx — 2013-10-15T14:46:16-04:00 — #3
^ What he said
Looks like either load balancing (send a portion of the visitors to a different server for balanced load among different servers -- although this usually isn't done via php because there are way faster options) or A/B testing.
kylewolfe — 2013-10-15T17:05:27-04:00 — #4
That's interesting, may I ask where you found it?
thereddevil — 2013-10-15T22:05:41-04:00 — #5
That looks like a simple attempt on doing split testing.
I.e. testing what version of a page converts best.
Reason for that is simply due to if your "optimistic enough" to try and make a load balancer in PHP, you would not base it on modulus, since that can send all visitors through the day to one of the servers if your unlucky.
Still an odd way of doing it, since split testing is normally done with round robin, or geo location.