View Single Post
Old 17-02-2009, 01:58:35 PM     #6 (permalink)
Skinner

 
Skinner's Avatar
 
Join Date: Jul 2008
Location: Manchester
Posts: 2,507
Skinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond repute

Due to .ac, .com, .info, .travel, .museum, .whogizzafuck the scripts was all failing on full tests.

My original 100 line function, used a multidimentional array, where I exploded the URL on a period, then tested the highest element of the array against tld[x], then tested tld[x][y] on highest -1, to see if that existed on the second level, if it was a positive then I accepted url+tld[x][y]+tld[x], else I assumed url+tld[x], then I performed a DNS look up to test it, where URL = part -3 of the exploded url.

However it was a nightmare finding all the official subs to build the multi-dim and it slowed the script down doing look ups and stuff so I went all slasher movie and hacked it up
__________________
Browse:
Skinner is offline