I want to connect to sql server database from php code.

OS: Win xp SP3
PHP ver 5.1.0
Database : SQL server 2005
IIS ver 5.1

What are the drivers needed for the connection to happen?
I downloaded the php_sqlsrv_52_ts.dll and tried with it. It doesn't work.I think its for PHP 5.2 n above.
I am not able find the ms sql srv driver for 5.1.
Plz help me out in getting the drivers and possible ways and prerequisites to connect php 5.1 to sql server 2005.
Also can anyone tell the difference between thread safe and non thread safe PHP versions.