Website is a mirror. How to detect this programmatically in php? -


for example have 4g-market.ru mirror peterhost.ru. how can detect programmatically?

this function detects single-bounce redirect (site1 -> site2, not site1 -> site3 -> site2):

function isredirect($url) {   $headers = get_headers($url, true);    $status = $headers[0];   list($protocol, $code, $message) = split(' ', $status, 3);    return ($code >= 300 && $code < 400); } 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -