| The most friendly job portal of Bangladesh

Its been a while I was not writing any posts to this blog. I am here today to talk about the Job Poral we are working with for quite a while. You may know that ittefaq being the pioneering Daily of Bangladesh has been the prime source of job advertisements in the past. But it was not up-to-date with the technology advancement of this modern times. Ittefaq decided to go for the online presence and its overhauling their main portal as well. We (Bullseyelogic) are partnered with Ittefaq Group of Publications to develop and look after their job portal. As the CTO and Project manager of my team I can tell that my boys have done a great job and we can bravely proclaim its been a great pleasure to work on this project. And the features are pretty attractive compared to any other job poratals in Bangladesh.

Our site is hosted at the wonderful RackspaceCloud. And we have developed it using the Codeigniter Framework.

I’ll present here some of the videos I have made for the ease of our visitors. After watching these videos you’ll definitely like to sign up to our site. And take the opportunity to be with the promising job portal.

Watch the above to get a primer about the Employer registration and Control Panel.

Job Seeker view.

Watch the primer for the interactive CV-Builder.


Follow Ittefaq jobs on twitter & Facebook

My Immediate feelings after the ZCE exam

I cant help to share the feelings right away with you now. Just came back after we finished the exam.

Its great event of joy for me and my friend Abdullah. Because we sat together on the same day. And I think this is first ever in Bangladesh that two ZCE passed at the same day. To tell you the truth, I had an attempt on 19th February this year but that was kind of rushed sitting and thats why duely failed yet was very close to passing score 😦

But the question is why I decided to go for ZCE anyway? well first and foremost is the inspiration from Hasin Hayder, who is entitled among the BD PHP community as the pioneer and guru and the Geek on PHP. Though I started learning php on 2003, I was not very strong at it until last year. But Hasin bro kept inspiring that, you can become one and you should give it a good try. On that time we (Ferdous [9th ZCE] and me) were beginner level developer at the Saifur’s corporate and started a training on PHP. Most amazingly Hasin bro inspired us making the syllabus one of the best in Bangladesh. We included so many things in it. And we taught the students the best practices in development, design and DB etc. We introduced them with the common CMSs, Forums and even Frameworks. We introduced them PHP and jQuery frameworks too!

One of our students was Sadiqur Rahman(the wonder boy and 8th ZCE!), who enrolled there saying he wants to become a ZCE! 😀

So, it was our challenge from then on. Building our bases to achieve good better best practices in the PHP development industry. We inspired all students to become bloggers, tweeterers and getting fed from the best resources on the web on what they want to excell.

Even this morning at 5am when Hasin bro asked how is the preparation? I said not upto my intentions. He said some inspiring words that I calmed myself little bit. While taking the exam I was semi nervous. Kind of knew I’m winning it, but didn’t make the mistake what I did last time(I submittend the exam in 57 minutes and reviewed only 3 questions and came out 33minutes ago). Today I almost reviewed all 70 of them and started counting. Was little nervous… but when the count reached more than 61! I stopped 😀 and submitted it! et voila I got congratulations from

I kind of knew my friend Abdullah(he had an attempt last month and did score near to passing as well!) who started just 40 minutes after me was gonna pass as well, so it was a great feeling indeed.

Hope you guys didn’t mind this long writing. I just want to inspire new comers to PHP. We in Bangladesh should rise up and give it a good try. We need to outsource more of our intellect. We need to have our stand and we need to build a Very Best community. We need to do campaigns like WordCamp, ZendCon, PHPCon and inspire our fellow developers to become ninjas and beat the rest of the world.

I would like to share with you my old blog writing in Bangla you’d notice I wanted to see my name there very much(at least on 10th but oh well I made a milestone by sitting together two old friends together and won it) 😉  here’s the link:

Originally posted at

PHP শেখার সহজ উপায়গুলো জেনে নিন

অনেকেই অনেক দিন ধরে পিএইচপি বই নিয়ে গুতোগুতি এদিক ওদিক দৌড়িয়েছেন। কিন্তু পিএইচপি শেখা আর হয়ে উঠছে না, তাইনা?

আপনাদের চিন্তা মাত করতে এবার দিচ্ছি বেশ কিছু টিউটোরিয়ালের ঠিকানা।

একটা ব্যাপার মনে রাখতে হবে। কম্পিউটারের যেকোনো ভাষা শেখার সাথে সাথে তা অনুশীলন বাধ্যতামূলক। শেখার সময় সহজ মনে হলেও তা ফলিত আকারে নিজে অনুশীলন না করলে মনে থাকবে না এবং আয়ত্তে আসবে না।

আসুন কয়েকটি ঠিকানা থেকে জেনে নেই কী করে তাড়াতাড়ি পিএইচপি শেখা যাবে

‌১. ভিডিও
Click This Link

শেষের লিঙ্কটিতে দুনিয়ার আরো অনেক কিছু পাবেন টিউটোরিয়াল হিসেবে।

২. এটাই পিএইচপি’র বাড়ী এখান থেকে ম্যানুয়ালটি নামিয়ে নিন। আর এর বেসিক, মিডলেভেল বা এডভান্সড সব তথ্যাদি এখানেই পাবেন।

৩. যারা পিএইচপি নিয়মিত অনুশীলন করছেন তাদের এটা বেশ কাজে লাগতে পারে
এটি হচ্ছে পিএইচপি ম্যানুয়ালের উইজেট।

আরো অনেক অনেক লিঙ্ক আছে… কিন্তু সব আপনার দরকার নেই.. আগে শুরু করে দিন পরে নিজেই খুঁজে নিতে পারবেন।

ওহ হ্যাঁ ইংরেজী শেখা কিন্তু বাধ্যতামূলক.. তা’নাহলে কাচাই থেকে যাবেন যেকোনো প্রোগ্রামিংএ। আর Wrox বা অন্য প্রকাশনীর একটি অন্তত বই হাতের কাছে সবসময়।

পুনশ্চ: নেটে পাওয়া লিঙ্কগুলো নেটেই বুকমার্ক করে রাখুন। টুইটার বা ফ্রেন্ডফীড ব্যবহার করে। ফেসবুকেও লিঙ্ক শেয়ার করতে পারেন। বর্তমানে প্রসিদ্ধ এবং প্রতিষ্ঠিত প্রোগ্রামারদের ব্লগ পড়ুন। নিজেও যা কিছু শিখবেন ব্লগ করে ফেলুন(কপি/পেস্ট করে নয়, মৌলিক লিখে)। জ্ঞান ছড়ালে বাড়ে :

সবার জন্য বিশেষ প্রয়োজনীয় আর্টিকেলস
এই মাত্র পেলাম PHPArch মে ২০০৯ সংখ্যাটি ফ্রি দিচ্ছে ওরা তাড়াতাড়ি সংগ্রহ করে নিন। :)


From the PHP script writer’s point of view, the change most likely to impact legacy code is in the way that references are handled in all PHP versions post-dating the PHP 4.4.0 release.
Until and including PHP 4.3, it was possible to send, assign or return variables by reference that should really be returned by value, such as a constant, a temporary value (e.g. the result of an expression), or the result of a function that had itself been returned by value, as here:
[sourcode lang=’php’][/sourcecode]
Although this code would usually work as expected under PHP 4.3, in the general case the result is undefined. The Zend Engine could not act correctly on these values as references. This bug could and did lead to various hard-to-reproduce memory corruption problems, particularly where the code base was large.
In PHP 4.4.0, PHP 5.0.4 and all subsequent PHP releases, the Engine was fixed to ‘know’ when the reference operation is being used on a value that should not be referenced. The actual value is now used in such cases, and a warning is emitted. The warning takes the form of an E_NOTICE in PHP 4.4.0 and up, and E_STRICT in PHP 5.0.4 and up.
Code that could potentially produce memory corruption can no longer do so. However, some legacy code might work differently as a result.
Code that worked under PHP 4.3, but now fails

< ?php
function func(&$arraykey) {
    return $arraykey; // function returns by value!
$array = array('a', 'b', 'c');
foreach (array_keys($array) as $key) {
    $y = &func($array&#91;$key&#93;);
    $z&#91;&#93; =& $y;

Running the above script under any version of PHP that pre-dates the reference fix would produce this output:

array(3) {
&string(1) “a”
&string(1) “b”
&string(1) “c”

Following the reference fix, the same code would result in:

array(3) {
&string(1) “c”
&string(1) “c”
&string(1) “c”

This is because, following the changes, func() assigns by value. The value of $y is re-assigned, and reference-binding is preserved from $z. Prior to the fix, the value was assigned by reference, leading $y to be re-bound on each assignment. The attempt to bind to a temporary value by reference was the cause of the memory corruption.
Such code can be made to work identically in both the pre-fix and the post-fix PHP versions. The signature of func() can be altered to return by reference, or the reference assignment can be removed from the result of func().
[sourcode lang=’php’][/sourcecode]
In PHP 4.3 $x would be ‘original value’, whereas after the changes it would be ‘function return’ – remember that where the function does not return by reference, the reference assignment is converted to a regular assignment. Again, this can be brought to a common base, either by forcing func() to return by reference or by eliminating the by-reference assignment.
Code that worked under PHP 4.3.x, but now throws an error

< ?php
class Foo {
    function getThis() {
        return $this;
    function destroyThis() {
        $baz =& $this->getThis();
$bar = new Foo();

In PHP 5.0.3, $bar evaluated to NULL instead of returning an object. That happened because getThis() returns by value, but the value here is assigned by reference. Although it now works in the expected way, this is actually invalid code which will throw an E_NOTICE under PHP 4.4 or an E_STRICT under PHP 5.0.4 and up.
Code that failed under PHP 4.3.x, but now works

< ?php
function &f() {
    $x = "foo";
    print "$x\n";
for ($i = 0; $i < 3; $i++) {
    $h = &f();

In PHP 4.3 the third call to var_dump() produces NULL, due to the memory corruption caused by returning an uninitialized value by reference. This is valid code in PHP 5.0.4 and up, but threw errors in earlier releases of PHP.

< ?php
$arr = array('a1' => array('alfa' => 'ok'));
$arr =& $arr['a1'];
echo '-'.$arr['alfa']."-\n";

Until PHP 5.0.5, it wasn’t possible to assign an array element by reference in this way. It now is.
Code that should have worked under PHP 5.0.x
There are a couple of instances of bugs reported under PHP 5.0 prior to the reference fixes which now ‘work’. However, in both cases errors are thrown by PHP 5.1.x, because the code was invalid in the first place. Returning values by reference using self:: now works in the general case but throws an E_STRICT warning, and although your mileage may vary when assigning by reference to an overloaded object, you will still see an E_ERROR when you try it, even where the assignment itself appears to work.
Warnings that came and went
Nested calls to functions returning by reference are valid code under both PHP 4.3.x and PHP 5.1.x, but threw an unwarranted E_NOTICE or E_STRICT under the intervening PHP releases.

< ?php
function & foo() {
    $var = 'ok';
    return $var;
function & bar() {
    return foo();
$a =& bar();
echo "$a\n";

An Alternative proxy script to host your WordprssBlog anywhere else

Months ago renowend PHP programmer Hasin Hayder posted a nifty thing of only 10 line proxy. Now this code had been written by Ferdous just after that post had been made. I am using this code to host my blog temporarily. But I felt the need for blogging about it which might help many programmers to better understand the technics. Definitely Hasin bhai’s technic is on the top. But we had a thought in mind that Regular Expressions are a bit costly and on a Conversation with him on Gtalk he said if you can make an alternative to this not using regular expression I am gonna treat you 😛  So, you know this is done for the challenge as well. 😀 Comparing the time of execution it yeilded a bit slower than Hasin bhai’s script. I have added the main proxy syntax highlighted here.

Remember, you need the .htaccess file with this to make it work. Go get the code from Hasin bhai’s original post 🙂

< ?php
    $primary_url=""; //original url of your wordpress blog
    $secondary_url=''; //here the new hosted url should be specified
    $path =array_keys($_GET);
    $data_url = (!empty($path[0]))?$primary_url."/".$path[0]:$primary_url;
    $doc=new domdocument('1.0','UTF-8');
    $data = $doc->saveHTML();
    foreach($tags as $tag){
        $href = $tag->getAttribute('href');
        $href_new = str_replace($primary_url, "$secondary_url", $href);
        $data = str_replace($href,$href_new,$data);

    foreach($form_tags as $tag){
        $action = $tag->getAttribute('action');
        $action_new = str_replace($primary_url, "$secondary_url", $action);
        $data = str_replace($action,$action_new,$data);
    echo $data;

Now Your .htaccess file need to have the following codes:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{QUERY_STRING} (.+)
RewriteRule ^(.*)$ index.php?$1&%{QUERY_STRING}

RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1

PHP 4 Savvy Coding

I encountered this problem several times coding with wordpress plugins. As lots of servers still running in PHP4 are likely to have this problem. So I’m writing there the solutions to those.

file_put_contents() function is only introduced after PHP5 so if you have to run codes in servers running still old PHP4 you can use the following code to create an alternative function on the fly:

if(!function_exists('file_put_contents')) {
function file_put_contents($File, $Data, $Append = false) {
if(!$Append) $Mode = 'w';
else $Mode = 'a';
$Handle = @ fopen($File, $Mode);
if(!$Handle) return false;
$Bytes = fwrite($Handle, $Data);
return $Bytes;

Or, Alternatively you can write this code snippet to replace just the function call if there’s not much call to it:

 if( !function_exists('file_put_contents') )
function file_put_contents($filename_comments,$data_comments)
$fh = @fopen($filename_comments,'w');
if( $fh ) { fwrite($fh,$data,strlen($data_comments)); fclose($fh); }

If you come around with str_ireplace() function you can do the following:

if(!function_exists('str_ireplace')) {
function str_ireplace($search,$replace,$subject) {
$search = preg_quote($search, "/");
return preg_replace("/".$search."/i", $replace, subject);

Or this:

if (!function_exists('str_ireplace')  {
function str_ireplace($search,$replace,$subject) {
$token = '^[[term^]';
$haystack = strtolower($subject);
$needle = strtolower($search);
while (($pos=strpos($haystack,$needle))!==FALSE)  {
$subject = substr_replace($subject,$token,$pos,strlen($search));
$haystack = substr_replace($haystack,$token,$pos,strlen($search));
while (($pos=strpos($subject,$token))!==FALSE)  {
$subject = substr_replace($subject,$replace,$pos,strlen($token));
return $subject;