Here is a simple PHP method for consuming a different APIs As you can see, the method supports cookies, XML requests, basic HTTP Auth, etc…. Leave a comment if you …
Category: PHP
Laravel whoops output – How to hide. env passwords
As of Laravel 5.5.13, there’s a new feature that allows you to blacklist certain variables in config/app.php under the key debug_blacklist. When an exception is thrown, whoops will mask these …
Quick Laravel – Part 1
Laravel 5.x requires PHP version 5.5.9+. Also, in case you want to use database (sqlite or mysql), install Sqlite3, Mysql or PostgreSQL server. Install composer with curl -sS https://getcomposer.org/installer | …
SSH2 extension for PHP on CentOS 6
Before we can build and install ssh2 extension, we’ll need a few packages yum install gcc php-devel php-pear libssh2 libssh2-devel makeyum install gcc php-devel php-pear libssh2 libssh2-devel make Install the …
CentOS 5 Call to undefined function sqlite_escape_string()
If you’re using PHP 5.2.x on RHEL/CentoOS and you received error PHP Fatal error: Call to undefined function sqlite_escape_string()PHP Fatal error: Call to undefined function sqlite_escape_string() don’t worry. The reason …
Extra Packages for Enterprise Linux – EPEL HowTo
EPEL (Extra Packages for Enterprise Linux) is a volunteer-based community effort from the Fedora project to create a repository of high-quality add-on packages that complement the Fedora-based Red Hat Enterprise …
Zen coding in Aptana
Zen Coding is a set of plug-ins for text editors that allow for high-speed coding and editing in HTML, XML, XSL, and other structured code formats. To install ZC plugin, …
Read file line by line with PHP
$fh = fopen("myFile.txt", "r"); while (!feof($fh)) { $line = fgets($fh); echo $line; } fclose($fh);$fh = fopen("myFile.txt", "r"); while (!feof($fh)) { $line = fgets($fh); echo $line; } fclose($fh);
PHP Fatal error: Class ‘DOMDocument’ not found in …
This morning I found the next errors inside the web server log. PHP Warning: include(DOMDocument.php) [<a href="function.include">function.include</a>]: failed to open stream: No such file or directory in …… PHP Warning: …
How to install phpshield loaders
PHPShield is an PHP encoder application that is used to protect the PHP code which is an excellent option for encoding your PHP files if you don’t require any time …