用PHP连接Oracle数据库服务器

I'm developing a website in PHP that interacts with Oracle10g remote server database. I've googled on this topic a lot and couldn't find a solution, though i got some idea on tnsnames.ora file. I've installed WAMP in my machine. What are steps to connect to Oracle remote database?? Can any one explain it step by step?? I created a site which connects to MySQL datebase a year ago which wasn't this much tough.

$con = oci_connect('username', 'password', '//server ip:port/service name');

It's throwing "Call to undefined function oci_connect()" error.

First of all , you must install and configure OCI8. To do this please, follow this link http://antoine.hordez.fr/2012/09/30/howto-install-oracle-oci8-on-rhel-centos-fedora/

To connect to database :

$Conexion_ID =oci_connect($OracleUser, $OraclePassw, $OracleIP);

To launch a query

$sql="SELECT ...";
    $id_sentence = oci_parse($Conexion_ID, $sql);
    if (!$id_sentence) 
    {
        return false;
    }
    $results = oci_execute($id_sentence, OCI_DEFAULT);

To view results:

 while ($row = oci_fetch_array($id_sentence, OCI_ASSOC+OCI_RETURN_LOBS))
        {
           ....
        }