Generate a search URL with php and redirect through HTML link

时间:2018-09-18 20:12:37

标签: php

I'm trying to access a search-generated URL without actually going to the search results page. Essentially this is the process I would like to mimic:

  1. go to google
  2. type in "cat toys"
  3. copy the new search-generated URL with all the unique get parameters

Is there a way to send that sort of request through php, receive that URL, then pass that URL into a header("Location: googlePage") function?

So essentially the php would look like this:

<? php

$link = ...get google url...

header("Location: ".$link);
?>

I'm trying to manage a certain web app that gets some of its info from a website that auto generates unique URLs each time the page is loaded. I'm assuming it has to do with time stamps being encoded. So even if you refresh the page, the GET parameters will be different. Time stamps are the only thing I can think of that might change this. Either way, the point of my question is I would like to send the request through php, get that URL and send that new URL to my redirect. Is this possible in some kind of way?

0 个答案:

没有答案