If you are looking for creating PDF output of your HTML pages, you can do it using PHP’s PDFlib module. However, there are some libraries for faster development of your script. Some even are not dependent on PDFlib. Please see below for quick overview.
DOMPDF
dompdf is an HTML to PDF converter. At its heart, dompdf is [...]
Archive for Posts Tagged PHP:
URL Shortening using PHP
Yesterday while developing PunBB Twitter extension, Invarbrass of Projanmo Forum helped me by providing some URL shortening snippets for several websites. Those were very simple to use. I am sharing so that it comes to others’ usages.
to.ly
function CompressURL($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, “http://to.ly/api.php?longurl=”.urlencode($url));
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_HEADER, 0);
$shorturl = curl_exec ($ch);
curl_close ($ch);
return $shorturl;
}
echo CompressURL(“http://projanmo.com”);
Bookmark:
[...]
PunBB 1.3x Extension…. Convert numbers to Bangla (Bengali) on the fly!
Just now I have completed the first version of bangla_numbers extension for PunBB 1.3.x. When enabled, this function will converts numbers used in PunBB to Bangla. It will specially converts numbers of posts, topics, replies, members etc.
Installation:
Upload the unzipped files to extensions directory of PunBB and install the extension from Admin panel’s Extension tab. You’re [...]
PunBB 1.3 Extension – Post Editing Period – Control how long a post can be edited
Today I have developed a simple PunBB Extension for Projanmo Forum that allows administrators to control until how long a post can be edited. Such control is necessary as often members removes the post whimsically making replies irrelevant.
If you install this plugin, it will stop from such happening. From admin panel’s Settings -> Features section [...]
PunBB and OpenInviter
Recently I have worked with OpenInviter to work with PunBB. OpenInviter already has a plugin (mod) that enables it to work with PunBB. But Idid some more works that will enable PunBB forum admins to tracks how many users have been invited, which users has invited, when invited, when the invited friends visited the site [...]
WordPress Read/Hit Counter Plugin Update (v1.1)
As some of users of my plugin, wordpress read counter, requested me to release an update so that they can show hit counter along with post. Few days ago, I have made the necessary update but I forgot to release it.
Click here to download
The installation steps are available in the previous post. I am just [...]
Download OpenLD Directory Script
I have used OpenLD Directory Script for Projanmo Web site. OpenLD is really simple and cool script. But it was wonderful extension system for injecting your own code using the hook.
But the worse news is that the homepage is down for a quite long time. So we don’t get any update of this script anymore. [...]
How to submit a form using PHP (cURL, fsockopen)
There are situations when you want to send data using POST to a URL, either local or remote. Why would you want to do this? Probably you want to submit data to an optin form, but without taking a valuable visitor away from your site. Or maybe you want to send data to several applications for various purposes, which would be impossible to do in the usual manner. So how can we deal with this problem?
OOP with PHP5 Manual
“OOP or Object Oriented Programming is a good programming practice to create manageable projects more easily. Procedural programming means writing code without objects. Procedural programming consists of codes with or without routines. OOP enlightens any language for better coding, for best performance and for writing very big projects without worrying a lot about managing them. [...]
Concat multiple rows!
Today I was wondering how can I concatenate multiple rows in a single row. Suppose, I need to get the email addresses of a user table. The “SELECT `email` FROM `usertable`;” will return something like this:
email1
email2
email3
But I needed:
email1, email2, email3
It is very easy to process and make same output using PHP. But I thought there [...]
Best flash charting script!
Uses of flash chart is getting popularity day by day. Many medium to big web applications may use flash chart. But small application may ignore it due to complexities of implemention of flash chart. Even some web developers may not familiar with flash to make flash chart.
To make it easy, there are several open source [...]
PHP_SELF is empty!
Last two days, I am playing or learning to play with nginx web server. I have heard some reputation about it and saw some performance chart in the web. I liked it for its, as claimed, extremely low memory footprint for one of my small VPS.
After reading some tutorial in Projanmo Forum, I am successfully [...]





