<?php $code=file_get_contents('http://www.in.com/?utm_source=redirect&utm_medium=in.com'); preg_match_all('/<a href.*>(.*)<\/a>/', $code, $matches); echo "<pre>"; print_r ($matches); echo "<pre>"; ?>