See My Simple Image Thumbnailer

June 30, 2007 § Leave a comment

Last week when I noticed the MYRUET members could not upload proper sized image to their profile page, I prepared a simple image thumbnailer. I donno if it helped them a lot but I noticed few members used it. Here is the demo:

http://www.rupom.com/myruet/

It is very simple one to prepare. It manipulates the would-be scale size using this formula:

——————————————————–

function imageScale($image, $newWidth, $newHeight)
{

if(!$size = @getimagesize($image))
{
die("Unable to get info on image $image");
}

$ratio = ($size[0] / $size[1]);

if($newWidth == -1)
{
$ret[1] = $newHeight;
$ret[0] = round(($newHeight * $ratio));
}
else if($newHeight == -1)
{
$ret[0] = $newWidth;
$ret[1] = round(($newWidth / $ratio));

}
else
{
die("Scale Error");
}

return $ret;
}

—————————————————

Please check the thumbnailer and let me know if some changes can make this more strong.

Best regards.

Rupom

Advertisements

Grand Opening of MYRUET Community Website (Beta Version)

June 24, 2007 § 3 Comments

Today we (Lemon, Arif & Me) released a beta version of MYRUET (http://www.myruet.com). MYRUET is the community website aimed for all ex and current students of Rajshahi University of Engineering & Technology (RUET), Bangladesh. We released this version as a testing version. Upon members’ feedbacks on testing this website, we will change/modify the interface, functionalities & fix bugs. We would like to receive suggestions from the members who joined and tested.

We were targetting to launch this community website from many months. But everyone was busy with works. Finally we seated together, managed time and after few days’ hard work we got an initial version to release.

MYRUET is available in four domains:

http://www.myruet.com
http://www.myruet.net
http://www.myruet.org
http://www.myruet.info

[All domains contain same contents.]

We started thinking about this website one year back and booked the domains later. But it took almost one year to prepare a version. Lemon and Arif did a lot on this website. I enjoyed working with them.

If you are an ex OR current students of RUET, please join MYRUET and start testing to help us improve the usability & quality of this site.

Please feel free to send me your suggestions on the current version.

Best regards.

Rupom

Happy Birthday to Shimul

June 16, 2007 § 2 Comments

Today, June 16th, is the 2Xth birthday of my friend Shimul. I wish many many returns of this day in his life. May God bless him over the life.

HAPPY BIRTHDAY TO YOU SHIMUL

Happy Birthday to Shimul

Enjoy your day.

Take care.

Rupom

Easy Way to Install FFMPEG with PHP

June 15, 2007 § Leave a comment

Audio/Video streaming is very popular today. Recently I have worked on such streaming for one of my projects. My server OS is Fedora Core 6. I found a great help to install FFMPEG (with PHP) that I want to share:

http://vexxhost.com/blog/category/ffmpeg/

I followed it line by line and got FFMPEG done. Obviously you will face some problems (depending on your OS and current status of the server). I had to do a few configuration stuffs that my server required during the installation.

I hope you will find the above link as a great help when needed.

Regards.

$Rupom

Gmail Address Book Grabber :: New Update

June 14, 2007 § 15 Comments

Please check the updated version of my class “Gmail Address Book Grabber”:

http://www.phpclasses.org/browse/package/3170.html

This update is because Gmail changed few display & URL styles in the recent days. I have modified the data parser and a request URL in this change. It’s working now. See demo here:

http://rupom.osclicks.com/demos/grab_gmail/

Please feel free to share your experience with my class.

Enjoy PHPing!

$Rupom

Important Issues in Sending HTML Email

June 14, 2007 § Leave a comment

If you want your HTML email to put into recipient’s INBOX, you have to follow some rules.
Following are some important issues for sending HTML email:

1. Remove unnecessary HTML tags:

Remove these tags from your mail content:
– DOCTYPE
– <html>, </html>
– META Tag
– HEAD
– BASE
– LINK
– TITLE
– Comments

2. Use table for layout

Because of the very limited support of style sheets in webmail clients, the best and safe way to layout your html e-mail is to use tables.

3. Use Online Image

4. Hide Image Toolbar

5. Use Shortcut URLs:
URLs of email should be short/small.

6. Dont Use Anchors

7. Use Simple Inline Stylesheet

For example:
<td style=”font-family: Verdana, Arial, Helvetica, sans-serif; font-size:
10px;” >Vivamus ut sem. Fusce aliquam nunc vitae purus. </td >

8. Create your design with a white background color

Most webmail and e-mail clients use a white background color to display messages.

<td bgcolor=”#FF0000″>

9. Use the title attribute instead of alt

The alt attribute for images doesn’t work in Gecko-based browsers such as Firefox and Mozilla

10. Use <br /> instead of <p>

11. Don’t use forms

12. Don’t use _JavaScript:
_JavaScript in HTML e-mail is never a good idea because of all the dangerous scripting (for example XSS attacks) that can be executed. For this reason most webmail and e-mail clients disable _JavaScript by removing or ignoring it.

13. Provide a link for display in the browser

14. Keep Your Subject Short and Informative

15. Don’t Use DHTML and Flash

16. Send your e-mail as multipart/alternative

If you send a HTML e-mail to people with a webmail or e-mail client who can’t read HTML e-mail, they will only see the HTML code. If you don’t know what your recipients use, send your e-mail as multipart/alternative. This is the HTML version and the plain text version.

These issues greatly affect the HTML email. Currently I am working on a project where the emails must have to be sent to INBOX. I got success following these issues. I am researching more on that.

Regards,
$Rupom

Browser Detection by PERL

June 14, 2007 § 4 Comments

I am enjoying PERL a lot. I am seeing everything new in PERL. I want to share interesting and important PERL stuffs through my blog.

Here is a PERL subroutine that detects whether the browser is Firefox or NOT.

sub is_firefox {
my $agent = ‘’;
$agent = $ENV{”HTTP_USER_AGENT”} || ‘’;
if (length($agent) && $agent =~ m/firefox/si) {
return 1;
}
return 0;
}

Enjoy PERL, the scripting pioneer.

$Rupom

Where Am I?

You are currently viewing the archives for June, 2007 at Rupom Here.