Archive for the ‘Last Topicscategory

The Magic of WordPress

December 9th, 2010

One of the premier web hosting sites is WordPress. WordPress is a company that is dedicated to helping their customers set up professional websites quickly and easily. There are numerous advantages to using WordPress as your web hosting platform. It offers a huge variety of template design options that enable a layperson to construct a professional website in just a few hours. Another benefit is that WordPress is search engine optimized, which means that your website will be prominently displayed in the search engine results. بالإضافة إلى ذلك, WordPress allows you to quickly update your visitors through an RSS feed option.

Since WordPress is relatively easy to use and is very popular, there are thousands of plug-ins that allow you to customize your website design. WordPress is truly magical in allowing people who don’t know programming to design a great website. For example, if there is a specific function that you want your website to carry out, you can download the appropriate plug-in and activate it on your website by going to your WordPress account administration tab. With so many options available to WordPress users, the ability to creatively design a unique website is unparalleled.

For the best web hosting, WordPress is the gold standard. Because of the SEO that is already incorporated into the WordPress platform, the customer’s search engine ranking will be higher than it would be with many other website hosting sites. In order to keep your search engine results at a high ranking level, it is important to frequently update your website with original content. بالإضافة إلى ذلك, when you post a sale or special event on your website, it will be found by the search engines more rapidly and your ranking will increase, so that you are closer to the top of the search engine results. This in turn will generate more traffic to your site and broaden your prospective customer base.

Another great aspect of WordPress is that it has a built-in RSS feed. An RSS feed is an efficient way for your visitors to be regularly updated about your activities. When new content has been added to your site or you have posted a new blog entry, the visitors who subscribe to your RSS feed are immediately notified via e-mail by WordPress. This function will save you a lot of time because the program does the work of updating your visitors for you.

Among the numerous web hosting sites, there are many advantages to using WordPress to design and host your website. The program is very user-friendly and quite customizable to fit your market niche. In addition, WordPress is already search engine optimized, so you will benefit from being highly-ranked in the search engine results. If you want to take a look at some websites that are designed with WordPress, here are a few excellent examples: The Department of Environmental Science at the University of Virginia, Ford Motor Company and Outreach Magazine.

If you are engaged in an online marketing campaign, consider utilizing the magic of WordPress. The platform will enable you to construct a great website with ease. With a professional website that you can update easily, you will be able to stay ahead of the competition and increase your market share

This post is contributed by Kirsten Ramsburg, a senior writer for a web hosting reviews company.

PHP Error Nesting Level Too Deep Recursive Dependency

March 12th, 2010

I’ve installed PHP 5.2 at one of my testing computers today and a couple of bits of code that previously worked fine in version 5.1.6 threw fatal errors in the new version. The error message was “Nesting level too deep – recursive dependency?” and it took a little time

to track down the root of the problem. Here’s what I’d done wrong.

In PHP there are two comparison operators, == and ===. It’s generally known that the first is not strict about type but the second is. So, for example

echo ( false == 0 ); // true

echo ( false === 0 ); // false

– 0 is an integer and false is a boolean

My problem arose from using non-strict typing with objects.

$a = new MyObj();
$b = new MyObj();
if( $a == $b )

I hadn’t considered what I was doing with this code. When comparing two objects using the non-strict comparison operator (==) PHP compares all the properties of the objects and if they match the objects are deemed to be equal. If they don’t match they are not equal. In effect, we have a recursive comparison of all the properties of each object, and all their properties, etc. until we reach basic data types like strings and integers.

If, however, we use strict comparison (===), PHP will check whether the two objects are exactly the same object, not just objects with the same properties.

class MyObj
{
public $p;
}

$a = new MyObj();
$b = new MyObj();
$c = new MyObj();
$a->p = 1;
$b->p = 1;
$c->p = 2;
echo ( $a == $c ); // false
echo ( $a == $b ); // true
echo ( $a === $b ); // false

The problem arises if you have circular references in your objects properties. So, for example

class MyObj
{
public $p;
}
class OtherObj
{
public $q;
}

$a = new MyObj();
$b = new OtherObj();
$a->p = $b;
$b->q = $a; // the circular reference: $a->p->q === $a

$c = new MyObj();
$d = new OtherObj();
$c->p = $d;
$d->q = $c;// another circular reference: $c->p->q === $c

echo ( $a == $c ); // Fatal error:
Nesting level too deeprecursive dependency?

In order to compare $a to $c, PHP must compare their properties. So the logic in PHP goes something like this: $a == $c if $a->p == $c->p if $a->p->q == $c->p->q if $a->p->q->p == $c->p->q->p etc. indefinitely.

PHP 5.1 seemed to smooth over the problem somehow (probably after a certain level of recursion it simply returned false) – and usually it worked out fine. PHP 5.2 correctly produces the fatal error above.

Once you know the problem, the solution is easyuse strict comparison.

echo ( $a === $c ); // false (and no error)

The strict comparison will simply check whether the two objects are at the same location in memory and so doesn’t even look at the values of the properties.

N.B. The same problem can arise when using the negated comparison operators (use !== instead of !=) and when using in_array (use in_array’s third parameter to indicate strict comparison).

How to receive and parse emails using POP3 and PHP

March 1st, 2010

I would like to describe some methods on how to write the processor for incoming mail. I had to use such manipulation to parse e-mails received from various sources. This can be useful for writing your own spam filter system, answering machine or ticket system to receive applications by e-mail.

To implement the e-mail parser algorithm we need

  1. connect and log-on to e-mail server
  2. count the number of incoming letters
  3. recive e-mail from the server using POP3 protocol
  4. process the e-mail headers and body and make parsing
  5. implement any additional actions

Ok, there is very specific task for PHP coding, so we need hosting that supports external connection. I do not propose to write decision entirely because much has been realized by talented programmers already. For example, you can take a ready module which will allow accept e-mails from a remote server.

Thank’s to Manuel Lemos and his module (php class) which named pop3.php.

To connect that class to your code, you just need to use include or require command: require(“pop3.php”);


hostname=$hostname;
$result=$pop3_connection->Open();
 
// We are trying to open connection and display the result
echo $result;
// Trying to logon and display the error if any appear
$error=$pop3_connection->Login($user,$accesscode,$apop);
if ($error<>'Password error: Logon failure: unknown user name or bad password.') {echo $error; exit;}
// Now get the statistic how many emails are stored and the size of them $result=$pop3_connection->Statistics($messages, $size);
echo "$hostname contains  $messages of $size bytes.";
 
//..... There we can receive e-mails in the cycle and parse them.... //
 
// If nothing to do - we can close the connection
$error=$pop3_connection->Close(); //
echo $error;
?>

Now we know how to connect and log-on to the POP3 server and how to request the number of Inbox e-mails and them sizes. Next, we should receive each e-mail and parse the headers and body array.

TO BE CONTINUED

MBOX الحرة لتحويل قائمة الأدوية الأساسية

14 شباط/فبراير, 2010

أنه لأمر جيد أن اليوم لا تزال هناك المبرمجين الذين يقومون بكتابة برامج ممتازة في أي تكلفة. ما أتحدث عنه? أريد أن أقول لكم كيف وجدت برنامج آخر لبلدي مجموعة من المرافق العامة يجب أن يكون.

أبل ماك أجهزة الكمبيوتر على نطاق واسع المستخدمة في مكتبنا. هذه هي سياسة الشركة. وعلى الرغم من أن سياسة الشركة, لدينا مدرب يفضل Windows ويستخدم في الكمبيوتر المحمول الموصى بها. الذين ينبغي أن كسر القواعد? وبطبيعة الحال بوس, غير مسموح ببقية 🙂 ويجب أن أقول أن أشاطر هذا التفضيل, لقد قمت بتركيب ويندوز 7 على جهاز الكمبيوتر المحمول في المنزل.

محامينا يجب تمرير بعض التحقيقات من وقت لآخر وأنها ينبغي أن تستعرض مراسلات موظفينا لكن قبلوا الملفات فقط في توقعات الباسيفيكي تنسيق.

في المادة السابقة لقد كتبت عن البرنامج بشكل لا يصدق اللازمة توقعات معالج استيراد, الذي أنقذ لي الكثير من الوقت عندما استيراد ملفات قائمة الأدوية الأساسية إلى توقعات. المهمة التي كان لإكمال وضع لي فقط في صدمة. من الضروري تحويل رسائل البريد إلكتروني موظفينا في Outlook .توقيت المحيط الهادي الملف. كيف يمكننا التوفيق بين أشياء غير متوافق? كيف يمكن الجمع بين نظام التشغيل MAC OS مع ويندوز?

في البداية كان لي إجراء مراجعة لحسابات، ووجدت أن موظفينا باستخدام عملاء بريد إلكتروني مختلف. هناك فقط بعض منها: حاجر, ماك بريد, Entourage, MailCopa, طائر الرعد, يودورا, بريد بيركلي. مهمة تحويل لا تبدو قابلة للتنفيذ. قرر ما إذا كان محرك بحث لا يحقق فورا لي الحل, ثم سوف يقول أن مدرب بلدي أن البعثة مستحيل. ابحث عن عبارة “entourage, طائر الرعد, ماك بريد, لقائمة الأدوية الأساسية لتوقيت المحيط الهادي mbox الحرة” وكان البحث الناجح, وثبت أن شيئا لم أتوقع ابدأ. وعلاوة على ذلك, كلمة مجاناً لا تتطابق مع لي مع المهمة التي كان على القيام به. تصور دهشتي عندما على صفحة وصف لواحد آخر قائمة الأدوية الأساسية لتحويل الباسيفيكي, لقد وجدت mbox الحرة لتحويل قائمة الأدوية الأساسية.

استعراض البرامج أظهرت أنه على الرغم من أن البرنامج مجاني, أن من الممكن لا يصدق. ومع ذلك تختلف تنسيق ملفات علبة البريد من برامج مختلفة, تمكن البرنامج من دقة تحديد كافة التواقيع الموجودة ميتا والتعرف على تنسيق الملف بشكل صحيح. أنا لست مازحًا, جميع ملفات علبة البريد حاجر, ماك بريد, Entourage, MailCopa, طائر الرعد, يودورا و بريد بيركلي وقد تحول إلى صفائف ملفات البريد الإلكتروني في تنسيق قائمة الأدوية الأساسية. وبعد توقعات معالج استيراد اسمحوا لي استيراد كافة في يدي ملفات قائمة الأدوية الأساسية إلى توقعات توقيت المحيط الهادي.

MBOX الحرة لتحويل قائمة الأدوية الأساسية يعمل كمعالج دفعة. أولاً يجب عليك تحديد كل ما يلزم ملفات mbox من الذي تريد استرداد الرسائل قائمة الأدوية الأساسية. فمن السهل لتحديد كافة الملفات مع التحول مفتاح. وبعد ذلك, أنت بحاجة إلى انقر تجهيز زر, أشر إلى دليل فارغ في محرك الأقراص الثابت وانتظر النتيجة. برنامج تجهيز كافة الملفات تسلسلياً, فإنه يقوم بإنشاء دليل لكل ملف وملئه مع ملفات يمل المستخرجة. في حالتي كان لدى الكثير من ملفات علبة البريد التي تم تسميتها وفقا لأسماء المستخدمين من موظفينا. في نهاية المطاف حصلت على الكثير من المجلدات, ولكل اسم مستخدم والواردة في المقابلة كل ملفات قائمة الأدوية الأساسية استرداد من علبة البريد.

Space Shuttle video from start to end

January 25th, 2010

NASA! I found this video absolutely amazing. Twelve minutes of action of Space Shuttle parts. Start from the Earth and down to the sea. Space cameras on each part of shuttle, looks very interesting. Very beautiful Space Shuttle video.

STS-129 video highlights as compiled by the SE&I imagery team here at JSC from all of the ground, air, ET and SRB assets.