Jesin's Blog

Welcome to the Portal of Technology

  • Facebook
  • GitHub
  • RSS
  • Twitter
  • Home
  • Categories
    • Domains
    • Linux
    • Networking
    • PHP
    • Virtualization
    • Web Design
    • Web Servers
    • Windows
  • WordPress Plugins
    • Custom Error Pages
    • HTTP Digest Authentication
    • Mailgun Email Validator
  • Toolbox
    • DNS Lookup Tool
    • htdigest Generator Tool Online
    • htpasswd Generator Tool Online
    • HTTP Headers Lookup Tool
    • MD5 Encryption Tool
    • Open Port Check Tool
    • SHA-1 Encryption Tool
    • URL Encoding/Decoding Tool
  • About Me
  • Contact Me
  • Sitemap
Home ›
PHP

How to use PHP to minify HTML output

February 10, 2013 PHP Jesin A 5 Comments

php category thumbnail

Couple of years ago I wrote an article about two PHP configuration options auto_prepend_file and auto_append_file recently while browsing about PHP minification I got an idea on how to apply this PHP minify code to each and every script executed on the server so that all HTML output from that server are auto minified. This method requires creating a PHP file containing the code to strip whitespaces and newlines before and after the HTML tags and including this file with every PHP script executed on the server using the auto_prepend_file configuration option. For this you need to have access to the php.ini file. This method will work fine even if you are using shared hosting with custom php.ini support.Continue Reading…

Tags: php, php.ini

PHP auto_prepend_file and auto_append_file

August 7, 2011 PHP Jesin A 12 Comments

php category thumbnail

This article will show you how to use the PHP configuration directives auto_prepend_file and auto_append_file. These two PHP directives perform the same function as require() but they do it globally on all PHP scripts. The PHP auto_prepend_file and auto_append_file directives can only be used in php.ini files. They do NOT work when used in .htaccess file, I’m mentioning this so that you don’t waste precious time editing your .htaccess file. If you want to set these configuration directives on directory basis you can use them in your custom php.ini file.Continue Reading…

Tags: php.ini

PHP Open Port Check Script

July 16, 2011 PHP Jesin A 7 Comments

php category thumbnail

A quick tutorial on how to check for open ports using PHP. This function fsockopen() is used in the Open Port Check Tool in this blog. You can check whether a certain port is open on a specified IP address or hostname. Before reading take note that most FREE web hosting providers disable fsockopen() function as a security measure so first check whether the function can be used. Another thing to take note is that if fsockopen is unable to connect to a port it doesn’t necessarily mean that port is closed on the remote host, your server in which the script is running might also have block the OUTBOUND connection to that port.Continue Reading…

Tags: php, php scripts

PHP Pie Chart Script

July 7, 2011 PHP Jesin A 5 Comments

php category thumbnail

A PHP Pie Chart script created by me using which any data and values can be represented using the pie chart. The PHP Pie Chart script is available for free download. By passing a query string you can compare any number of values. What follows is how to use my PHP Pie Chart Script and the code to download. The PHP Pie Chart script uses the following PHP image functions ImageCreate(), ImageColorAllocate(), imagefilledrectangle(), ImageFilledArc(), imagettftext(), ImagePNG() and ImageDestroy(). To edit the code you need to know how to use these functions.Continue Reading…

Tags: php, php scripts

W3 Total Cache Remove Footer

July 4, 2011 PHP Jesin A 10 Comments

remove w3 total cache comment

The W3 Total Cache is a caching plugin for wordpress which improves the performance of your wordpress blog. When this plugin is activated it inserts a HTML comment into your code which looks like this

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching using disk

Served from: www.example.com @ 2011-07-04 06:59:27 -->

If you wish to remove W3 Total Cache Footer follow my instructions.Continue Reading…

Tags: php, wordpress

PHP Sessions Tutorial

March 8, 2011 PHP Jesin A Leave a Comment

php category thumbnail

This PHP sessions tutorial explains how sessions work, commonly used PHP session handling functions and how to use then. A session is the time duration that starts from the time a user visits a website and ends when he/she leaves the website. Usually when we use PHP variables they can be accessed only in the script in which they are used but sessions variables can be accessed by all PHP scripts which are accessed during that “session” Sessions greatly help in personalizing an user’s experience on a website, they can also be used to create Login pages using PHP. We’ll first see how PHP sessions work.Continue Reading…

Tags: php

  • « Previous Page
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next Page »

Get a wealth of information delivered to your inbox. Subscribe and never miss a single article.

  • Tutorials and howtos
  • Code, scripts and commands
  • Online Tools

* No spam, unsubscribe anytime

Hire Me

  • SSL installation and hardening (A+ on Qualys SSL test)
  • Apache & Nginx configuration
  • Email deliverability improvement (10/10 on Mail Tester & MailGenius)
  • WordPress customization, optimization and migration
  • and much more…

    Tools

    • DNS Lookup Tool
    • htdigest Generator Tool Online
    • htpasswd Generator Tool Online
    • HTTP Headers Lookup Tool
    • MD5 Encryption Tool
    • Open Port Check Tool
    • SHA-1 Encryption Tool
    • URL Encoding/Decoding Tool

    Nav

    • Home
    • About Me
    • Contact Me
    • Privacy Policy
    • Sitemap
    Vultr SSD VPS

    Creative Commons License
    Jesin's Blog by Jesin A is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
    Based on a work at websistent.com.