Tuesday, October 11, 2011

Leverage the power of Zend framework today!


As a small business owner, if you are looking to maximize enterprise efficiency by deploying an open source solution that will not only be fast, easy to use and can be easily scaled up according to the needs of your business, then you have come to the right place. In our view, the Zend Framework will be quite suitable for your business as it not only retains the simplified spirit of PHP programming but also incorporates some great concepts like design patterns, unit testing, loose coupling and OOP concepts. What the Zend framework actually does is that it offers a lightweight, loosely-coupled component library that can provide nearly 80% of the functionality and the rest of the application can be customized as per the unique business needs of the organization. The extensible architecture of the Zend framework ensures that developers can build their own custom modules to develop the remaining 20% of the functionality.
Another important tool from the Zend family is the Zend Studio, a professional grade development environment that includes powerful features like PHP code editing, debugging, profiling, unit testing and diagnostic utilities which enhance developer productivity resulting in a shorter turn-around time for developing applications.Zend Studio's integration with VMWare workstation helps developers in running and debugging applications quickly. Other notable features of Zend Studio like re-factoring, code generation, code assist and semantic analysis help in rapid application development both on the server side (in PHP) and on the browser side (in javascript). Besides this, Zend Studio also offers support for both local and remote debugging, integrated PHP and Javascript debugging, profiling, code inspection, quick fix, test-generation, and reporting.

Another important tool from the Zend stable that can prove to be very useful for developers is the Zend Debugger, a PHP extension that allows users to debug PHP scripts via the web server. PHP experts who have tested the Zend Debugger functionality confess that it is the best Integrated Development Environment they have ever used.
To use the Zend Debugger users need to install the Zend Debugger on their web server in order to perform optimal remote debugging. By using powerful PHP extension one can test files and detect errors in your code. The debugger helps developers to control the execution of their programs by using a variety of options like setting breakpoints, inspecting variables and parameters etc.
After reading the above passages, you would now have an idea of the powerful features which the Zend Framework offers and how critical it can be to ensure reliability of enterprise applications. No wonder it has emerged as the platform of choice amongst small and large businesses worldwide for developing business- critical applications.
With PHP gaining prominence as a server- side scripting language, open source products like the Zend Debugger and Zend Studio are in high demand amongst developers all across the globe. These products can be used for the most demanding applications and even deliver excellent performance at high traffic loads. Moreover, the extensible architecture of the Zend Framework makes it a hot favourite amongst developers as they can build their own custom modules catering to their unique business needs.

HTML and PHPcontact form with CAPTCHA


Using a contact form on your website is very useful as it helps your web site visitors to communicate with you in an easy and simple way. But, there are spammers and hackers who are looking for exploitable web forms. It is essential to secure your form against all 'holes' that those hackers are searching for.

How does the spammers/hackers exploit HTML forms?
Spammers exploit web forms for two purposes:
a) As a relay for sending bulk unsolicited emails
If you are not validating your form fields (on the serve side) before sending the emails, then hackers can alter your email headers to send the bulk unsolicited emails. (also known as email injection) For example, hackers can place the following code in one of your form fields and make your form processor script send an email to an unintended recipient:
sender@theirdomain.com%0ABcc:NewRecipient@anotherdomain.com
The code above is adding another email address to the CC list of the email. Spammers can send thousands of emails using this exploit. Your host will not be happy with this and may warn you or even ban your web site.
The best way to prevent this spammer exploit is to validate the fields used in the mail() function(fields like email, subject of the email, name etc). Check for the presence of any "new line" (\r\n) in those fields. The email form article contains sample code that does the same.
b) For Sending spam messages to you
There are programs known as 'spam-bots' that leech through the web pages looking for web forms. When found, those 'bots' just fills the fields with a spam message and submits. Eventually you will start getting many hundred submissions send by those spam bots and you will find it difficult to separate genuine submissions from spam messages.
The solution for this problem is to use a mechanism to identify human submitters from 'bots'. CAPTCHA is one of such tests.

Adding Captcha to the form
Captcha is an image with a code written on it. The website visitor is required to read the code on the image and enter the value in a text field. If the word entered is wrong, the form submission is not processed. As CAPTCHA is a smartly blurred image, the spam bot can't read it. So the form cannot be auto-submitted by a 'bot'.
The contact form with CAPTCHA
Here is the HTML code for the contact form:
<form method="POST" name="contact_form"
action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>">


<label for="name">Name: </label>

<input type="text" name="name"
value="<?php echo htmlentities($name) ?>">


<label for="email">Email: </label>

<input type="text" name="email"
value="<?php echo htmlentities($visitor_email) ?>">


<label for="message">Message:</label>

<textarea name="message" rows=8 cols=30
><?php echo htmlentities($user_message) ?></textarea>


<img src="captcha_code_file.php?rand=<?php echo rand(); ?>"

id="captchaimg" >
<label for="message">Enter the code above here :</label>

<input id="6_letters_code" name="6_letters_code" type="text">


<input type="submit" value="Submit" name="submit">
</form>
The HTML form above contains the fields for name, email and message. In addition, we have the CAPTCHA image. The <img> tag for the CAPTCHA image points to the script captcha_code_file.php. The PHP script in 'captcha_code_file.php' creates the image for the captcha and saves the code in a session variable named '6_letters_code'.
Validating the CAPTCHA
When the form is submitted, we compare the value in the session variable(6_letters_code) with the submitted CAPTCHA code( the value in the text field 6_letters_code). If the codes match, then we proceed with emailing the form submission. Else we display an error.
Here is the code that does the server side processing:
if(isset($_POST['submit']))
{

  if(empty($_SESSION['6_letters_code'] ) ||
    strcasecmp($_SESSION['6_letters_code'], $_POST['6_letters_code']) != 0)

  {
      //Note: the captcha code is compared case insensitively.

      //if you want case sensitive match, update the check above to
      // strcmp()

    $errors .= "\n The captcha code does not match!";
  }


  if(empty($errors))

  {
    //send the email

    $to = $your_email;
    $subject="New form submission";

    $from = $your_email;
    $ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '';


    $body = "A user  $name submitted the contact form:\n".

    "Name: $name\n".
    "Email: $visitor_email \n".

    "Message: \n ".
    "$user_message\n".

    "IP: $ip\n"; 


    $headers = "From: $from \r\n";
    $headers .= "Reply-To: $visitor_email \r\n";


    mail($to, $subject, $body,$headers);


    header('Location: thank-you.html');

  }
}
Customizing the CAPTCHA
The CAPTCHA script in the sample code download can be customized. If you open the script, you can see the first few lines of the code as shown below:
$image_width = 120;
$image_height = 40;

$characters_on_image = 6;
$font = './monofont.ttf';


//The characters that can be used in the CAPTCHA code.

//avoid confusing characters (l 1 and i for example)
$possible_letters = '23456789bcdfghjkmnpqrstvwxyz';

$random_dots = 0;
$random_lines = 20;

$captcha_text_color="0x142864";
$captcha_noise_color = "0x142864";
You can change the size of the CAPTCHA by changing $image_width & $image_height. The number of characters in the CAPTCHA can be changed by updating $characters_on_image. Similarly, the text color of the CAPTCHA can be customized by updating $captcha_text_color. The code adds some 'noise' in the image by adding random lines and dots. you can increase or decrease the noise. Please note that increasing the noise may make it difficult for your genuine visitors to read the code.
Download the code

Monday, October 10, 2011

The Indian Share Market – Lets have a Look at it



Popularly known as the Bombay Stock exchange, BSEIndia is one of Asia’s oldest and the largest share market ever known. By the year 2010, the equity market of the Mumbai Stock Exchange was listed to be about 1.63 trillion USD and was termed the fourth largest share market in the whole of Asia and the eighth largest in the world. By June 2011, there are almost 5085 companies listed in the stock market and thus, the Mumbai stock exchange is said to pose a significant importance in the field of trading stock and shares.
The BSE SENSEX is also termed as the BSE 30 and is one of the most widely used in India and Asia as well. Despite the numerous stock shares exchanges that are available in the share market, the BSEIndia and the NSEIndia are unique and have their own stages of stock market and the share market. Both play a significant role in the equity trading in India and thus, are deemed to be one of the major sources of shares and stocks. Despite the similar capitalization trends for the National Stock exchange and the Mumbai stock exchange, the volume of NSEIndia is twice as much as that of the BSEIndia.
The Mumbai Stock Exchange is said to function on all days of the week, except Saturdays and Sundays and for those declared as a holiday in advance. The BSE SENSEX was founded in the year 1986 and was developed as a means to measure the total performance of the exchange. This meter was indicative of the total stock and shares in the market and thus provided buyers as well as the sellers a brief on the status of the day. This facilitated investors to seek the right solution and then determine their mode of investment.
For the sellers, this index served of much value where they sought measures to either retain their shares and stocks or merely sell it up for a fairly good price. The SENSEX was well established and to aid this, the equity shares were developed in the year 2001 and 2002 and it aided the rapid growth and the establishment of the share market. The markets experienced an all new trend with the introduction of the equity shares and unlike the preferential shares the equity shares brought a great deal of investment into the market.
Also, these shares boosted up the investment in circulation and thus lead to a great deal of rise in the SENSEX market and the scores. This encouraged more investment and thus, the total investment in the share and the stock market grew up to an unimaginable extent. Further to the BSE SENSEX in the year 1986, the National Stock Index, NSE India was created in the year 1989, to facilitate the track of stocks and the shares in the market. This only considers the stocks listed in the BSE and not the shares into account.
A detailed study of these indices in the market will definitely help one track his stock and shares with ease and also aid further investment in the market.
 

Monday, October 3, 2011

SEO Services India has Provided Boom in Online Marketing


Search Engine Marketing is to cover many aspects of online marketing. Better planning and development of the site is based on the theme of promoting the brand and develop the site are crucial aspects of search engine optimization.
It is more about developing a quality website and promoting products that appear in the top rankings in search engines. It covers all the essential elements of website design and development. It also takes care of various elements such as content, graphics, etc. on your site.
Referencing to make your business site and popular online and make your site visible. SEO uses on-page optimization and off-page optimization to make your site perfect for search engines. On page optimization includes the design search engine friendly and good content for the website with the choice of the right keywords, file naming and navigation structure of the site. Design your site according to Google, Yahoo and other search engines guidelines.

As Internet use is increasing growing online marketing. You can make money more traditional online marketing. SEO Services India provides the boom in online marketing, helping you to make their products accessible to users.

You need to update and maintain the website on a regular basis, so that visitors to re-evaluate and update their business to keep their products and services. Online Marketing is highly dependent on hours and days an SEO SEO services have changed the way market. SEO services in India are big markets and outsourcing SEO services.

Question and Answers




Q: When did Bourbaki stop writing books?
A: When they realized that Serge Lang was a single person...

Q: What do you get if you divide the cirucmference of a jack-o-lantern by its diameter?
A: Pumpkin Pi!

Q: Why do you rarely find mathematicians spending time at the beach?
A: Because they have sine and cosine to get a tan and don't need the sun!

Q: Why do mathematicians, after a dinner at a Chinese restaurant, always insist on taking the leftovers home?
A: Because they know the Chinese remainder theorem!

Teacher: "Who can tell me what 7 times 6 is?"
Student: "It's 42!"
Teacher: "Very good! - And who can tell me what 6 times 7 is?"
Same student: "It's 24!"


Q.1 RAM SITA HAI ... TO RAM KAUN HAI ??
Ans - . TAILOR ( darzi )

==========================================================

Q2. SITA RAM HAI TO SITA KAUN HAI
Ans - . Sita MEMORY hai (RAM: Random Access Memory)

==========================================================

Q3. Harbhajan ask's Kumble to bring a Pepsi... Kumble brings a bottle of Pepsi but goes directly to Shehwag.? Why ?? Why ??
Ans:- Shehwag is an opener

==========================================================

Q5. Who kya hai Jo Dil main hain, Mann main hai par Dhadkan main nahi?
Ans:- aarey Aamir Khan !!!!!!!

==========================================================

Q6. What will! U call a person who is leaving India ??
Socho....... ........
Ans:- Hindustan Lever (Leaver).

==========================================================

Q7. Kalidas ka ek bhai joote banata tha us ka naam kya tha?
Ans:- Adidas

==========================================================

Q8. Luv and Kush are going to a village & in between comes a well.
Luv falls into the well. Why ?
Ans:- Because Luv is blind!!!!!

==========================================================

Q.9 Now Kush also jumps inside. Why? OK lot's of head scratching done.
Ans:- Luv ke liye saala kuch bhi karega!!!!

==========================================================

Q 10. Jackie Chan ki saas ka naam kya hai?.. Nahi pata..??
Ans:- D'Cold chain ki saans
HOPE U LIKE IT !!!!!!!

================================================


Q. Why does a Sardar keep empty beer bottles in his fridge?

A. They are there for those who don t drink.

================================================

Q: What do you get if you put some sugar under your pillow?

A: Sweet dreams!

================================================

Q. What did the Sardar say when she saw the sign in front of the YMCA?
A. "Look! They spelled MACY'S wrong!"

================================================

Q. What do you call an eternity?
A. Four Sardars in four cars at a four way stop.

================================================

Q. Why do Sardars have TGIF written on their shoes?
A. Toes Go In First.

================================================

Q. What do SMART Sardars and UFO's have in common?
A. You always hear about them but never see them.

================================================

Q. Why did the Sardars stare at the can of frozen orange juice?
A. Because it said concentrate.
Oh look, Daddy...Donut seeds.

================================================

Q. Why do Sardars always smile during lightning storms?
A. They think their picture is being taken.

=========================================
Q. How can you tell when a Sardars sends you a fax?
A. It has a stamp on it.

Q. Why can't Sardars dial 911?
A. They can't find the 11 on the phone!