Performing a 301 re-direct with PHP is a more and more common question that has generally been asked due to the emphasis on making sure that ranking points aren't lost and duplicate content issues are resolved as best as is possible.
Luckily to perform a 301 permanent re-direct from one location to another is very easy with PHP, here's how:
<?php
Header("HTTP/1.1 301 Moved Permanently" );
Header("Location: http://www.abc.com");
?>