Below is a simple script to generate random string/password using PHP. You can customize the same by adding special characters. Hope this is helpful.
Category: PHP/MySQL
All content related to PHP and MySQL
Pyramid program in PHP
Hello All, This is kind of fun stuff. I was bored and decided to build a Pyramid Program in PHP. Above code on execution will output Enjoy 🙂
Encode Decode image using PHP
Hello, I am describing here the way to 1) Encode image to generate a string 2) Decode image from a given encoded string 1) Here you need to specifiy the path of your image in variable ‘$image_path’ 2) Here I am using the string produced from the executing the code seen above, it can be […]
Number of days between dates
One day I was just thinking about days spent by me on this earth, so I decided to make a script for the same. I am writing here the code, just make a new empty php file and copy and paste the script and execute it to find out the days between two dates. Hope […]
Delete Directory in PHP
This post will be helpful to those who work with directories and files. I am writing here the PHP code for deleting the directory.
MySQL Database restore
I have already listed the PHP script to generate backup of database in one of my earlier post. I am listing here the PHP script to restore database from mysql database file.
Passing by Reference
I am listing here a simple example to explain ‘passing by reference’ in PHP. I hope it is helpful. For further information kindly visit Passing by Reference
Insert and Retrieve file with MySQL
Some of you might be knowing that there is a functionality in MySQL database for storing files and retrieving the same. This is mainly used when we need to reduce response time for retrieving and using files in our application. I am listing here the method for inserting image file in and retrieving image file […]
Mail in PHP
I am listing here the method for sending mail using PHP code. This will be useful in many ways, for example when you want to sent mail after say a form is submitted. Note: This may work in local , but I am suggesting you to execute on live server.
Extracting String
This is small but very useful script. I have shown example for extracting only ‘src’ value from the ‘img’ tag, but you can modify and use as per your requirement using ‘preg_match_all’ function. Output will be ‘http://www.somesite.com/abc.jpg’