I myself recently faced with such a task. Trying to solve it, but a little that turns out. Tell me, can my problem be complicated by the use of a proxy server, or are these things unrelated?