Tag: Source Code

JavaScript – Printing the Periodic Table

The periodic table is a tabular arrangement of the chemical elements, ordered by their atomic number, electron configuration, and recurring chemical properties, whose adopted structure shows periodic trends. Besides a very...

Read More

Phone Bill

Does it ever bother you how much a long-distance phone call is going to cost, after you hung up? With this script, all you have to do is enter the amount per minute, and any initial amount, then click start when the call begins...

Read More

Browser Check

It’s often necessary to make a script only accessible to the newer browsers (that can support the script without error) and keep older browsers from trying to work with it. This script, as an added plus, is very short....

Read More

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

Printing numbers within a range in PHP

The following PHP source code shows that how to print random numbers within a range using. It uses rand() function to return the random numbers within a predefined range. The srand() function is used to provide the seed or arbitrary int number.

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