Unstoppable Domains โ€” AI Assistant

To print the URL redirection

SpaceshipSpaceship
Watch
Impact
49
I search out the web but could get the solution, hopefully the expert here could me out. :P

Let's say a url
http://a.com is redirected to http://b.com

we input the url http://a.com
how can we use php script to print out the url http://b.com?

Thanks!
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains โ€” AI StorefrontUnstoppable Domains โ€” AI Storefront
What do you mean print it out? I want to grab all contents of b.com put display it on a.com? Is there a particular reason why you want to that instead of a redirect?
 
0
•••
i think you got me wrong....

a php script to detect whether the url is redirected to another url or not.
 
0
•••
The easiest way is to use PHP5's get_headers() function and see if it returns a value for Location.

Example:

PHP:
$headers=get_headers($url,true);
if($headers['Location'])
	echo "Redirects to {$headers['Location']}";
else
	echo "No redirect";
 
0
•••
Appraise.net
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy โ€” Zero Commission
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back