for windows it might be better to just get the setup at http://gnuwin32.sourceforge.net/packages/openssl.htm
instead of the sources and try to compile 'em yourself ^_~
In order to use the OpenSSL functions you need to install the » OpenSSL package. PHP between versions 4.0.5 and 4.3.1 will work with OpenSSL >= 0.9.5. Other versions (PHP <=4.0.4 and >= 4.3.2) require OpenSSL >= 0.9.6.
You are strongly encouraged to use the most recent OpenSSL version, otherwise your web server could be vulnerable to attack.