I'd like to know the algorithm to do this so that I can do it up in PHP.
I gave you the link to the thread, if you'd read it you'd have found this link https://bitcointalksearch.org/topic/vanity-pool-vanity-address-generator-pool-84569 which explains the process reasonably clearly (it relies on the properties of the ECDSA addition operation as regards private keys and their generated public keys, not being a math guru I can't explain it myself).
I find the ECDSA code in JackJack's Pywallet to be the easiest to follow, so you may want to start there, though it does not implement the split-key algorithm. You'll need to look at the vanitygen source for that (which I find quite difficult to follow) or the javascript in bitaddress.org.