0

I am using file_get_contents() function to get a page source. When I am trying to get the source of http://example.com, which is internally redirected to http://example-new.com. Here I am getting the source of second URL. Is there any solutions to get second URL to identify to which URL it is redirected to.

EKL
  • 143
  • 3
  • 13

1 Answers1

-1

Just make request, wait for 200 and check url. I would recommend reading about curl.

masahuku
  • 184
  • 6