50000 linkte php timeouta düşebilir.
http://www.kodaman.org/yazi/buyuk-siteler-icin-php-ile
Buradaki yöntem daha mantıklı geliyor...