Friday, 14 February 2014

Best Web Hosting Service in India

In web hosting industry, India is a vast market. So that we see many popular hosting companies set branches and support centers in this stream. With it’s powerful IT technologies, India also manages the second largest internet user country in the world. If you are an Indian customer and planning to host your business site on Indian hosting server but not sure which service to go, we’ll provide some guidance on how to choose the right Hosting service provider.


How to find the best web hosting Service in India or USA?


Best hosting services has become major important aspect these days to bring your business website online or world wide web and make visible to everyone globally. Suppose if you go to Google and you search for the best hosting services in India, plenty of hosting websites will be displayed and therefor you are sure which one to Hire.


web_hosting_services_indiaWeb-hosting-domain-services


All web hosting companies in India or USA offers a hosting server where you can store your business sites and create them available on the internet. Some do it better than others. The best and top providers give quality Hosting services great assistance and offer a variety of functions. However some are not.


An industry of web hosting market sometimes encourages for free services. Keep in mind the fact that you only get what you pay for. And there no folks provide you good services for FREE. Also, you should keep in mind that Pay the very lowest and what would you get? Off course very lowest in features, support, services and assistance.


Do Check if the Hosting Website go slow/Offline Often


Keep in mind that your web host should provide 99.9 % Server Up time  Because, it may be possible that you may loose all traffic If your business web site go offline. Hence, you should make sure that your web Host should have 99.9% Server Up time.


When you are in search of a Best hosting services in India take some time to analysis the newest specialized improvements and see what the best serves are providing. The best are not actually expensive; actually they are competitive for your hosting consideration.


There are lot of web hosting sites provide free web host but of course the advantages are restricted. There are a lot of sites that provide best hosting service at a little cost and come with more advantages. This would be more better than the previous one.


About Paceinfonet Web Solution Pvt Ltd

We are a fast growing Web Development & Web Hosting company in India working in the industry since last 7 years. We have very high project completion rate and have executed websites which stand out and give our clients a competitive edge. With hundreds of eye-catching websites under our belt. We specialize in E-commerce & Custom websites, Joomla, WordPress, any and all PHP based Opensource platforms.


Please check our Web hosting and development services at -


www.paceinfonet.org
www.paceinfonetwebdesigningstudio.com
www.paceinfonet.com


You can get More information about Hosting and Domain @ http://www.paceinfonet.com



Best Web Hosting Service in India

Saturday, 25 January 2014

rich password widget for your web forms

Here is a password field widget that not only has a password strength meter but also has other essential features that your users would love to have.


password-widget-1


Mask or unmask? Do passwords really have to look like **** ?


When you type-in your password, the password field shows a mask. This mask supposedly prevents someone from observing your screen ‘over the shoulder’ .


password-widget-2Need a strong password quickly? Generate it.


For those users, it will just be good to generate a password for the web site and then let the password manager remember it for life. Having a password generator along with the password field will be handy.


Download


PasswordWidget


Usage

The usage is simple.

First, link to the style sheet and the JavaScript file:



<link rel="STYLESHEET" type="text/css" href="pwdwidget.css" />
<script src="pwdwidget.js" type="text/javascript"></script>

Instead of the password field, use the code below.



<label for='regpwd'>Password:</label> <br />
<div class='pwdwidgetdiv' id='thepwddiv'></div>
<script  type="text/javascript" >
var pwdwidget = new PasswordWidget('thepwddiv','regpwd');
pwdwidget.MakePWDWidget();
</script>
<noscript>
<div><input type='password' id='regpwd' name='regpwd' /></div>
</noscript>

Notice that noscript part makes sure that a normal password field is shown even if Java Script is disabled.


The parameters to the PasswordWidget() class are: (1)the ID of the div for the widget and (2)the name of the password field.



var pwdwidget = new PasswordWidget(id_of_div,name_of_passwordfield);

More options


The features can be turned on/off. For example, it doesn’t make sense to have a ‘generate’ option in a log-in form. Here is the code:


var pwdwidget = new PasswordWidget('thepwddiv','regpwd');
pwdwidget.enableGenerate=false;
pwdwidget.enableShowStrength=false;
pwdwidget.MakePWDWidget();

Similarly, you can modify/translate the label text :


var pwdwidget = new PasswordWidget('thepwddiv','regpwd');
pwdwidget.txtShow= 'Display';
pwdwidget.txtMask= 'Hide';
pwdwidget.MakePWDWidget();


rich password widget for your web forms

Monday, 23 December 2013

Cleaning Variable

Variables that are submitted via web forms always need to be cleaned/sanitized before use in any way, to prevent against all kinds of different malicious intent.


FUNCTION



function clean($value) {

// If magic quotes not turned on add slashes.
if(!get_magic_quotes_gpc())

// Adds the slashes.
{ $value = addslashes($value); }

// Strip any tags from the value.
$value = strip_tags($value);

// Return the value out of the function.
return $value;

}

PHP CODE


$sample = "test";
$sample = clean($sample);
echo $sample;


Cleaning Variable

Tuesday, 17 December 2013

HTML5 Page Structure

<!DOCTYPE HTML>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Your Website</title>
</head>

<body>

<header>
<nav>
<ul>
<li>Your menu</li>
</ul>
</nav>
</header>

<section>

<article>
<header>
<h2>Article title</h2>
<p>Posted on <time datetime="2009-09-04T16:31:24+02:00">September 4th 2009</time> by <a href="#">Author Name</a> - <a href="#comments">6 comments</a></p>
</header>
<p>Your Content Goes Here.</p>
</article>

<article>
<header>
<h2>Article title</h2>
<p>Posted on <time datetime="2009-09-04T16:31:24+02:00">September 4th 2009</time> by <a href="#">Author Name</a> - <a href="#comments">6 comments</a></p>
</header>
<p>Your Content Goes Here.</p>
</article>

</section>

<aside>
<h2>About section</h2>
<p>Aside Content Goes Here.</p>
</aside>

<footer>
<p>Copyright 2013 Your Company Name</p>
</footer>

</body>

</html>


HTML5 Page Structure

Hides iframe until fully loaded

<iframe style="visibility: hidden;" src="yourhtmlpagepath.html" width="320"></iframe>


Hides iframe until fully loaded

Friday, 13 December 2013

Php Interview Questions and Answers

1- How can we register the variables into a session?

session_register($session_var);


$_SESSION['var'] = ‘value’;
2- What is the difference between characters \023 and \x23?

The first one is octal 23, the second is hex 23.
With a heredoc syntax, do I get variable substitution inside the heredoc contents?

Yes.
3- How can we submit form without a submit button?

We can use a simple JavaScript code linked to an event trigger of any form field. In the JavaScript code, we can call the document.form.submit() function to submit the form. For example: <input type=button value=”Save” onClick=”document.form.submit()”>
4- How can we create a database using PHP and mysql?

We can create MySQL database with the use of mysql_create_db($databaseName) to create a database.
5- How many ways we can retrieve the date in result set of mysql using php?

As individual objects so single record or as a set or arrays.
6- Can we use include (“abc.php”) two times in a php page “makeit.php”?

Yes.
7- For printing out strings, there are echo, print and printf. Explain the differences.

echo is the most primitive of them, and just outputs the contents following the construct to the screen. print is also a construct (so parentheses are optional when calling it), but it returns TRUE on successful output and FALSE if it was unable to print out the string. However, you can pass multiple parameters to echo, like:


<?php echo ‘Welcome ‘, ‘to’, ‘ ‘, ‘techpreparations!’; ?>


and it will output the string “Welcome to techpreparations!” print does not take multiple parameters. It is also generally argued that echo is faster, but usually the speed advantage is negligible, and might not be there for future versions of PHP. printf is a function, not a construct, and allows such advantages as formatted output, but it’s the slowest way to print out data out of echo, print and printf.
8- I am writing an application in PHP that outputs a printable version of driving directions. It contains some long sentences, and I am a neat freak, and would like to make sure that no line exceeds 50 characters. How do I accomplish that with PHP?

On large strings that need to be formatted according to some length specifications, use wordwrap() or chunk_split().
9- What’s the output of the ucwords function in this example?

$formatted = ucwords(“TECHPREPARATIONS IS COLLECTION OF INTERVIEW QUESTIONS”);


print $formatted;


What will be printed is TECHPREPARATIONS IS COLLECTION OF INTERVIEW QUESTIONS.


ucwords() makes every first letter of every word capital, but it does not lower-case anything else. To avoid this, and get a properly formatted string, it’s worth using strtolower() first.
10- What’s the difference between htmlentities() and htmlspecialchars()?

htmlspecialchars only takes care of <, >, single quote ‘, double quote ” and ampersand. htmlentities translates all occurrences of character sequences that have different meaning in HTML.
11- How can we extract string “abc.com” from a string “mailto:info@abc.com?subject=Feedback” using regular expression of PHP?

$text = “mailto:info@abc.com?subject=Feedback”;


preg_match(‘|.*@([^?]*)|’, $text, $output);


echo $output[1];


Note that the second index of $output, $output[1], gives the match, not the first one, $output[0].
12- So if md5() generates the most secure hash, why would you ever use the less secure crc32() and sha1()?

Crypto usage in PHP is simple, but that doesn’t mean it’s free. First off, depending on the data that you’re encrypting, you might have reasons to store a 32-bit value in the database instead of the 160-bit value to save on space. Second, the more secure the crypto is, the longer is the computation time to deliver the hash value. A high volume site might be significantly slowed down, if frequent md5() generation is required.



Php Interview Questions and Answers

Tuesday, 3 December 2013

ASP.NET Ajax UpdateProgress

UpdateProgress control shows the status information for the progress of the download occurring during the partial-page rendering in the UpdatePanel. The page can contain multiple UpdateProgress controls. Each one can be associated with a different UpdatePanel control. Alternatively, you can use one UpdateProgress control and associate it with all the UpdatePanel controls on the page. You can place UpdateProgress control either inside or outside the UpdatePanel controls. The following Asp.Net program shows how to an UpdateProgress control waits for completion of the task and during this waiting time it shows a .gif file as waiting message. Default.aspx



<!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 id="Head1" runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdateProgress ID="UpdateProgress1" runat="server">
<ProgressTemplate>
<img alt="ajax-progress" src="http://asp.net-informations.com/ajax/img/ajax-progress.gif"></img>
</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text=""></asp:Label>
<br />
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>

Default.aspx.cs



using System;
using System.Web.UI;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(5000);
Label1.Text = "Server Time :  " + DateTime.Now.ToString();
}
}

Default.aspx.vb



Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
System.Threading.Thread.Sleep(5000)
Label1.Text = "Server Time :  " & DateTime.Now.ToString()
End Sub
End Class


ASP.NET Ajax UpdateProgress