Sometimes the programmer need to identify the link contains http or https. Using php code can do this easily. First store the string to a php varible- $URLstring=”https://smarttips.in/smarttips_logo.jpg”; Second use the substr() function to find the occurrence of http or https -substr($URLstring, 0, 7) <?php $fromUrl =’0′; $URLstring=”https://smarttips.in/smarttips_logo.jpg”; if(substr($URLstring, 0, 7) == “http://”) { $fromUrl = “http”;…
Category: PHP
Where is Seller ID in 2checkout?
Login to 2checkout account using your login details 1. On the top right corner of the website header menu can see a profile picture,please click on it 2. A dropdown menu will appear with following details. Account name Account ID Username That account ID is the seller id or sid.
Check database exists in codeigniter
Load the Database Utility Class Notice: Databse Connection should be already established before loading the above class. <?php $this->load->dbutil(); ?> loaded class can access the functions using the following method: <?php $this->dbutil->some_function() ?> <?php $this->dbutil->list_databases(); ?> the above function will show an array of database names: <?php $dbs_smarttips = $this->dbutil->list_databases(); ?> <?php foreach ($dbs_smarttips as $db_name)…
How To Install Node.js Framework with Express and socket.io modules
1. Get a repository or package of node.js using following command sudo apt-get install nodejs 2. After that we need a NodeJS package manager (npm) sudo apt-get install npm Run the node.js using the command node node.js node.js supports different modules Examples : socket.io ,express,http..etc var socket = require( ‘socket.io’ ); var express = require( ‘express’ ); var…
current stable version of php
Current Stable version of php – PHP 5.5.12 Download latest php version