Category Archives: Coding

All kinds of Programming.

How to Install PyOpenGL on Windows 10

By | September 15, 2023

PyOpenGL is an python module that implements OpenGL functions in python allowing you to write OpenGL applications using Python. With OpenGL you are able to write applications that use “GPU acceleration”. So if you have an Nvidia RTX 3060 gpu on your system, the opengl functions will use it to render the 3D graphics on… Read More »

Output buffering in php and apache

By | June 18, 2013

Output Buffering Output buffering is processing mechanism where the output being generated by a program is held in a place till its size reaches a limit or the generation is complete. Only after, will the output be send to its destination. In php for example, doing and echo generates some output. Now this output might… Read More »

Php – Do not rely on set_time_limit too much

By | April 23, 2019

Php set_time_limit Php has a function called set_time_limit which can be used to dynamically adjust the maximum execution time permitted to a script. It allows specifying the time in seconds and limits the script execution time to that many seconds. The set_time_limit function whenever called, effectively extends the script execution time by that many seconds…. Read More »

Php – Fix “Input is not proper UTF-8, indicate encoding” error when loading xml

By | March 26, 2013

When loading xml files in php through simplexml_load_string or domDocument class, sometimes an error like this might popup Warning: DOMDocument::loadXML(): Input is not proper UTF-8, indicate encoding ! OR Warning: simplexml_load_string(): Entity: line 93: parser error : Input is not proper UTF-8, indicate encoding ! The error occurs when the xml has some invalid characters… Read More »

Php – How to fetch gzipped content over HTTP with file_get_contents

By | January 13, 2023

The file_get_contents function is often used to quickly fetch a http url or resource. Usage is very simple and appears like this $content = file_get_contents('http://www.google.com/'); However the file_get_contents does not get the contents compressed. It requests the server to send everything in plain text format. Most websites are capable of serving compressed content, if they… Read More »