I have a database with over 10,000 URLs, however each of them redirects to a different URL. How can I request a url and find out its final destination on a (possibly) multiple redirects path?
You can do this using the cURL functions :
$c = curl_init('http://original.url'); curl_setopt(CURLOPT_FOLLOWLOCATION, true); curl_exec($c); // Error checking here - see curl_error() $newUrl = curl_getinfo($c, CURLINFO_EFFECTIVE_URL); curl_close($c);
Source: https://habr.com/ru/post/1720437/More articles:Inheriting Javascript Properties - javascriptDjango Database Scalability - databaseGDI + gif error - c ++page.insert_html does not embed html with link_to_function (rails) - javascriptHow should I handle failed AppDomains correctly? - c #Error reading an empty text file? - vb6Django: How to model a VBBINARY HEX MySQL field? - pythonHow to display a text file when a button is pressed - vb6Как использовать System.Web.Mvc.SelectListItem - databasehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1720442/am-i-overflowing-my-avrs-flash-memory-with-a-program-thats-too-big&usg=ALkJrhiOQ9baWQTvFcQRvqRNvZM01CgS2QAll Articles