Err.. okay not 100% sure what the question is..
What exactly is not working for you with PHP & IIS?
You say you wrote a script for server - server transfers and you want to port it?
Can't help you with porting code unless i know what it is doing, what it needs to do, and would need to see it.
So a bit more information on what your currently doing might make our life a little bit easier to help ya.
C.