PHP Trace Redirect -


I have more than 10,000 URL's database, though each one redirects to another URL. How can I request a URL and ultimately (possibly) find out in the path of several redirects?

You can do the following:

  $ c = curl_init ('Http: //original.url'); Curl_setopt (CURLOPT_FOLLOWLOCATION, true); Curl_exec ($ c); // Error checking in here - see curl_error () $ newUrl = curl_getinfo ($ c, CURLINFO_EFFECTIVE_URL); Curl_close ($ c);  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -