I know that, but I the link I want to get is a link that redirects to an other page. I want to know what the URL of that page is. Wget is perfect for that. I could do a wget --spider link and I see the link I want to have on my screen. But now I have to have it in my php code. But how? So I really need the output of wget.
I think I'm gonna try a workaround.