Exemplo n.º 1
0
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));
    }
}
Exemplo n.º 2
0
function urlToFolder($siteurl, $rssurl)
{
    return AUTOBLOGS_FOLDER . substr(preg_replace("/[^a-z0-9]/", '', strtolower(NoProtocolSiteURL($siteurl))), 0, FOLDER_MAX_LENGTH) . '_' . urlHash($rssurl) . '/';
}