Shall I Upgrade my installed PHP version?

Well the first thing you should consider what the web hosting you are using. If you are on a shared Web hosting, you can not upgrade at all. It depends on your web hosting company to do it. Usually web hosting companies to control the load of their web servers. If the client is consuming too many resources(…)

What You Can do to Prevent eventual Attacks in PHP?

This is not a new vulnerability. In fact, he was introduced long ago in 2003. By the time it seems that only Perl and cruby developers turned to the issue. Most other developers do not care about the language question, including PHP. So it’s basically a rehash of an old problem.This time, security researchers mentioned above contacted several developers(…)

What is the Hash Collision Vulnerability?

Arrays are very popular types of data in PHP and other scripting languages. These types of data that can store a variable number of entries of any type. You can save an unlimited number of entries in the array as you want. This is the main problem of vulnerability known as the Hash collision. In PHP and other(…)

Sort Order by Recent Date on Admin Panel, Opencart

Modify Sort Order by Recent Date for Products on Admin Panel, Opencart: In the file admin/controller/catalog/product.php Find the following code: if (isset($this->request->get[‘sort’])) { $sort = $this->request->get[‘sort’]; } else { $sort = ‘’; } if (isset($this->request->get[‘order’])) { $order = $this->request->get[‘order’]; } else { $order = ‘ASC’; } Replace with following code: if (isset($this->request->get[‘sort’])) { $sort =(…)

Plan on How to make your Own E Commerce CMS

Firstly you should know what is a CMS in technical terms: A ”’web content management system”””(WCMS) is a software system that provides website authoring, collaboration, and administration tools designed to allow users with little knowledge of web programming languages or markup languages to create and manage website content with relative ease. A robust WCMS provides the foundation for collaboration, offering users the(…)

Basic Programming Operators in Java, PHP,C, C++ and more

1. if The if statement evaluates an expression. If that expression is true, then a statement is executed. If an else clause is given and if the expression is false, then the else’s statement is executed. Syntax: if( expression ) statement1; or if( expression ) statement1; else statement2 ; Examples: if(loop<3) counter++; if(x==y) x++; else(…)

Insert Current DateTime into Database, PHP

Current DateTime to be inserted into the database? It’s Easy!!!!!!! 🙂 <?php $date=date(‘Y-m-d H:i:s’); $sql=”insert into register(fname,lname,status,date) values(‘$fname’,’$lname’,’$status’,’$date‘)”; mysql_query($sql); ?>

Upload Image to FTP, PHP

Simple code to upload images to FTP via PHP <form action=”uploadImg.php” method=”post” enctype=”multipart/form-data“> <label for=”file”>Filename:</label> <input type=”file” name=”file” id=”file” /> <br /> <input type=”submit” name=”submit” value=”Submit” /> </form> uploadImg.php below: <?php //check file type & size if ((($_FILES[“file”][“type”] == “image/gif”) || ($_FILES[“file”][“type”] == “image/jpeg”) || ($_FILES[“file”][“type”] == “image/pjpeg”)) && ($_FILES[“file”][“size”] < 20000)) { if ($_FILES[“file”][“error”](…)


Sometimes you need the ID just before it is generated. Here is a way to do that $result=mysql_query(“SHOW TABLE STATUS LIKE ‘tablename’ “); if($result & mysql_num_rows($result)) { $row=mysql_fetch_assoc($result); $next_id=$row[‘Auto_increment’]; } else { die(“error”); }

Md5 Password not good as Hash and Salt – PHP

Click here to know how to use Md5 Create function in PHP to hash and salt the password as follows: <?php function encryptPass($pass) { // Create a salt $salt = md5($pass.”%*4!#$;\.k~'(_@”); // Hash the password $pass = md5(“$salt$pass$salt”); return $pass; } ?> Call the function a: <?php ………… $password = encryptPass($password); ………… ?>