There is a text chock full of such links. It is necessary to somehow get a direct url from it and write it in place of the redirect. Please help with the regular schedule!
<a href="http://win.mail.ru/cgi-bin/link?check=1&url=http%3A%2F%2Fredirect.subscribe.ru%2Flaw.russia.review.consdailyrus%2C2215%2F20110128105418%2Fn%2Fm17587277%2F-%2Fmy.consultant.ru%2Fcabinet%2F%3Fmode%3Dstat%3Bclick%3Bd%3D2011-01-27%3Br%3Dfd%3Bs%3Dsubscribe%3Bdst%3Dhttp%253A%252F%252Fwww.consultant.ru%252Flaw%252Freview%252Flink%252F%253Fid%253D961912">О федеральной целевой программе</a>
Added .
Thank! It was possible to read the final link without redirects by adding this:
foreach($res[1] as $n => $link) if (!empty($res[2][$n])) { $url = urldecode($res[2][$n]); if ( (preg_match('/redirect.subscribe.ru/is', $url)) > 0 ) { parse_str(parse_url($url, PHP_URL_QUERY), $url); $url = $url['mode']; $l=strpos($url, 'dst='); $url = str_split($url,$l+4); $result = $url[1].$url[2]; } else { $result = $url; } $text = str_replace($link, $result, $text); }