I am looking for a php script or class that can minify my php page html output like google page speed does. How can I do this? Answer CSS and Javascript Consider the following link to minify Javascript/CSS files: https://github.com/mrclay/minify HTML Tell Apache to deliver HTML with GZip – this generally reduces the response size by about 70%. (If you
Tag: html
How to Convert Arabic Characters to Unicode Using PHP
I want to to know how can I convert a word into unicode exactly like: http://www.arabunic.free.fr/ can anyone know how to do that using PHP considering that Arabic text may contains ligatures? thanks Edit I’m not sure what is that “unicode” but I need to have the Arabic Character in it’s equivalent machine number considering that arabic characters have different
Error in mysql fetch error in php
Hi when i run my code this proplem apper this is my code Answer rewrite so this: becomes this:
Sanitizing HTML input
I’m thinking of adding a rich text editor to allow a non-programmer to change the aspect of text. However, one issue is that it’s possible to distort the layout of a rendered page if the markup is incorrect. What’s a good lightweight way to sanitize html? Answer You will have to decide between good and lightweight. The recommended choice is
PHP MySql display returned content without html tags being stripped
I have a column in SQL ‘Text’ datatype and inside I have content within html tag, eg somecontent: onetwo… I want the mysql query to echo out the databases contents without stripping the html tags (its possible this is done by php for security reasons or?) so that the html code will render if you get me? At the moment
Sending HTML Code Through JSON
I’ve got a php script which generates HTML content. Is there a way to send back that HTML content through JSON to my webpage from the php script?
Vimeo video link regex
Anybody got the regex for vimeo video links to extract them from a pragraph for use in php? Can’t seem to find a proper one for the latest vimeo url scheme Answer As far as I can tell, the scheme is just http://vimeo.com/A_NUMBER, so try http://(www.)?vimeo.com/(d+). If you don’t need links to be prefixed by http://, you can leave off
How to set a session variable when clicking a link
I have the following problem… I want to set a session variable when clicking on a normal link like: home My research seems to point out that it is not …
save html-formatted text to database
I want to save html-formatted text to database, but when I do that it is don’t save html-symbols like ‘ and others This is how I read article from database for editing: <p class="Title"&…
How can I comment out PHP lines inside HTML file?
In the middle my HTML code, I have a line of PHP. now, I want to make PHP line as a comment. I tried to ues <!– –> but it seems not work for PHP. What should I do? Thanks Answer Imagine you have the following code: If you want the div to be echoed but not displayed at the