Goal not tracked

I have some outgoing links which I’ve put in a .php header: location. Somehow I can’t get this tracked.

My set up:

www.mydomain.com/out/link.php?var=1&var=2

link.php contains:

get var =1
get var=2

header(‘location: www.awayfrommydomain.com/var=1&var=2’)

In piwik:

new goal -> ‘visit a given url’ -> contains: /out
allow goal to be converted more than once

I’ve tested it but no tracking. It is in real time isn’t it?