Replace bad words in a string

Recently I came accross a pretty interesting problem through my group, phpexperts where someone needed a solution to replace badwords, but not if that word is a part of another word. For example if you consider the word “some” as bad, then you can replace all “some”, “.some”,”some,” but not “someone”.

Here is a solution I created for that prob
<?
$var = "somesomesome somesome some, some. someone .some ";
$badword = "some";
$var = preg_replace(array("/([\W]+){$badword}([\W]+)/","/([\W]+){$badword}([\W]+)/"),"$1".str_repeat("*",strlen($badword))."$2",$var);
echo $var;
?>

Cool Messenger Libraries for Developers

I have been planning to develop a localized messenger service for Bangladeshi peoples for quite a long time. I studied a lot on this topic and many times attempted to kick start the development, but unfortunately I ran out of time every time. But what I found is a wide range of libraries available for developers to develop such a service without spending a great amount of time. Let me list some of them here for You

1. Wildfire IM Server with IM Gateway [Java]
2. sendMsg [PHP For MSN (The Best)]
3. MSNP [PHP for MSN]
4. Joscar [Java for AOL/ICQ]
5. jYMSG[Java For YM]
6. TjMSNLib [Java for MSN]
7. Java-Jml [Java for MSN]

Are you interested????

Ma, I am proud to be your son

I born in a very ordinary family and my father was a general govt service holder. My mother was obsessed for a son as like other ordinary moms here in Bangladesh and thats why I born after 4 elder sisters. We got a big and happy family. My mom was an ordinary woman, striving to run a big family with limited earnings of my father. But there is something different with other moms, she is a paralyzed woman, since she aged 4 years only. That time polio was a vital disease and my mom was suffered for that.

So being a paralyzed woman, my mom conceived 5 times and gave birth to me and educated us all. She have taken care so that we all completed our graduation with good scores and settled well in our professional life. And she has protected us from every kind of trouble.

I am really proud of being your son, Ma. May Allah take same care of you as you did to us. May Allah save you from every trouble.

Open Source CMS Award Has been Announced

The final result, as voted for by judges from The Open Source Collective, MySQL, the Eclipse Foundation, and 16,000 users on www.PacktPub.com saw a tie for first place between Joomla! and Drupal. In the event of a tie, a fourth independent judge would be brought in. This was Apoorv Durga who is a member of CM Pros and runs his own blog [http://apoorv.info/] on portals and content management. This crucial vote ended up with Joomla! triumphing over Drupal by one point.

The final result was as follows:

1. Joomla!- $5,000
2. Drupal – $3,000
3. Plone – $2,000

Please note that in deciding the final positions judges were asked to give their top three, with their first choice receiving 3 points, second receiving two points and third place one point.

You can see the details of this contest and award at http://www.packtpub.com/article/open-source-content-
management-system-award-winner-announced

Another cool JavaLib for connecting to MSN messenger

Last night I was working on flyspray project for pageflakes, in which one of my tasks were adding support for MSN messenger. That means whenever a task has been assigned to you or you got an emergency, Flyspray will send IM to your MSN. So how I gonna do that? Definitely by Java. So I started studying for available libraries. Couple of months ago I found one for the same purpose named “TjMSNLib” – But I wanted more simpler one, so I kept digging down and what I found finally was really cool. I got a much more flexible one, which supports recent MSN protocol with no problem. And that is Java MSN Messenger Library or JML

So guys, it’s show time now….

Total Commander – The tool i love most

Sometime I get to modify existing open source project and add some feature into it, or sometime I have to start with codes which I have written a long time ago or codes from another developer. In this task, many time I have to figure out where I can possibly start looking for modifications, or edit some texts. So which tool saved my life in this cases? Of course Total Commander. This tool was first introduced to me by Misho, and then by Hasan. Simply after that, I fall into love with this awesome, ubiquitous (he he he) and all purpose file manager software and now it has been part of my daily life.

Here is a list of some features which comes handy for me

* Keyboard shortcuts — Oh ya
* Exploring ext2 and ext3 file system from within windows.
* Easy navigation through compressed archives
* Directory comparison, where I can easily find out the difference between two folders
* File comparison, to find out what is changed between two version of a file.
* Quick preview and quick modification
* quick preview to almost every type of file, well, I can see PSD files too,without installing photoshop.
* CD and DVD burning
* FTP
* Multi renaming tool
* and many many more

Furthermore, the tool is totally free (well, its a shareware). Lets have a look at it today.

Oh!! What a month

Have you heard of steam roller? It seems that a heavy steam roller is running over me, he he he. For last two week I had been customizing Flyspray for pageflakes. We have redesigned it to meet our requirement. After huge modification and role based navigation, now it seems that I can release an unofficial version of flyspray, hahaha. Its a totally new flyspray with much easier outlook and operation.

Also working for group blog in somewherein. Code igniter seems to be a great framework. I like it very much. It increases your productivity upto next level.

Zend never finish its 6-8 weeks

I had been ZCE this 666 (June 6th, 2006). After that I got a mail from education program manager of zend, Dhwani Vahia that I passed my exam and I will receive my certificate within 6-8 weeks. Well that was june 2006 and today is November 9th. Think that 6-8 weeks havent finished yet. I also got similar expressions from some other ZCEs from different forums.

I am very disappointed on Zend. A cert by no means can take 5months (and continuing….) to arrive.

Acessing secured content via PHP and CURL

If you are looking for a solution to access content over SSL, please take a look at this solution. Here i am fetching content from del.icio.us over SSL. the trick is you have to accept SSL certificates by setting CURLOPT_SSL_VERIFYPEER to false.

<?php
// HTTP authentication
$url = “https://api.del.icio.us/v1/posts/all”;
$ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERPWD, “username:pass”);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,false);
$result = curl_exec($ch);
curl_close($ch);
echo htmlspecialchars($result);
?>

I love you OSAlt

I forgot how i got this link but it makes my dream come true. this is a cool site which lists all open source alternatives of commercial software. the whole site is categorized by the type of software. easy navigation increases the usability. I can find what i need within a minute.

Visit the site at OSAlt