function url_hash_worker() { // Socket to talk to dispatcher $context = new ZMQContext(); $receiver = new ZMQSocket($context, ZMQ::SOCKET_REP); $receiver->connect("ipc://urlencode.ipc"); while (true) { $url = $receiver->recv(); $receiver->send(urlHash($url)); } }
function urlToFolder($siteurl, $rssurl) { return AUTOBLOGS_FOLDER . substr(preg_replace("/[^a-z0-9]/", '', strtolower(NoProtocolSiteURL($siteurl))), 0, FOLDER_MAX_LENGTH) . '_' . urlHash($rssurl) . '/'; }