Category: Source Code: Programing Source Code

How to use PHP with Oracle Database 11g

This source code shows you how to connect to Oracle Database 11g and execute queries using the PHP. First of all it sets the ORACLE_HOME and ORACLE_SID Environment variables using the putenv() method. Note that to run this code, you will need PHP OCI8 extension enable in php.ini file.

Read More

Connect to sFTP Server in PHP

To use SFTP within your PHP application, a series of fundamental steps need to be executed. First and foremost, you must establish a connection to the SFTP server by utilizing the ssh2 extension, which facilitates secure communication. Subsequently, authentication is crucial to ensure the identity of the connecting entity. This is achieved by providing valid credentials, including a username and password, to the SFTP server. Once authenticated, your PHP script gains access to the server and enables file-related operations such as listing directory contents, downloading files to the local environment, and uploading files to the remote server.

Read More