-1

I have linkedin hashed urls and i want to get real urls from them. For example, below URL:

https://www.linkedin.com/in/AEEAAARQHxsBL619GKiV1lx06utiSyB2NVYrQLY

gets converted to https://www.linkedin.com/in/anaelis/

Is there any way of getting the second url from first using PHP ?

farazch
  • 21
  • 3

1 Answers1

0

You can request the hashed URL and get the redirect location.

Have a look here: php get url of redirect from source url

Bernhard
  • 414
  • 3
  • 6
  • I checked the link but none of these solutions working for linked hashed urls. – farazch May 22 '20 at 07:44
  • It is the same mechanism: they redirect you to the real url, have you tried it? – Bernhard May 22 '20 at 07:46
  • Yes,i tired and it is giving below output which doesn't have the required url: – farazch May 22 '20 at 08:19
  • HTTP/1.1 999 Request denied Content-Length: 1461 Content-Type: text/html Set-Cookie: trkCode=bf; Max-Age=5 Set-Cookie: trkInfo=AQGh2J7WYkTQDQAAAXI7dbuYvugSbifM4YxRV2rUqe8zS7NgVpwtp44HnuGYheFnIYyDo9ckUYl6BgrKGJr5_FleVaPtTMHd3aIrO8v3lYkE0dyMgIaMkTPbOCQWntWwdTQ_CTM=; Max-Age=5 – farazch May 22 '20 at 08:20
  • It requires you to be logged in on your LinkedIn account, that's why it works on browser, try to go to that URL on a private browser window than you'll see. If you copy the whole request data (with cookies your browser sends) as `curl` than it works on CMD or bash. – endo64 May 22 '20 at 09:01