Saving a curl response into a php variable

Saving a curl response into a php variable Here is example to save a curl resonse into a variable in php <?php //URL of targeted site $url = “http://www.putyourapihere.com/”; $ch = curl_init(); // set URL and other appropriate options curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // grab URL and pass it to … Read more

get the last 7 characters of a PHP string

get the last 7 characters of a PHP string Use substr() with a negative number for the 2nd argument. $newstring = substr($dynamicstring, -7); string substr ( string $string , int $start [, int $length ] ) If start is negative, the returned string will start at the start’th character from the end of string Example: <?php echo … Read more

mysql length function : calculate length of a column

mysql 5.7

mysql length function : calculate length of a column Function length() Return the length of the string Usages SELECT CustomerName, LENGTH(CustomerName) AS LengthOfName FROM Customers; Tablenames Records Customers 91 Categories 8 Employees 9 OrderDetails 2155 Orders 830 Products 77 Shippers 3 Suppliers 29    

asterisk auto dialing using call file

asterisk

asterisk auto dialing using call file Asterisk call files are structured files which, when moved to the appropriate directory, are able to automatically place calls using Asterisk. Call files are a great way place calls automatically without using more complex Asterisk features like the AGI, AMI, and dialplan, and require very little technical knowledge to … Read more

Vicidial Lead upload sample csv file

vicidial lea upload file

Vicidial Lead upload sample csv file Below is a standard vicidial lead csv/excel template to upload the data. Download link : ClickHere  refer the below video of reference Open the file in excel Fill the necessary fields (like , Phone, Phone code, Firstname , lastname etc) Save the file Now click the (save as) option from … Read more

Install mysql on centos linux

mysql 5.7

Install mysql on centos linux Reference : https://blog.eduguru.in/linux-2/install-lamp-server-apache-mysql-php-on-rhel-centos-scientific-linux-6-56-4 Install MySQL MySQL is an enterprise class, open source, world’s second most used database. MySQL is a popular choice of database for use in web applications, and is a central component of the widely used LAMP open source web application software stack. To install MySQL, enter the following … Read more

MySQL conditional expression CASE

MySQL conditional expression CASE MySQL CASE expression is a conditional expression that allows you to construct conditions inside a query such as SELECT or WHERE clause.   CASE WHEN condition_1 THEN result_1 WHEN condition_2 THEN result_2 … ELSE result END The CASE expression returns the result such as result_1, result_2, etc., if the condition is true. If all conditions are false, then the result in the ELSE part … Read more

MySQL 5.7 features

mysql 5.7

MySQL 5.7 features MySQL 5.7 is the best release ever of the world’s most popular open source database and provides a new, advanced feature set designed to enable those who are building the next generation of web-based and embedded applications and services.  — Ref. https://www.mysql.com/why-mysql/white-papers/whats-new-mysql-5-7/ Multi-source Replication 3x Faster Performance New Optimizer Native JSON Support GIS … Read more

Find Files and Directories Based on Size in Linux

find command linux

Find Files and Directories Based on Size in Linux In Unix-like and some other operating systems, find is a command-line utility that searches one or more directory trees of a file system, locates files based on some user-specified criteria and applies a user-specified action on each matched file. To find all 50MB files, use. # find / … Read more