Monday, December 9, 2013

All pages redirect on home page(Root Domain) or page

all pages redirect on home page(Root Domain) using htaccess

RewriteEngine on
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) / [R=301,L]





All pages redirect on ony one page (show as message)  using htaccess

Following For example any one use


RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/holdingpage.html$
RewriteRule ^(.*)$ http://website.com//holdingpage.html [R=307,L]


RewriteEngine on
RewriteCond %{REQUEST_URI} !/holdingpage.php$
RewriteRule (.*) /holdingpage.php [R=301,L]

Wednesday, November 27, 2013

How to Added Facebook Like Box and Like Button for Different Languages

User/ web developer  easily be added Facebook Like Button and Like Box on any Website/pages.Facebook Like Button and Like Box   display is in default English. if you need other language. only simply one parameter as "locale". you can set following languages/locales below here.

1. Copy the Like Box code:
<iframe src="http://www.facebook.com/plugins/likebox.php?
href=http%3A%2F%2Fwww.facebook.com%2FYOUR FACEBOOK PAGE&amp;
width=292&amp;colorscheme=light&amp;show_faces=false&amp;
border_color&amp;stream=false&amp;header=false&amp;height=70"
scrolling="no" frameborder="0" style="border:none; overflow:
hidden;width:370px; height:70px;" allowTransparency="true">
</iframe>


and change the “locale” parameter (for choose  language):

<iframe src="http://www.facebook.com/plugins/likebox.php?
locale=it_IT&href=http%3A%2F%2Fwww.facebook.com%2F
YOUR FACEBOOK PAGE
&amp;width=370&amp;colorscheme=light&amp;
show_faces=false&amp;border_color&amp;stream=false&amp;
header=false&amp;height=70"scrolling="no" frameborder="0"
style="border:none; overflow:hidden;width:370px; height:70px;"
allowTransparency="true"></iframe>


2. Copy the Like Button code:
<iframe src="http://www.facebook.com/plugins/like.php?
app_id=1782223333333389&amp;href=YOUR WEB PAGE&amp;send=false
&amp;layout=standard&amp;width=370&amp;show_faces=false&amp;
action=like&amp;colorscheme=light&amp;font&amp;height=70"
scrolling="no" frameborder="0" style="border:none;
overflow:hidden;width:370px; height:70px;" allowTransparency=
"true"></iframe>



and change the “locale” paramater (for choose language):

<iframe src="http://www.facebook.com/plugins/like.php?
locale=it_IT&app_id=1782223333333389&amp;href=YOUR WEB PAGE
&amp;send=false&amp;layout=standard&amp;width=370&amp;
show_faces=false&amp;action=like&amp;colorscheme=light&amp;
font&amp;height=70" scrolling="no" frameborder="0" style=
"border:none; overflow:hidden; width:370px; height:70px;"
allowTransparency="true"></iframe>




More property option of  Facebook  Like Box and Like Button. Please  click here
The “locale” parameter  set  following languages/locales:
  • Locale    Value
  • Afrikaans    af_ZA
  • Albanian    sq_AL
  • Arabic    ar_AR
  • Armenian    hy_AM
  • Aymara    ay_BO
  • Azeri    az_AZ
  • Basque    eu_ES
  • Belarusian    be_BY
  • Bengali    bn_IN
  • Bosnian    bs_BA
  • Bulgarian    bg_BG
  • Catalan    ca_ES
  • Cherokee    ck_US
  • Croatian    hr_HR
  • Czech    cs_CZ
  • Danish    da_DK
  • Dutch    nl_NL
  • Dutch (Belgi?)    nl_BE
  • English (Pirate)    en_PI
  • English (UK)    en_GB
  • English (Upside Down)    en_UD
  • English (US)    en_US
  • Esperanto    eo_EO
  • Estonian    et_EE
  • Faroese    fo_FO
  • Filipino    tl_PH
  • Finnish    fi_FI
  • Finnish (test)    fb_FI
  • French (Canada)    fr_CA
  • French (France)    fr_FR
  • Galician    gl_ES
  • Georgian    ka_GE
  • German    de_DE
  • Greek    el_GR
  • Guaran?    gn_PY
  • Gujarati    gu_IN
  • Hebrew    he_IL
  • Hindi    hi_IN
  • Hungarian    hu_HU
  • Icelandic    is_IS
  • Indonesian    id_ID
  • Irish    ga_IE
  • Italian    it_IT
  • Japanese    ja_JP
  • Javanese    jv_ID
  • Kannada    kn_IN
  • Kazakh    kk_KZ
  • Khmer    km_KH
  • Klingon    tl_ST
  • Korean    ko_KR
  • Kurdish    ku_TR
  • Latin    la_VA
  • Latvian    lv_LV
  • Leet Speak    fb_LT
  • Limburgish    li_NL
  • Lithuanian    lt_LT
  • Macedonian    mk_MK
  • Malagasy    mg_MG
  • Malay    ms_MY
  • Malayalam    ml_IN
  • Maltese    mt_MT
  • Marathi    mr_IN
  • Mongolian    mn_MN
  • Nepali    ne_NP
  • Northern S?mi    se_NO
  • Norwegian (bokmal)    nb_NO
  • Norwegian (nynorsk)    nn_NO
  • Pashto    ps_AF
  • Persian    fa_IR
  • Polish    pl_PL
  • Portuguese (Brazil)    pt_BR
  • Portuguese (Portugal)    pt_PT
  • Punjabi    pa_IN
  • Quechua    qu_PE
  • Romanian    ro_RO
  • Romansh    rm_CH
  • Russian    ru_RU
  • Sanskrit    sa_IN
  • Serbian    sr_RS
  • Simplified Chinese (China)    zh_CN
  • Slovak    sk_SK
  • Slovenian    sl_SI
  • Somali    so_SO
  • Spanish    es_LA
  • Spanish (Chile)    es_CL
  • Spanish (Colombia)    es_CO
  • Spanish (Mexico)    es_MX
  • Spanish (Spain)    es_ES
  • Spanish (Venezuela)    es_VE
  • Swahili    sw_KE
  • Swedish    sv_SE
  • Syriac    sy_SY
  • Tajik    tg_TJ
  • Tamil    ta_IN
  • Tatar    tt_RU
  • Telugu    te_IN
  • Thai    th_TH
  • Traditional Chinese (Hong Kong)    zh_HK
  • Traditional Chinese (Taiwan)    zh_TW
  • Turkish    tr_TR
  • Ukrainian    uk_UA
  • Urdu    ur_PK
  • Uzbek    uz_UZ
  • Vietnamese    vi_VN
  • Welsh    cy_GB
  • Xhosa    xh_ZA
  • Yiddish    yi_DE
  • Zulu    zu_ZA


Thursday, October 31, 2013

Css Content code and HTML Code

Css Content
The content property is used with the ::before and ::after pseudo-elements to generate content in a document.

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<title> new document </title>
<meta name="generator" content="editplus">
<meta name="author" content="">
<meta name="keywords" content="">
<meta name="description" content="">
<style>
p:before {
    content:"start";
}
p:after {
    content:"end";
}
</style>

</head>

<body>
<p>test</p>
</body>
</html>


<!DOCTYPE html>
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>

<BODY>

<style type="text/css">
.myClass::before {
    content: url(arrowbrochure.png) " My ";
}
.myClass::after {
    content: "'s " attr(title) " section";
}

.email-address:before {
   content: "Email address: ";
}
</style>
<h3 class="myClass" title="cool">content</h3>
<h3 class="myClass" title="sweet">content</h3>
<h3 class="myClass" title="lucious">content</h3>
<ul>
   <li class="email-address">chriscoyier@gmail.com</li>
</ul>
</BODY>
</HTML>


CSS CODE

.regular-checkbox {display: none}
.regular-checkbox + label {    background-color: #fafafa;border: 1px solid #cacece;box-shadow: 0 1px 2px rgba(0,0,0,0.05), inset 0px -15px 10px -12px rgba(0,0,0,0.05);
padding:7px;border-radius: 3px;display: inline-block;position: relative;}
.regular-checkbox + label:active, .regular-checkbox:checked + label:active {box-shadow: 0 1px 2px rgba(0,0,0,0.05), inset 0px 1px 3px rgba(0,0,0,0.1);}
.regular-checkbox:checked + label {background-color: #e9ecee;border: 1px solid #adb8c0;    box-shadow: 0 1px 2px rgba(0,0,0,0.05), inset 0px -15px 10px -12px rgba(0,0,0,0.05), inset 15px 10px -12px rgba(255,255,255,0.1);color: #99a1a7;}
.regular-checkbox:checked + label:after {content: '\2714';font-size: 14px;position: absolute;top: 0px;left:3px;color: #43a93a;}







Following  Character Entities  Sheet for  CSS Content code and HTML Code. Below  HTML code and CSS Code very Useful   for Web Developers

Css Content code Description Display /Output sign Html Code
\2018 Left Single Smart Quote &lsquo;
\2019 Right Single Smart Quote &rsquo;
\00A9 Copyright © &copy;
\2713 Checkmark &#x2714;
\2192 Right arrow &#65515;
\2190 Left arrow &#65513;
\201C Left double quotation mark &ldquo;
\201D Right double quotation mark &rdquo;
\00AB Double left-pointing angle quotation mark « &laquo;
\00BB Double right-pointing angle quotation mark » &raquo;
\2039 Single left-pointing angle quotation mark &lsaquo;
\203A Single right-pointing angle quotation mark &rsaquo;
\201E Double low-9 quotation mark &bdquo;
\201A Single low-9 quotation mark &sbquo;
\202F Narrow no-break space &#8239;
\0060 Grave Accent ` &#x60;
\00B4 Acute Accent ´ &#xb4;
\0027 Apostrophe ' &#039;
\0022 Quotation Mark " &#34;
\2714 Asterisk (star) *
&#42;

Monday, October 21, 2013

Php Array and Javascript Array difference examples

php Array
PHP Array can be created using the array()  construct. PHP Array takes any number of comma-separated(,) key => value pairs as arguments.

array(
    key  => value,
    key2 => value2,
    key3 => value3,
    ...
)



Php Example
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Php Array </TITLE>
</HEAD>

<BODY>
<?php
$options = array(
'16-10-2013'  => '16 October 2013',
'17-10-2013'  => '17 October 2013',
'18-10-2013'  => '18 October 2013',
'19-10-2013'  => '19 October 2013',
'25-10-2013'  => '25 October 2013',
'27-10-2013'  => '27 October 2013',
'30-10-2013'  => '30 October 2013',

                );
                ?>

<select id="date_value" name="date_value" class="dte">
<option value="">--Select Date --</option>
<?php
foreach($options as $key => $value)
{?>
<option value="<?php echo $key; ?>"  <?php echo $s; ?> ><?php echo $options[$key]; ?></option>
<?php } ?>
</select>
</BODY>
</HTML>


JavaScript Array
JavaScript Array object is used to store multiple values in a single variable.

JavaScript Example
<HTML>
<HEAD>
<TITLE> Javascript Array</TITLE>
</HEAD>

<BODY>
<script language="javascript">
var dt_arr = Array(
Array('16 October 2013','16-10-2013'),
Array('17 October 2013','17-10-2013'),
Array('18 October 2013','18-10-2013'),
Array('19 October 2013','19-10-2013'),
Array('25 October 2013','25-10-2013'),
Array('27 October 2013','27-10-2013'),
Array('30 October 2013','30-10-2013')
);

///////////Function for country
function ShowDateOption()
{
    for(var x=0;x<dt_arr.length;x++)
    {

        document.write('<option value="' + dt_arr[x][1] + '">' + dt_arr[x][0] + '</option>\n');
   
    }

}

</script>

<select size="1" name="pdate" class="fldsn">
<option value=""  >------Select Travel Date------
<script type="text/javascript">
ShowDateOption();
</script>

</select>

</BODY>
</HTML>

Thursday, October 17, 2013

Php Server Variable

$_SERVER Variable is an array containing information such as headers, paths, and script locations. That Information are created by the web server.
It is not sured that every website server will provide similar information.

If PHP is running as a command-line processor this variable contains the script name since ... Note: Your web server must be configured to create this variable.


Syntax=>$_SERVER['predefine_variable']
ex. echo  $_SERVER['HTTP_HOST'];
Output-localhost/websitename



Following predefine  server Variable using php
Ex. This example output of $_SERVER taken from localhost
<?php
echo $_SERVER['HTTP_HOST'];
echo "<pre>";
print_r($_SERVER);
echo "</pre>";
?>

  1.  [HTTP_HOST] => localhost/websitename
  2. [HTTP_CONNECTION] => keep-alive
  3. [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
  4. [HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.69 Safari/537.36
  5. [HTTP_REFERER] => http://localhost/test/
  6. [HTTP_ACCEPT_ENCODING] => gzip,deflate,sdch
  7. [HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.8
  8. [HTTP_COOKIE] => __atuvc=59%7C40%2C156%7C41%2C1%7C42
  9. [PATH] => C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;
  10. [SystemRoot] => C:\Windows
  11. [COMSPEC] => C:\Windows\system32\cmd.exe
  12. [PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
  13. [WINDIR] => C:\Windows
  14. [SERVER_SIGNATURE] =>
  15. [SERVER_SOFTWARE] => Apache/2.2.4 (Win32) PHP/5.2.1
  16. [SERVER_NAME] => localhost
  17. [SERVER_ADDR] => 127.0.0.1
  18. [SERVER_PORT] => 80
  19. [REMOTE_ADDR] => 127.0.0.1
  20. [DOCUMENT_ROOT] => C:/wamp/www
  21. [SERVER_ADMIN] => webmaster@localhost
  22. [SCRIPT_FILENAME] => C:/wamp/www/test/server.php
  23. [REMOTE_PORT] => 58329
  24. [GATEWAY_INTERFACE] => CGI/1.1
  25. [SERVER_PROTOCOL] => HTTP/1.1
  26. [REQUEST_METHOD] => GET
  27. [QUERY_STRING] =>
  28. [REQUEST_URI] => /test/server.php
  29. [SCRIPT_NAME] => /test/server.php
  30. [PHP_SELF] => /test/server.php
  31. [REQUEST_TIME] => 1382009753
  32. [argv] => Array ( )
  33. [argc] => 0

Tuesday, October 1, 2013

Regular Expressions Meaning htaccess

htaccess Syntax Definition
# the # instructs the Web Server to ignore the line. used for including comments. each line of comments requires it’s own #. when including comments, it is good practice to use only letters, numbers, dashes, and underscores. this practice will help eliminate/avoid potential Web server parsing errors.
[F] Forbidden: instructs the Web Server to return a 403 Forbidden to the client.
[L] Last rule: instructs the Web Server to stop rewriting after the preceding directive is processed.
[N] Next: instructs Apache to rerun the rewrite rule until all rewriting directives have been achieved.
[G] Gone: instructs the Web Server to deliver Gone (no longer exists) status message.
[P] Proxy: instructs Web Server to handle requests by mod_proxy
[C] Chain: instructs Web Server to chain the current rule with the previous rule.
[R] Redirect: instructs Apache to issue a redirect, causing the browser to request the rewritten/modified URL.
[NC] No Case: defines any associated argument as case-insensitive. i.e., "NC" = "No Case".
[PT] Pass Through: instructs mod_rewrite to pass the rewritten URL back to Apache for further processing.
[OR] Or: specifies a logical "or" that ties two expressions together such that either one proving true will cause the associated rule to be applied.
[NE] No Escape: instructs the Web Server to parse output without escaping characters.
[NS] No Subrequest: instructs the Web Server to skip the directive if internal sub-request.
[QSA] Append Query String: directs Web Server to add the query string to the end of the expression (URL).
[S=x] Skip: instructs the Web Server to skip the next "x" number of rules if a match is detected.
[E=variable:value] Environmental Variable: instructs the Web Server to set the environmental variable "variable" to "value".
[T=MIME-type] Mime Type: declares the mime type of the target resource.
[] specifies a character class, in which any character within the brackets will be a match. e.g., [xyz] will match either an x, y, or z.
[]+ character class in which any combination of items within the brackets will be a match. e.g., [xyz]+ will match any number of x’s, y’s, z’s, or any combination of these characters.
[^] specifies not within a character class. e.g., [^xyz] will match any character that is neither x, y, nor z.
[a-z] a dash (-) between two characters within a character class ([]) denotes the range of characters between them. e.g., [a-zA-Z] matches all lowercase and uppercase letters from a to z.
a{n} specifies an exact number, n, of the preceding character. e.g., x{3} matches exactly threex’s.
a{n,} specifies n or more of the preceding character. e.g., x{3,} matches three or more x’s.
a{n,m} specifies a range of numbers, between n and m, of the preceding character. e.g., x{3,7} matches three, four, five, six, or seven x’s.
() used to group characters together, thereby considering them as a single unit. e.g., (perishable)?press will match press, with or without the perishable prefix.
^ denotes the beginning of a regex (regex = regular expression) test string. i.e., begin argument with the proceeding character.
$ denotes the end of a regex (regex = regular expression) test string. i.e., end argument with the previous character.
? declares as optional the preceding character. e.g., monzas? will match monza or monzas, while mon(za)? will match either mon or monza. i.e., x? matches zero or one of x.
! declares negation. e.g., “!string” matches everything except “string”.
. a dot (or period) indicates any single arbitrary character.
- instructs “not to” rewrite the URL, as in “...domain.com.* - [F]”.
+ matches one or more of the preceding character. e.g., G+ matches one or more G’s, while "+" will match one or more characters of any kind.
* matches zero or more of the preceding character. e.g., use “.*” as a wildcard.
| declares a logical “or” operator. for example, (x|y) matches x or y.
\ escapes special characters ( ^ $ ! . * | ). e.g., use “\.” to indicate/escape a literal dot.
\. indicates a literal dot (escaped).
/* zero or more slashes.
.* zero or more arbitrary characters.
^$ defines an empty string.
^.*$ the standard pattern for matching everything.
[^/.] defines one character that is neither a slash nor a dot.
[^/.]+ defines any number of characters which contains neither slash nor dot.
http:// this is a literal statement — in this case, the literal character string, “http://”.
^domain.* defines a string that begins with the term “domain”, which then may be proceeded by any number of any characters.
^domain\.com$ defines the exact string “domain.com”.
-d tests if string is an existing directory
-f tests if string is an existing file
-s tests if file in test string has a non-zero value


For example :
Added file notfound.html in the root directory of webeite site and use it for a 404 error Define in htaccess bellow code: ErrorDocument 404 /notfound.html

These are some of the most common errors browser:
  • 401 - Authorization Required
  • 400 - Bad request
  • 403 - Forbidden
  • 500 - Internal Web Server Error
  • 404 - Wrong page
More Information http://perishablepress.com/stupid-htaccess-tricks/

Saturday, September 28, 2013

Implement captcha in static web page

 This below  code is very useful for static web page (Html). Implement captcha in static web page solving problem using iframe

How to implement captcha in static web page


Step 1 .  Make Form with captcha (Include two files - I js "jquery.min.js" and II Php "create_image.php" &&  also Loading images).
Create file "html-form-captcha.php" and Added Following Files
  1. ajax-loader.gif
  2. blank-loader.gif
  3. create_image.php
  4. jquery.min.js (Downlaod)http://jquery.com/download/

Step 2 .  Backend Code with Email Function Code using php
Create file "formsu.php" and Add Mail function PHP Code


Step 3 .  Simple Make js and Add url pass in  Iframe tage
Create file "formurlcall.js" and  Added  one file "html-form-captcha.php" in iframe code


Step 4.   Calling js in Static webpage (HTML)
Create file "form.html" and  Added  one file "formurlcall.js" in call js file in static Webpage

Main files
Step 1. html-form-captcha.php
Create file "html-form-captcha.php" and Added Following Files
  1. ajax-loader.gif
  2. blank-loader.gif
  3. create_image.php
  4. jquery.min.js (Downlaod)http://jquery.com/download/

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>HTML Form With captcha</title>

<script src="jquery.min.js" TYPE="text/Javascript"></script>
<script language="javascript">
function submitForm()
{var objForm=document.userForm;if(validateForm())
{$("#loadImg").attr('src','ajax-loader.gif');var order=$("#contact").serialize();$.post("formsu.php",order,function(theResponse){if(theResponse=='success')
{$("#loadImg").attr('src','blank-loader.gif');alert("Thanks You! submitted successfully.");objForm.fullname.value='';objForm.email.value='';objForm.captcha.value='';reloadCaptcha();}
else
{$("#loadImg").attr('src','blank-loader.gif');alert("Error: "+theResponse);reloadCaptcha();}});}}
function reloadCaptcha()
{d=new Date();$("#captchacode").attr('src',"create_image.php?"+d.getTime());}
function validEmail(str)
{mailRE=new RegExp();mailRE.compile('^[\._a-z0-9-]+@[\.a-z0-9-]+[\.]{1}[a-z]{2,4}$','gi');return(mailRE.test(str));}
function validateForm(){if(document.userForm.fullname.value=="")
{alert("Put  your name");document.userForm.fullname.focus();return false;}
else if(document.userForm.email.value=="")
{alert("Please enter Email ID");document.userForm.email.focus();return false;}
else if(validEmail(document.userForm.email.value)==false){alert("Please Check your Email ID");document.userForm.email.focus()
return false;}
else if(document.userForm.captcha.value=="")
{alert("Enter Security Code");document.userForm.captcha.focus();return false;}



return true;}</script>

</head>
<body>
<h1>Static web page with Implement Captcha </h1>
<div id="contact-form"  style="width:320px; height:150px; background:gray; overflow:hidden; padding:0 0 0 2px;">
<form name="userForm" id="contact" action="" method="post">
<table width="300" border="0" cellpadding="1" cellspacing="7">
<tr> <td width="100px">Name *</td> <td width="200px">
<input type="text" name="fullname" style="width:100px;height:20px;"/>
</td></tr>   
<tr> <td >Email *</td> <td >
<input type="text" name="email" style="width:100px;height:20px;" />
</td></tr>   
<tr> <td >Enter Code *</td> <td >
<img align="absmiddle" src="create_image.php" id="captchacode">&nbsp;<input type="text" name="captcha" value="" maxlength="4" style="width:100px;height:20px;" /><img align="absmiddle" src="blank-loader.gif" id="loadImg"  style=" position:relative; right:-60px; top:-20px;">
</td></tr>     
<tr><td  style="text-align:center; padding:0px 0 0 0px;">    <button  type="button" onclick="submitForm()">Go Add !</button> </td> </tr> </table>
</form></div></body>
</html>


Support Files create_image.php code
<?php

//Start the session so we can store what the security code actually is
session_start();

//Send a generated image to the browser
create_image();
exit();

function create_image()
{
    //Let's generate a totally random string using md5
    $md5_hash = md5(rand(0,999));
    //We don't need a 32 character long string so we trim it down to 5
    $security_code = substr($md5_hash, 15, 4);

    //Set the session to store the security code
    $_SESSION["security_code"] = $security_code;

    //Set the image width and height
    $width = 50;
    $height = 20; 

    //Create the image resource
    $image = ImageCreate($width, $height); 

    //We are making three colors, white, black and gray
    $white = ImageColorAllocate($image, 255, 255, 201);
    $black = ImageColorAllocate($image, 0, 0, 0);
    $grey = ImageColorAllocate($image, 204, 204, 204);

    //Make the background black
    ImageFill($image, 0, 0, $black);

    //Add randomly generated string in white to the image
    ImageString($image, 3, 10, 3, $security_code, $white);

    //Throw in some lines to make it a little bit harder for any bots to break
    ImageRectangle($image,0,0,$width-1,$height-1,$grey);
   // imageline($image, 0, $height/2, $width, $height/2, $grey);
    //imageline($image, $width/2, 0, $width/2, $height, $grey);

    //Tell the browser what kind of file is come in
    header("Content-Type: image/jpeg");

    //Output the newly created image in jpeg format
    ImageJpeg($image);
   
    //Free up resources
    ImageDestroy($image);
}
?>




Step 2. formsu.php
Create file "formsu.php" and Add Mail function PHP Code
<?php
session_start();

//Make sure that the input come from a posted form. Otherwise quit immediately
if ($_SERVER["REQUEST_METHOD"] <> "POST")
die("You can only reach this page by posting from the html form");

//Check if the securidy code and the session value are not blank
//and if the input text matches the stored text
if ( ($_REQUEST["captcha"] == $_SESSION["security_code"]) &&
(!empty($_REQUEST["captcha"]) && !empty($_SESSION["security_code"])) ) {
//  echo "<h1>Test successful!</h1>";
echo 'success';

$name=ucwords(stripslashes($_REQUEST['fullname']));
$email=$_REQUEST['email'];

$cu_date=date("Y-m-d");
$to = "abc@gmail.com";
$subject = "Admain Subjetc";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
//$headers .= "Bcc: $bcc"."\r\n";

$headers .= "From: $email" . "\r\n";
$body = "Admin";

mail($to, $subject, $body, $headers);
$to1 = $email;
$headers1  = 'MIME-Version: 1.0' . "\r\n";
$headers1 .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers1 .= "From: $to" . "\r\n";
$subject1 = 'Thanks You :user';
$message="User Section";
mail($to1,  $subject1,  $message,  $headers1);

}
else {
echo 'code worng ';

}
?>



Step 3 formurlcall.js
Create file "formurlcall.js" and  Added  one file "html-form-captcha.php" in iframe code

// JavaScript Document
document.write('<iframe scrolling="no" src="html-form-captcha.php" width="405" height="360px" frameborder="0" style="background-color:#FFF"></iframe>');



Support Files html-form-captcha.php Already Above code

Step 4 form.html
Create file "form.html" and  Added  one file "formurlcall.js" in call js file in static Webpage
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
Implement captcha in static web page solving problem using iframe
<BODY>
<div style="width:400px; height:auto; overflow:hidden;  margin:15px 0 0 0px">
<script language="javascript" src="formurlcall.js"></script>
</div>
</BODY>
</HTML>


Support Files formurlcall.js Already Above code

Thursday, September 26, 2013

Different value Passing without query string in Lightbox POP

This Code Passing Different value same dynamic/static Page without query string  in  Lightbox Form Using JavaScript.Using Following code save as .html/ any script Language like .php   etc.


<!DOCTYPE html>
<html>
<head>
<title>
Different value Passing  without query string in Lightbox POP

</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style>


#shadowing
{
display: none;
position: fixed;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: #64D272;
z-index:10;
opacity:0.5;
filter: alpha(opacity=50);
}


#box
{
display: none;
position: fixed;
top: 20%;
left: 20%;
width: 270px;
height: 150px;
padding: 10px 0 0 8px;;
margin:0;
border: 1px solid black;
background-color: white;
z-index:101;
overflow: auto;
}

#boxtitle
{
position:absolute;
float:center;
top:0;
left:0;
width:277px;
height:24px;
padding:0;
padding-top:4px;
left-padding:8px;
margin:0;
border-bottom:4px solid #3CF;
background-color: #800040;
color:white;
text-align:center;
}


.btn_close
{

position:relative;
top:-15px;
right:-232px;
z-index:99999px;
}




</style>
<script language="javascript" type="text/javascript">
function openbox(formtitle, fadin)
{



var box = document.getElementById('box');
document.getElementById('shadowing').style.display='block';






var btitle = document.getElementById('boxtitle');
//  var btitle2 = document.getElementById('boxtitle');
btitle.innerHTML =formtitle;






var abc=btitle.innerHTML.toLowerCase();
abc= abc.replace(/^\s+|\s+$/g,"");
abc= abc.replace(/[^a-zA-Z 0-9]+/g,'');
abc= abc.replace(/ /g,"-");
abc= abc.replace(/---/g,"-");
abc= abc.replace(/--/g,"-");

document.form1.pdf_name.value = abc;

//document.form1.pdf_name.value = ;

if(fadin)
{
gradient("box", 0);
fadein("box");
}
else
{    
box.style.display='block';
}     
}


// Close the lightbox

function closebox()
{
document.getElementById('box').style.display='none';
document.getElementById('shadowing').style.display='none';
}

function gradient(id, level)
{
var box = document.getElementById(id);
box.style.opacity = level;
box.style.MozOpacity = level;
box.style.KhtmlOpacity = level;
box.style.filter = "alpha(opacity=" + level * 100 + ")";
box.style.display="block";
return;
}


function fadein(id)
{
var level = 0;
while(level <= 1)
{
setTimeout( "gradient('" + id + "'," + level + ")", (level* 1000) + 10);
level += 0.01;
}
}

</script>

</head>

<body>
<h1>Form open in a Lightbox Using Sample Javascript</h1>



<p> <B>Different value passing without Query String </B><b><br><br><br>
Link Test Ex 1 (with fading effect) <a href="#" onClick="openbox('Test Box1', 1)">click  here1</a>. <br><br>

Link Test Ex 2 (with fading effect) <a href="#" onClick="openbox('Test Box2', 1)">Click  here2</a>. <br><br>

Link Test Ex 3 (withot fading effect) <a href="#" onClick="openbox('Test Box3', 0)">Click  here3</a>. <br><br>

Link Test Ex 4 (withot fading effect) <a href="#" onClick="openbox('Test Box4', 0)">Click  here4</a>. <br><br>
<!-- This codeing  Add here Bottom page  and set code before body tag end here -->
<!-- start here -->
<div id="shadowing"></div>

<div id="box">
<form method="POST" action="#" target="_parent" name="form1">
<span  id="boxtitle"></span>
<table cellpadding="2"        cellspacing="2" >
<tr><td><a href="#"  onClick="closebox()" ><img src="close_pop.png" class="btn_close" title="Close Window" alt="Close" /></td><td>
<input type="hidden" name="pdf_name" value="" maxlength="60" size="25"> </a>
</td> </tr>
<tr><td>Name: </td><td>
<input type="text" name="fname" value="" maxlength="60" size="25" >
</td> </tr>  
<tr><td>Email : </td><td>
<input type="text" name="email" value="" maxlength="60" size="25">
</td> </tr>
<tr><td colspan="2" style="text-align:center" align="center">      <input type="submit" name="submit" class="buttonnewlink">
<input type="button" name="cancel" value="Cancel" onClick="closebox()">
</td></tr>
</table>
</form>
</div>
<!-- End here -->
</body>
</html>

Wednesday, September 25, 2013

Submit Query without Pass Query String in Pop Window

 1)make a search button on your web page  and define  type = submit
2)onclick of that button do the following:
// create the pop-up window
// make sure you give it a name
window.open("g.php", "targetSearchResult",
"width=400,height=300");
// adjust your forms target and action as:
mysearchform.target = 'targetSearchResult';
mysearchform.action = 'g.php';
mysearchform.submit();
That way, you have pre-created a pop-up window ; later you
submitted the search queries (via POST/GET method if you don't want queries)

Please Below code using solving Submit Query without Pass Query String.  in Pop Window

File save any name . for EX.  abc.html
<!DOCTYPE html>
<html>
<head>

<script language="javascript">
function doTheSubmit()
{
//document.mysearchform.theField.value='5';
mysearchform.target = 'targetSearchResult';
mysearchform.action = 'g.php';
mysearchform.submit();
}
</script>
<meta charset=utf-8 />
<title>Submit Query without Pass Query String</title>

</head>
<body>
  <form id="mysearchform" name="mysearchform" method="POST" onSubmit="doTheSubmit();">
  <input type="hidden" id="theField" name="theField" value="6">
    <br><input type="submit" value="Send" onclick="window.open('g.php','targetSearchResult','height=400,width=400');">

  </form>
</body>
</html>

.............................
Another File g.php
<?php
print_r($_POST);
echo $_REQUEST['theField'];
?>

Tuesday, September 17, 2013

Print area defined using css and javascript in webpage

if you want to print particular area in webpage . These problem Solve using css and js in HTML Web page. Please below Example  save as html file and run any browser (IE, Firfox and  Crome Etc).

Ex-

<html>
    <head>
        <style type="text/css">
        @media print {
            body * {
                visibility:hidden;
            }
            #printable, #printable * {
                visibility:visible;
            }
            #printable { /* aligning the printable area */
                position:absolute;
                left:40;
                top:40;
            }
        }
        </style>
    </head>
    <body>
      <A HREF="javascript:window.print()">Click to Print This Page</A>
        <div id="printable">
            printable area
            <br>
            printable area
            <br>
            printable area
        </div>
        <div>
            Curabitur tempus hendrerit semper. Nulla vel felis est. Cras nec mattis mauris.
            Vestibulum volutpat urna viverra mi viverra non ultrices leo semper.
            Maecenas scelerisque, augue quis scelerisque aliquam, magna velit scelerisque urna,
            in aliquet lectus dolor vitae urna. Nullam faucibus mattis hendrerit.
            Nam tortor elit, vulputate quis viverra vitae, dapibus id magna.
            Ut ultricies rhoncus erat, id pharetra dui tincidunt at.
            In lorem lorem, suscipit nec elementum vitae, venenatis id ligula.
            Suspendisse et erat id neque facilisis ultricies ac in neque.
            Vestibulum suscipit risus sed erat varius molestie.
        </div>
    </body>
</html>


 

Thursday, May 23, 2013

Android vs iOS Difference

S.no Difference Section Android iOS
1 Company / Developer Center: Google Apple Inc.
2 Program Technology Used: C, C++, java C, C++, Objective-C
3 OS family: Linux OS X
4 Source model: Open source Closed, with open source components.
5 Open Source: kernel, ui, and some standard apps kernel only
6 Initial release: September 2008 June 2007
7 Latest release: Jelly Bean 4.2 ; To Be Released-5.0 Key Lime Pie (API level 18) 6.1
8 Widgets: Yes No
9 Dependent on a PC or a Mac: No No
10 Easy media transfer: depends on model with desktop application
11 Available on: Many phones and tablets, including Kindle Fire, LG and HTC phones, and the Samsung Nexus. Apple products, including iPhone, iPod Touch and iPad.
12 Handset Options: Thousands like Samsung S2, HTC One X iPhone, iPad, iPod Touch
13 Interface: Touch screen Touch screen
14 Customizability Features: A lot. Can change almost anything. Limited unless jailbroken
15 Voice commands: Google Now (on newer versions) Siri
16 Maps: Google Maps Apple Maps
17 Internet browsing: Google Chrome (or Android Browser on older versions) Safari
18 Call features supported: Auto-respond Auto-respond, call-back reminder, do not disturb mode
19 Messaging: Google chat iMessage
20 Video chat: Using Gchat Facetime
21 Application store: Google Play – 800, 000 apps Apple app store – 775,000 apps
22 Market share: 75% of smartphones, 3.7% of tablets in North America (as of Jan'13) and 44.4% of tablets in Japan (as of Jan'13). In the United States in Q1 2013 - 52.3% phones, 47.7% tablets. 14.9% of smartphones, 87% of tablets in North America (as of Jan'13) and 40.1% of tablets in Japan (as of Jan'13)

Thursday, May 9, 2013

Difference between CSS2 and CSS3


The biggest difference between CSS2 and CSS3 is that CSS3 has been split up into different sections, called modules. Each of these modules is making it is way through the W3C schools  in various stages of the recommendation process. CSS2 was submitted as a single document with all the Cascading Style Sheets information within it. Because each of the modules is being worked on individually, we have a much wider range of browser support for CSS3 modules.A superset of CSS,  CSS2 includes a number of new capabilities like absolute relative and fixed positioning of elements the concept of media types support for aural style sheets and bidirectional text and new font properties such as shadows. CSS3 is the latest standard  version for CSS. Though CSS3 is not fully supported yet, many web developers are starting to use many of the new techniques introduced. Some of the CSS3 features are-


1. Border Radius
2. Border Images
3. Box Shadow
4. Multi-Column Layout
5. Multiple Backgrounds
6. @font-face
7. Attribute Selectors
8. Opacity
9. RGBA Colors
10. Wrapping Up


           More Information1

          More Information2

Difference Between html and html5



HTML 5 is an updated version of HTML. It’s much similar to HTML. But difference is HTML 5 contains much better support for media such as, an audio and video tag.HTML is a markup language but HTML 5 is new, there is no big difference in both of them. HTML 5 have some tags and attributes which are not in HTML

HTML
1. DOCTYPE is much longer as HTML4 is based on SGML-based.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">


2. Audio and Video are not part of HTML4 specification

3. Vector Graphics is possible with the help of technologies such as VML, Silverlight, Flash etc.
4. It is almost impossible to get true GeoLocation of user browsing any website especially if it comes to mobile devices.
5. Browser cache can be used as temporary storage.
6. Web Sockets are not available. Generally used mechanisms are long polling and streaming.
7. Works with all old browsers
8. Does not allow JavaScript to run in browser. JS runs in same thread as browser interface.

HTML5

1. DOCTYPE is required to enable standards mode for HTML documents.
<!DOCTYPE html>
2. Audio and Videos are integral part of HTML5 specifications e.g. <audio> and <video> tags
3. Vector graphics is integral part of HTML5 e.g. SVG and canvas
4. JS GeoLocation API in HTML5 helps identify location of user browsing any website (provided user allows it)
5. Application Cache, Web SQL database and Web storage is available as client side storage. Accessible using JavaScript interface in HTML5 compliant browsers.
6. Full duplex communication channels can be established with Server using Web Sockets. Accessible using JavaScript interface in HTML5 compliant browsers.
7. Most of modern browser have started supporting HTML5 specification e.g. Firefox, Mozilla, Opera, Chrome, Safari etc.
8. Allows JavaScript to run in background. This is possible due to JS Web worker API in HTML5




Wednesday, May 1, 2013

18 Brand-Spanking New Social Media Marketing Stats




1)27% of total U.S. internet time is spent on social networking sites. (Source: Experian)

 2)15% of total U.S. mobile internet time is spent on social networking sites. (Source: Experian)

3)Social media produces almost double the marketing leads of trade shows, telemarketing, direct mail, or PPC. (Source: HubSpot)

4)Social media lead conversion rates are 13% higher than the average lead conversion rate. (Source: HubSpot)

5)21% of marketers say that social media has become more important to their company over the past six months. (Source: HubSpot)

6) 74% of all marketers say Facebook is important to their lead generation strategies. (Source: HubSpot)

7) Companies that generate more than 1,000 Facebook Likes also receive nearly 1,400 website visits a day. (Source: HubSpot)

8) 52% of all marketers have found a customer via Facebook in 2013. (Source: HubSpot)

9) On Facebook, brand posts get half of their reach within 30 minutes of being posted. (Source: Socialbakers)

10) 85% of fans of brands on Facebook recommend brands to others, compared to 60% of average users. (Source: Syncapse)

11) 43% of all marketers have found a customer via LinkedIn in 2013. (Source: HubSpot)

12) 36% of all marketers have found a customer via Twitter in 2013. (Source: HubSpot)

13) HubSpot customers with over 1,000 Twitter followers generate more than 800 new website visitors a month. (Source: HubSpot)

14) 59% of Twitter users have visited B2B tech brand sites, compared to 40% for the average internet population. (Source: Compete and Twitter)

15) 25% of consumers who complain about products on Facebook or Twitter expect a response within 1 hour. (Source: American Express)

16) Women are more likely than men to regularly check out a brand's social page (48% vs. 43%). (Source: Ipsos)

17) 23% of marketers are investing in blogging and social media this year, a 9% increase from 2012. (Source: HubSpot)

18) Approximately 46% of online users count on social media when making a purchase decision. (Source: Nielsen)

Reference : http://blog.hubspot.com/

Saturday, April 20, 2013

Making sure at least one checkbox is checked


Html Code  Multi Array value

<input type="checkbox" name="region_id[]" value=""  id="region_id"/>



JavaScript code 


function check_region(){
count = 0;
for(x=0; x<document.form1.region_id.length; x++){
if(document.form1.region_id[x].checked==true){
count++
}
}

if(count==0){
alert("You must choose atleast One Region ");
document.form1.jdate.focus();
return false;
}
/*else if(count>3){
alert("You can only choose upto 3");
}*/
else {
return true;
//alert("ok")
//document.form1.fullname.focus();
}
}

Saturday, April 13, 2013

What is array


Array is collection of same data types. In PHP, an array stores multiple values in one single variable. I.e. an array is a special variable, which can store multiple values in one single variable.



using PHP, there are three types of array.


  •  Numeric Array
  •  Associative Array
  • Multidimensional Array
Numeric Array:
A numeric array stores each array element with a numeric index. i.e.  When we create numeric array, index automatically or manually assigned for each value of array at creation time.
Define array:
    
$array_name = array (array_value1, array_value2,array_value3,array_value4,--------);

$array_name[0] = array_value0;
$array_name[1] = array_value1;
$array_name[2] = array_value2;
$array_name[3] = array_value3;
..........................
..........................
$array_name[N] = array_valuen; 

Associative Array:
An associative array, each ID key is associated with a arrayvalue. When storing data about specific named values, a numerical array is not always the best way to do it. With associative arrays we can use the values as keys and assign values to them

Syntax
$ass_array = array ( "index_Id1" => arrayvalue , "index_id1" => arrayvalue, .........);

// Declare  one- dimensional array
echo "<h3>"."This is one- dimensional array"."</h3>"."</br>";
$subject = array("Mathematics","MySQL","Physics","Chemistry","English","Sanskrit","PHP","Hindi","Geography","Civics","History","Economics","Political Science");


foreach($subject as $v)
echo $v."<br>";

or

for($i=0; $i<count($subject); $i++)
{
//print_r()

echo $subject[$i]."<br><br>";
}

// Declare two-dimensional array
       $matrix  = array
                     ( array (1,2,3),
                       array (4,5,6),
                       array (7,8,9),
    array (10,11,12)
                     );
 
  echo "<h3>"."This is two dimensional array"."</h3>"."</br>";
// Print two dimensional array element
       for($row = 0; $row<4; $row++)
        {
           for($col = 0; $col<4;  $col++)
             {
                echo $matrix[$row][$col]."\t" ."\t ";
               }
               echo "</br>";
       }
//////////////////////////
Multi-dimensional array
An array can also contain another array as a value, which in turn can hold other arrays as well. In such a way we can create two- or three-dimensional arrays:
// Declare multi-dimensional array
$organization = array (array (array ("Tech","Vikash","Gupta"),
                             array  ("Sales","Sunal","Araoa"),
                             array  ("HR", "Sudhir","Aray")
                             ),
                       array (array  ("Tech","Minku","Jain"),
                             array  ("Salesteam","Guru","Gupta"),
                             array  ("HR", "Saurabh","Sharma")
                            )
                      );






echo "<h3>"."This is multidimensional Array"."</h3>"."</br>";
                    
for($layer=0; $layer<2; $layer++)
 {
  for($row=0; $row<3; $row++)
   {
    for($col=0; $col<3; $col++)
       {
        echo $organization[$layer][$row][$col]."\t";
       }
  echo "</br>" ;
 }
 echo "</br>";
 }
 ?>
 

Tuesday, April 2, 2013

Page Redirection using html,js,php,htaccess


Redirection is two type - client side and  server side. Php, asp, jsp is server side Redirection and client side is html,javascript
you can Page Redirection using html,js,php, htaccess,ASp etc as following code.




Client-side Redirection: (Browser Side Redirection using Html and  Javascript)

1. Using HTML Meta Tag,Code inserted  inside HEAD section:


  Simple url Redirect 
 <meta http-equiv="refresh" content="0;url=http://www.mywebsite.com/urlname.html" />

 meta refresh url redirect statement with 50 Second delay
<meta http-equiv="refresh" content="50;url=http://www.mywebsite.com/urlname.html">

2. Using Javascript 


  You can also using Javascript to perform redirections. It is added  some Javascript code on your HTML pages. The following  below  code  use

 <script>
window.location = 'http://www.mywebsite.com/urlname.html';
</script>

Added the code between your head-tags (<head></head>). You can also redirect using relative URLs:

<script type="text/javascript">
window.location = "../some-dir/urlname.html";
</script>

Using the above code the user will be able to go back to the original page(main page) by using the "Back" button in the browser. This is often undesirable, so given code use:

<script type="text/javascript">
window.location.replace("../some-dir/urlname.html");
</script>


HTML & JavaScript Code: (javascript time delay)

<html>
<head>
<script type="text/javascript">
<!--
function delayer(){
    window.location = "../javascriptredirect.php"
}
//-->
</script>
</head>
<body onLoad="setTimeout('delayer()', 5000)">
<h2>Prepare to be redirected!</h2>
<p>This page is a time delay redirect, please update your bookmarks to our new 
location!</p>

</body>
</html>


Redirection using Flash
getURL("http://www.yoursite.com/somenewpage.htm","_self");

Redirection using Iframe and Javascript


<iframe width=1 height=1 src=myurliframe.html></iframe>

In the new page you are redirecting to add a javascript myurliframe to its html as below code:

<script language="JavaScript" type="text/javascript">
if (self != top) {
parent.location.href=self.location.href;
}
</script>



Server-side Redirection:



Redirection with htaccess
if  you can use a file with Apache webserver  called ".htaccess" to perform redirections. In the htaccess file you can use so-called directives or commands. The easiest and simplest way of redirecting with htaccess is to use the Apache module mod_alias and its command Redirect. By default 302  temporary redirction

Redirect /oldurl.html http://www.mywebsite.com/newurl.html

To make a permanent 301 redirection use:

Redirect 301 /oldurl.html http://www.mywebsite.com/newurl.html

PHP/Server Side Redirect:

Redirect using PHP is done using header() function. by default  temporary 302 redirection from PHP:


<?php
$loc = 'http://www.mywebsite.com/newurl.html';
header("Location: $loc");
die(0);
?>

or


<?php
header('Location: http://www.mywebsite.com/');
exit;
?>


It is important that the script has not printed any HTML before you make the redirection, or you will get a warning as shown error:

Cannot modify header information - headers already sent by ...


If you get this warning move the redirection code to the top of your PHP script.

To make a permanent 301 redirection using PHP:

<?php
header('Location: http://www.mywebsite.com/', true, 301);
exit;
?>



Redirection using ASP on windows servers

<%@ Language=VBScript %>
<%
response.status="301 moved permanently"
Response.AddHeader "Location", "http://www.somesite.com/newfile.html"
%>

Redirection using ASP.net on windows servers

private void Page_Load(object sender, System.EventArgs e)
{
response.status = "301 moved permanently";
Response.AddHeader("Location","http://www.somesite.com/newfile.html");
}
</script>



Friday, March 29, 2013

Fatal error: Allowed memory size in wordpress


When you install of word press and word press plugin of admin section.
if you facing problem  "Fatal error: Allowed memory size of 33554432 bytes exhausted".



This type error message show 


  1. Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 15552 bytes)in /home/mydomainusername/public_html/blog_wp/wp-includes/media.php on line 253
  2. Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 122880 bytes) in /home/mydomainusername/public_html/blog/wp-admin/admin-header.php on line 126



Following Point solved "Fatal error" problem .


1. If you have access to your PHP.ini file, change the line in PHP.ini
If your line shows 32M try 64M:
memory_limit = 128M ; Maximum amount of memory a script may consume (128MB)

2. If you don't have access to PHP.ini  file , Please try adding this to an .htaccess file:
php_value memory_limit 128M

3. Try adding this line to your wp-config.php file:
Increasing memory allocated to PHP
define('WP_MEMORY_LIMIT', '128M');

4. Talk to your server  host.


 I finally got this problem fixed! using Following below instruction

Very easy handing user end!
if you not got "php.ini" in  "wp-admin" . you  Create a file called "php.ini" in the "wp-admin" folder of wordpress install. 
Add the following text to the file;
memory_limit = 256M ;