Probably the simplest thing would be to save it as session data, assuming the redirect is to the same domain?
Otherwise, if you need to send all the query result fields:
header("Location: http://www.urlrewarder.com/ad.php?link=" . urlencode (serialize($link));
Then on the ad.php page:
$link = unserialize($_GET['link']);