Posts marked with "PHP" in categories

Auto Login Without Form in phpMyAdmin

If you’re using **phpMyAdmin **(PMA), you know that every time you use the application, you have to log in and when the cookie expires, you have to log in again. It’s an annoying thing to log in every time for a developer who needs to do work fast. There is a way to stop this annoying thing. It’s by disabling the login form and auto login when you visit phpMyAdmin.... [READ MORE]

Installing Laravel In Sub Directory & Deny Access To It

Laravel is a PHP framework that reduces the work load of creating PHP applications. As it is a framework, there are limitations and some problems just like any other PHP program. Laravel framework has a “public” folder. The HTML files that are going to be displayed on Web Server will be from this folder. Since it is a sub directory of the framework, to access the real site, we would have to go to the following URL :... [READ MORE]

StatCounter Popular Posts Plugin For WordPress

StatCounter doesn’t really have a Popular Posts plugin for WordPress. Though many WordPress blog uses SC, it doesn’t have a widget that shows the Popular Posts. I uses it and wanted to have this feature. So, I created a plugin called StatCounter Popular Posts written in short ad SPP. It’s a plugin that adds a widget to WordPress which can be added to the WordPress Site layout (sidebar, footer, header …).... [READ MORE]

How To Set Same Cookie On Different Domains

You might have seen sites like Google setting the login status cookie on the various domains of theirs (YouTube, Blogger). As you may know, cookie can’t be set in a different domain from another domain directly. If you’re having multiple sites in where you need to set a cookie from a parent site, you can use basic **HTML **and JS to set the cookies. Google is using this same way.... [READ MORE]

Compress PHP Site – HTML, CSS & JS

UPDATE Site Compressor is now an app on Lobby. To use Site Compressor, download Lobby and install Site Compressor app. Compressing / minifying a site’s code will improve the data transfer from server to the client. The browser will be easily able to get the content from server. There are a lot of benefits that comes with site compression. I use compression too in my own way. My site Open is heavily compressed.... [READ MORE]

Minify JavaScript Using PHP

Making JavaScript codes is difficult and long. In Web projects, we try our maximum to minify JavaScript and CSS to serve content better. There are many sites on the Web that helps to compress/minify JS code. There is even a PHP Software to do this. In this post, I’ll tell you how to use the PHP jSqueeze library to minify JavaScript code. DownloadDemo Setting Up You can get the class code of JSqueeze from here.... [READ MORE]

Find MIME Type of File in PHP

**MIME **type is needed to know what kind of file we’re looking at. HTML files have the MIME type text/html , for gif image, it’s image/gif and so on. Since PHP is a dynamic content creator language, MIME type is a very important thing you should know about in PHP. In this small post, I’ll tell you how to find the MIME type of a local file in your server.... [READ MORE]

Call Parent Class construct Before Child’s In PHP

If in PHP, you are making a child class of a parent class in which both have the __construct function and you want to call both of them when the child object is made, it won’t work. This is because, when you make the child class object, it’s construct function is called. The parent’s construct function is being overridden by the child. The PHP manual on OOP (Object Oriented Programming) notes this :... [READ MORE]

Define Array as Value of Constants in PHP

Constants are something that is needed for every computer languages. In PHP, too you can set constants. But you can only set string values which is a pity, because if you want to set arrays for making it easy for obtaining multiple values, you can’t do it. In this case, we explore the unimaginable possibilities of programming languages. As like any other language, PHP too has a secret weapon to accomplish this task.... [READ MORE]

PHP Secure, Advanced Login System

We all get new ideas every day. With the idea, we build more and more sites. Mostly, the sites would have a login system, right ? So, when we create new projects (sites) every time, we will have to create login systems for each one. I do the same thing and I’m tired of creating the same thing over and over again. So, I decided to create a login system that can be integrated to any PHP powered sites.... [READ MORE]

Follow/Subscribe

Telegram 

Mastodon  Twitter

GitHub GitLab

Subdomains

Demos  Lab

Past

This blog was once on WordPress. Now a static site. See source code on

GitLab