Category Archives: Latest Trends

Apple Pay With Wallet Apps Integration Could Soon Launch in India: Report

Apple may soon join other international giants to launch a payment service in India as many people in the country move away from cash payments. In a recent interview, an Apple executive said the company is looking at India’s payments market, though a specific launch time frame was not shared.

Speaking to LiveMint, Apple’s senior vice president Eddy Cue said the company desires to bring its Apple Pay mobile payments service in India. “Our head of Apple Pay, Jennifer Bailey, is here with me. And Apple Pay is something that we definitely want in India,” Cue said.

But bringing Apple Pay to India isn’t going to be easy, Cue added. “The challenge with payment mechanisms is that there isn’t really a lot of global scale. You deal with individual markets at a time… but India is one of those markets where we hope to bring Apple Pay to,” he said.

At present, Apple is clear that it doesn’t want to compete with the likes of Paytm and other wallet services in India, but work with them. Cue said, “You have some great payment mechanisms today and we will leverage all of that in doing this. That’s one of the advantages that we have with Apple Pay – Apple Pay isn’t trying to come up with a brand new payment vehicle, so the fact that people like Paytm are doing well here is great. The fact that credit cards are doing well here is great. We just need to integrate with the popular ones and make the service available,” said Cue.

In wake of the Indian government invalidating a significant proportion of cash in the country with its demonetisation initiative last year, Indians have been scrambling for ways to cut their reliance on paper bills. Paytm and MobiKwik reported astronomical growth in new users and transactions following demonetisation last year.

Several international giants including Samsung and Google have launched their payment services in India. While Amazon also maintains an Amazon Pay service, and intends to expand its offering in the coming months, Facebook’s WhatsApp plans to add support for UPI payments in the popular messaging app.

Disclosure: Paytm’s parent company One97 is an investor in Gadgets 360.

For the latest tech news and reviews, follow Gadgets 360 on Twitter, Facebook, and subscribe to our YouTube channel.

Source: Apple may soon join other international giants to launch a payment service in India as many people in the country move away from cash payments. In a recent interview, an Apple executive said the company is looking at India’s payments market, though a specific launch time frame was not shared.

Speaking to LiveMint, Apple’s senior vice president Eddy Cue said the company desires to bring its Apple Pay mobile payments service in India. “Our head of Apple Pay, Jennifer Bailey, is here with me. And Apple Pay is something that we definitely want in India,” Cue said.

But bringing Apple Pay to India isn’t going to be easy, Cue added. “The challenge with payment mechanisms is that there isn’t really a lot of global scale. You deal with individual markets at a time… but India is one of those markets where we hope to bring Apple Pay to,” he said.

At present, Apple is clear that it doesn’t want to compete with the likes of Paytm and other wallet services in India, but work with them. Cue said, “You have some great payment mechanisms today and we will leverage all of that in doing this. That’s one of the advantages that we have with Apple Pay – Apple Pay isn’t trying to come up with a brand new payment vehicle, so the fact that people like Paytm are doing well here is great. The fact that credit cards are doing well here is great. We just need to integrate with the popular ones and make the service available,” said Cue.

In wake of the Indian government invalidating a significant proportion of cash in the country with its demonetisation initiative last year, Indians have been scrambling for ways to cut their reliance on paper bills. Paytm and MobiKwik reported astronomical growth in new users and transactions following demonetisation last year.

Several international giants including Samsung and Google have launched their payment services in India. While Amazon also maintains an WhatsApp plans to add support for UPI payments in the popular messaging app.

Disclosure: Paytm’s parent company One97 is an investor in Gadgets 360.

For the latest tech news and reviews, follow Gadgets 360 on Twitter, Facebook, and subscribe to our YouTube channel.

Source: http://gadgets.ndtv.com/apps/news/apple-pay-with-wallet-apps-integration-could-soon-launch-in-india-report-1763529

The 25 Best Outdoor Surveillance Camera Systems

Adding outdoor surveillance to your home security solution can be a practical and economical way to protect and secure your home. However, there are many options for consumers to sift through and not every home has the same outdoor surveillance needs.

We’ve put together this comprehensive guide to help you identify your home surveillance needs and choose the best outdoor surveillance cameras for your home. Keep reading or click on a section to get started.

Table of Contents

  • What to consider for your outdoor surveillance system
  • 25 best outdoor surveillance cameras
  • Benefits of a video surveillance system
  • How video surveillance systems work
  • Is video surveillance right for you?
  • Wrap up: Choosing the best outdoor security cameras

What to consider for your outdoor surveillance system

One of the most important features of an outdoor security camera is whether it’s been rated weatherproof and waterproof. However, there are several other factors to consider when choosing an outdoor surveillance camera for your home.

Here are some questions you’ll need to consider to help you choose the best outdoor surveillance system for your home.

How much outdoor surveillance coverage do you need?

The camera’s viewing angle determines how much space the camera will cover. Wider angled lenses help cut down on the number of cameras required for overall coverage of your property. Depending on the coverage you need and each camera’s viewing angle, you may need to purchase multiple cameras or multi-packs to monitor more space around your home.

Does the camera have high-quality video resolution?

Another factor to consider when outdoor surveillance camera shopping is the camera’s resolution. The higher the camera resolution, the clearer and easier the images will be to see. Ideally, you’ll want 1080p or higher resolution for the clearest images. Keep in mind that if you connect your camera to a DVR or other recording device, it will also need to be HD compatible in order to keep the image at a high quality.

Does the security camera have night vision?

Monitoring at night is one of the most common uses for outdoor surveillance cameras, and in order to get a high-quality image, you’ll want to purchase a camera with infrared (IR) technology. Many models have a built-in IR cut-switch that automatically enables and disables the infrared technology depending on the lighting conditions. The number of infrared LEDs used in a camera will help determine how far of a night vision range a camera has.

What’s the best camera style for your needs?

There are two main styles of outdoor security cameras — dome or bullet. Both camera styles are fairly obvious to potential intruders, however, it is more difficult to determine which direction a dome-style camera is pointing, which may help deter a potential intruder. Another thing to keep in mind regarding camera style is whether you want to mount it on the ceiling or wall.

Does the camera have sufficient recording capacity?

If you want to watch a playback of the goings-on around your home, you’ll need a camera with onboard storage capacity or cloud recording capabilities. Most cameras with recording capabilities have an onboard SD or microSD slot that allows for sufficient recording space.

Some systems also record to DVD or mini-disc, but most are now transitioning to DVR (digital video recorder) technology. A computer-based camera system records your video to the PC’s hard disc, making it fast and easy to review your video history.

Do you want to access your camera with a mobile device?

Many outdoor surveillance cameras available today are able to live stream a feed directly to your mobile device. If you want to be able to check in during the day or while away for extended periods, this is a valuable feature to have. Be sure to choose a camera that is compatible with your device. Generally, remote access, mobile alerts or cloud-based features require monthly or yearly fees with your home security monitoring provider.

Do you want a wired or wireless security camera?

Wireless cameras are easy to install and reposition, but you’ll want to check the battery levels periodically to ensure you’re fully protected. Wired units usually require professional installation and access to a power outlet, but tend to provide clearer images than their wireless counterparts.

Does the camera have pan/tilt/zoom features?

Cameras with remote controlled pan, tilt and zoom are ideal for providing coverage to larger areas and allow the user to get the best viewing angle possible without having to physically reposition the camera.

Do you want a camera with energy saving features?

Surveillance cameras can eat up a lot of energy, but if you find a model that only records when motion is detected, it can help to cut down on operating costs. Many models will even send you push or email notifications when something out of the ordinary is detected, so you don’t need to be continually monitoring yourself.

How much do you want to spend?

You can get a CCTV security system for as little as $99, but this is probably a case of “you get what you pay for.” A good-quality, basic system (one camera) typically costs between $100-200 and can climb to thousands of dollars for multi-camera, indoor/outdoor, fancy systems with every feature imaginable.

Source: https://www.safety.com/surveillance-systems/

MySQL vs MySQLi vs PDO Performance Benchmark, Difference and Security Comparison in 2016 and 2017 – Find Converter Wrapper and ORM Packages

Since PHP 7 was introduced and PHP 5 end of support life was reached, many hosting companies dropped PHP 5 from their servers and PHP developers were forced to migrate their code to work with PHP 7.

One of the changes of PHP 7 was the discontinuation of the original MySQL extension. Developers had to choose to migrate their code to use either the MySQLi or and the PDO extension.

Read this article to learn about the differences and decide which is the best for you to migrate your code to work on PHP 7 or later, as well learn about some recommended packages that use PDO or MySQLi for performing common database purposes like backup, security, user registration and login, database abstraction, ORM (Object-Relational Mapping), etc.

1. PDO vs MySQLi vs MySQL

As we all know, MySQL is an Open Source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). MySQL is a central component of the LAMP Open Source Web application software stack (and other “AMP” stacks): Apache MySQL and PHP.

MySQL is an essential part of almost every Open Source PHP application. Good examples for PHP and MySQL based scripts are phpBB, osCommerce and Joomla.

PHP used to come with the original MySQL extension built-in which supports with older MySQL versions. However this extension was deprecated in favor of MySQLi (i for improved). At the same time PHP continued to evolve and the PDO (PHP Data Objects) extension was introduced to become a common interface for accessing many types of database.

MySQLi is another one of three ways to access a MySQL database server. Like the MySQL extension, the new MySQLi was designed to take better advantage of more recent MySQL server features.

The PHP Data Objects (PDO) extension defines a lightweight, common interface for accessing databases in PHP. Each database driver that is supported by PDO interface can expose database specific features, as well common functions.

PDO provides a data access abstraction layer, which means that, regardless of which database type you use, the same functions are available to perform queries and fetch results. PDO does not provide a full database abstraction. i.e. it does not rewrite SQL queries or emulate missing features. You should use a full-blown abstraction layer package if you need that capability.

2. Difference to Connect Using MySQLi and PDO

Either PDO and MySQLi offer an Object Oriented interface to the extension functions but MySQLi also offers a procedural API, which makes it easier for newcomers to understand. If you are familiar with the original PHP MySQL extension, you will find migration to the procedural MySQLi interface easier. Below is an example:

// PDO
$pdo = new PDO( “mysql:” . “host=localhost;” . “dbname=database”,
‘username’, ‘password’);

// mysqli, procedural way
$mysqli = mysqli_connect( ‘localhost’, ‘username’, ‘password’, ‘database’);

// mysqli, object oriented way
$mysqli = new mysqli( ‘localhost’, ‘username’, ‘password’, ‘database’);
The main advantage of PDO over MySQLi is in the database support. PDO supports 12 different database types, in opposition to MySQLi, which supports MySQL only.

When you have to switch your project to use another database, PDO makes the process simpler. So all you have to do is change the connection string and at most a few queries if they use any syntax which is not supported by your new database.

3. PDO vs MysQLi Security using Prepared Statements

Both PDO and MySQLi provide support for prepared queries. This helps preventing SQL injection security issues, as long as you only use prepared queries to insert dynamic parameters in the queries.

For example, consider a hacker that tries to inject malicious SQL passing a forged value to the parameter code of a HTTP POST request that could be emulated like this:

$_POST[‘code’] = “‘; DELETE FROM products; /*”;
If you do not escape this value, it will be inserted in query as is, and so it would delete all rows from the products table.

One way to make queries more secure avoiding SQL injection is to quote string parameter values to insert escape characters.

// PDO, “manual” escaping

$name = PDO::quote( $_POST[‘code’] );
$pdo->query( “SELECT id, name FROM products WHERE code = $code” );

// mysqli, “manual” escaping

$name = mysqli_real_escape_string( $_POST[‘code’] );
$mysqli->query( “SELECT id, name FROM products WHERE name = ‘$code'” );
PDO::quote() not only escapes the string, but it also adds quotes. mysqli_real_escape_string() will only escape the string, so you will need to add the quotes manually.

// PDO, prepared statement

$pdo->prepare( ‘SELECT id, name FROM products WHERE code = :code’ );
$pdo->execute( array( ‘:code’ => $_POST[‘code’] ) );

// mysqli, prepared statements

$query = $mysqli->prepare(‘SELECT id, name FROM users WHERE code = ?’);
$query->bind_param(‘s’, $_POST[‘code’]);
$query->execute();
PDO also supports client side queries. This means that when it prepares a query, it does not have to communicate with the server.

Since MySQLi uses native prepared statements, it will may actually be faster to use mysqli_real_escape_string instead of using prepared statements, while it is still a secure solution.

4. PDO vs MySQLi vs MySQL Performance Benchmark

There were some PHP MySQL performance benchmark tests several years ago by Jonathan Robson as well by Radu Potop. Even though these tests were performed with PHP 5.3 and nowadays we are using PHP 7 or later, let’s consider these results as reference.

Basically they show that for SELECT queries using prepared statements MySQLi runs a bit faster. Still it may not be significant depending on your purposes.

Keep in mind that PDO by default uses client side prepared statements emulation. When using native prepared statements, there is an additional round trip to the server to prepare the statement, so the overall query execution time may be actually greater than when using native prepared statements for running a query only once.

As mentioned above, you can use mysqli_real_escape_string function to quote dynamic parameters like you would do when using the original MySQL extension. This is like emulating prepared queries the way it is done with PDO because you would not need to perform an additional round trip to the server to prepare the statement.

5. Comparison between PDO and MySQLi Terms of Usage

While MySQLi has its advantages accessing MySQL server features, PDO sometimes has a leg up and may be a better fit for the user, depending on personal preferences and convenience. Like most things, the option that works best depends on whom you ask and what situation you need MySQLi or PDO for.

MySQLi only works with MySQL databases, whereas PDO is flexible and able to work with multiple database systems, including IBM, Oracle and MySQL. If you ever have to switch databases or provide a database independent solution, using MySQLi directly is not the best option. You may still use MySQLi in database independent solutions using an abstraction layer.

Binding parameters with MySQLi is not as easy or flexible as with PDO. MySQLi uses a numbered parameter system and does no’t support named parameters like PDO. MySQLi has good support and maintenance, making the transition to and use the new system safe and secure.

You will be able to utilize new features available in the newer versions of MySQL servers. This is one of the biggest advantages of MySQLi. PDO may not have extensive support to take full advantage of MySQL’ newer capabilities.

The installation process with MySQLi is not only easy, but is automatic when the PHP 5 MySQL extension that comes built-in Windows or Linux distributions.

6. Converting MySQL Applications to Use PDO or MySQLi

If you have a project using the old MySQL extension and you need to convert it to use MySQLi or PDO, it may take you a while to rewrite it if you were not using a database abstraction layer.

If you need a quick a easy solution that does not require to change much your code, you can try either the package PDO or the MySQLi to use each of these extensions by the means of MySQL wrapper functions that call mysql_* functions using PDO by Aziz S. Hussain or PHP MySQL to MySQLi by Dave Smith for PDO and MySQLi extension functions respectively.

This will allow you to make your code run on PHP 7 while you do a real migration of code that does not require a wrapper.

Dave Smith also has written a tutorial on how to migrate mysql code to mysqli considering the differences between those extensions.

Source: 1. PDO vs MySQLi vs MySQL

As we all know, MySQL is an Open Source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). MySQL is a central component of the LAMP Open Source Web application software stack (and other “AMP” stacks): Apache MySQL and PHP.

MySQL is an essential part of almost every Open Source PHP application. Good examples for PHP and MySQL based scripts are phpBB, osCommerce and Joomla.

PHP used to come with the original MySQL extension built-in which supports with older MySQL versions. However this extension was deprecated in favor of MySQLi (i for improved). At the same time PHP continued to evolve and the PDO (PHP Data Objects) extension was introduced to become a common interface for accessing many types of database.

MySQLi is another one of three ways to access a MySQL database server. Like the MySQL extension, the new MySQLi was designed to take better advantage of more recent MySQL server features.

The PHP Data Objects (PDO) extension defines a lightweight, common interface for accessing databases in PHP. Each database driver that is supported by PDO interface can expose database specific features, as well common functions.

PDO provides a data access abstraction layer, which means that, regardless of which database type you use, the same functions are available to perform queries and fetch results. PDO does not provide a full database abstraction. i.e. it does not rewrite SQL queries or emulate missing features. You should use a full-blown abstraction layer package if you need that capability.

2. Difference to Connect Using MySQLi and PDO

Either PDO and MySQLi offer an Object Oriented interface to the extension functions but MySQLi also offers a procedural API, which makes it easier for newcomers to understand. If you are familiar with the original PHP MySQL extension, you will find migration to the procedural MySQLi interface easier. Below is an example:

// PDO
$pdo = new PDO( “mysql:” . “host=localhost;” . “dbname=database”,
‘username’, ‘password’);

// mysqli, procedural way
$mysqli = mysqli_connect( ‘localhost’, ‘username’, ‘password’, ‘database’);

// mysqli, object oriented way
$mysqli = new mysqli( ‘localhost’, ‘username’, ‘password’, ‘database’);
The main advantage of PDO over MySQLi is in the database support. PDO supports 12 different database types, in opposition to MySQLi, which supports MySQL only.

When you have to switch your project to use another database, PDO makes the process simpler. So all you have to do is change the connection string and at most a few queries if they use any syntax which is not supported by your new database.

3. PDO vs MysQLi Security using Prepared Statements

Both PDO and MySQLi provide support for prepared queries. This helps preventing SQL injection security issues, as long as you only use prepared queries to insert dynamic parameters in the queries.

For example, consider a hacker that tries to inject malicious SQL passing a forged value to the parameter code of a HTTP POST request that could be emulated like this:

$_POST[‘code’] = “‘; DELETE FROM products; /*”;
If you do not escape this value, it will be inserted in query as is, and so it would delete all rows from the products table.

One way to make queries more secure avoiding SQL injection is to quote string parameter values to insert escape characters.

// PDO, “manual” escaping

$name = PDO::quote( $_POST[‘code’] );
$pdo->query( “SELECT id, name FROM products WHERE code = $code” );

// mysqli, “manual” escaping

$name = mysqli_real_escape_string( $_POST[‘code’] );
$mysqli->query( “SELECT id, name FROM products WHERE name = ‘$code'” );
PDO::quote() not only escapes the string, but it also adds quotes. mysqli_real_escape_string() will only escape the string, so you will need to add the quotes manually.

// PDO, prepared statement

$pdo->prepare( ‘SELECT id, name FROM products WHERE code = :code’ );
$pdo->execute( array( ‘:code’ => $_POST[‘code’] ) );

// mysqli, prepared statements

$query = $mysqli->prepare(‘SELECT id, name FROM users WHERE code = ?’);
$query->bind_param(‘s’, $_POST[‘code’]);
$query->execute();
PDO also supports client side queries. This means that when it prepares a query, it does not have to communicate with the server.

Since MySQLi uses native prepared statements, it will may actually be faster to use mysqli_real_escape_string instead of using prepared statements, while it is still a secure solution.

4. PDO vs MySQLi vs MySQL Performance Benchmark

There were some PHP MySQL performance benchmark tests several years ago by Jonathan Robson as well by Radu Potop. Even though these tests were performed with PHP 5.3 and nowadays we are using PHP 7 or later, let’s consider these results as reference.

Basically they show that for SELECT queries using prepared statements MySQLi runs a bit faster. Still it may not be significant depending on your purposes.

Keep in mind that PDO by default uses client side prepared statements emulation. When using native prepared statements, there is an additional round trip to the server to prepare the statement, so the overall query execution time may be actually greater than when using native prepared statements for running a query only once.

As mentioned above, you can use mysqli_real_escape_string function to quote dynamic parameters like you would do when using the original MySQL extension. This is like emulating prepared queries the way it is done with PDO because you would not need to perform an additional round trip to the server to prepare the statement.

5. Comparison between PDO and MySQLi Terms of Usage

While MySQLi has its advantages accessing MySQL server features, PDO sometimes has a leg up and may be a better fit for the user, depending on personal preferences and convenience. Like most things, the option that works best depends on whom you ask and what situation you need MySQLi or PDO for.

MySQLi only works with MySQL databases, whereas PDO is flexible and able to work with multiple database systems, including IBM, Oracle and MySQL. If you ever have to switch databases or provide a database independent solution, using MySQLi directly is not the best option. You may still use MySQLi in database independent solutions using an abstraction layer.

Binding parameters with MySQLi is not as easy or flexible as with PDO. MySQLi uses a numbered parameter system and does no’t support named parameters like PDO. MySQLi has good support and maintenance, making the transition to and use the new system safe and secure.

You will be able to utilize new features available in the newer versions of MySQL servers. This is one of the biggest advantages of MySQLi. PDO may not have extensive support to take full advantage of MySQL’ newer capabilities.

The installation process with MySQLi is not only easy, but is automatic when the PHP 5 MySQL extension that comes built-in Windows or Linux distributions.

6. Converting MySQL Applications to Use PDO or MySQLi

If you have a project using the old MySQL extension and you need to convert it to use MySQLi or PDO, it may take you a while to rewrite it if you were not using a database abstraction layer.

If you need a quick a easy solution that does not require to change much your code, you can try either the package PDO or the MySQLi to use each of these extensions by the means of MySQL wrapper functions that call mysql_* functions using PDO by Aziz S. Hussain or PHP MySQL to MySQLi by Dave Smith for PDO and MySQLi extension functions respectively.

This will allow you to make your code run on PHP 7 while you do a real migration of code that does not require a wrapper.

Dave Smith also has written a tutorial on how to migrate mysql code to mysqli considering the differences between those extensions.

Source: 1. PDO vs MySQLi vs MySQL

As we all know, MySQL is an Open Source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). MySQL is a central component of the LAMP Open Source Web application software stack (and other “AMP” stacks): Apache MySQL and PHP.

MySQL is an essential part of almost every Open Source PHP application. Good examples for PHP and MySQL based scripts are phpBB, osCommerce and Joomla.

PHP used to come with the original MySQL extension built-in which supports with older MySQL versions. However this extension was deprecated in favor of MySQLi (i for improved). At the same time PHP continued to evolve and the PDO (PHP Data Objects) extension was introduced to become a common interface for accessing many types of database.

MySQLi is another one of three ways to access a MySQL database server. Like the MySQL extension, the new MySQLi was designed to take better advantage of more recent MySQL server features.

The PHP Data Objects (PDO) extension defines a lightweight, common interface for accessing databases in PHP. Each database driver that is supported by PDO interface can expose database specific features, as well common functions.

PDO provides a data access abstraction layer, which means that, regardless of which database type you use, the same functions are available to perform queries and fetch results. PDO does not provide a full database abstraction. i.e. it does not rewrite SQL queries or emulate missing features. You should use a full-blown abstraction layer package if you need that capability.

2. Difference to Connect Using MySQLi and PDO

Either PDO and MySQLi offer an Object Oriented interface to the extension functions but MySQLi also offers a procedural API, which makes it easier for newcomers to understand. If you are familiar with the original PHP MySQL extension, you will find migration to the procedural MySQLi interface easier. Below is an example:

// PDO
$pdo = new PDO( “mysql:” . “host=localhost;” . “dbname=database”,
‘username’, ‘password’);

// mysqli, procedural way
$mysqli = mysqli_connect( ‘localhost’, ‘username’, ‘password’, ‘database’);

// mysqli, object oriented way
$mysqli = new mysqli( ‘localhost’, ‘username’, ‘password’, ‘database’);
The main advantage of PDO over MySQLi is in the database support. PDO supports 12 different database types, in opposition to MySQLi, which supports MySQL only.

When you have to switch your project to use another database, PDO makes the process simpler. So all you have to do is change the connection string and at most a few queries if they use any syntax which is not supported by your new database.

3. PDO vs MysQLi Security using Prepared Statements

Both PDO and MySQLi provide support for prepared queries. This helps preventing SQL injection security issues, as long as you only use prepared queries to insert dynamic parameters in the queries.

For example, consider a hacker that tries to inject malicious SQL passing a forged value to the parameter code of a HTTP POST request that could be emulated like this:

$_POST[‘code’] = “‘; DELETE FROM products; /*”;
If you do not escape this value, it will be inserted in query as is, and so it would delete all rows from the products table.

One way to make queries more secure avoiding SQL injection is to quote string parameter values to insert escape characters.

// PDO, “manual” escaping

$name = PDO::quote( $_POST[‘code’] );
$pdo->query( “SELECT id, name FROM products WHERE code = $code” );

// mysqli, “manual” escaping

$name = mysqli_real_escape_string( $_POST[‘code’] );
$mysqli->query( “SELECT id, name FROM products WHERE name = ‘$code'” );
PDO::quote() not only escapes the string, but it also adds quotes. mysqli_real_escape_string() will only escape the string, so you will need to add the quotes manually.

// PDO, prepared statement

$pdo->prepare( ‘SELECT id, name FROM products WHERE code = :code’ );
$pdo->execute( array( ‘:code’ => $_POST[‘code’] ) );

// mysqli, prepared statements

$query = $mysqli->prepare(‘SELECT id, name FROM users WHERE code = ?’);
$query->bind_param(‘s’, $_POST[‘code’]);
$query->execute();
PDO also supports client side queries. This means that when it prepares a query, it does not have to communicate with the server.

Since MySQLi uses native prepared statements, it will may actually be faster to use mysqli_real_escape_string instead of using prepared statements, while it is still a secure solution.

4. PDO vs MySQLi vs MySQL Performance Benchmark

There were some PHP MySQL performance benchmark tests several years ago by Jonathan Robson as well by Radu Potop. Even though these tests were performed with PHP 5.3 and nowadays we are using PHP 7 or later, let’s consider these results as reference.

Basically they show that for SELECT queries using prepared statements MySQLi runs a bit faster. Still it may not be significant depending on your purposes.

Keep in mind that PDO by default uses client side prepared statements emulation. When using native prepared statements, there is an additional round trip to the server to prepare the statement, so the overall query execution time may be actually greater than when using native prepared statements for running a query only once.

As mentioned above, you can use mysqli_real_escape_string function to quote dynamic parameters like you would do when using the original MySQL extension. This is like emulating prepared queries the way it is done with PDO because you would not need to perform an additional round trip to the server to prepare the statement.

5. Comparison between PDO and MySQLi Terms of Usage

While MySQLi has its advantages accessing MySQL server features, PDO sometimes has a leg up and may be a better fit for the user, depending on personal preferences and convenience. Like most things, the option that works best depends on whom you ask and what situation you need MySQLi or PDO for.

MySQLi only works with MySQL databases, whereas PDO is flexible and able to work with multiple database systems, including IBM, Oracle and MySQL. If you ever have to switch databases or provide a database independent solution, using MySQLi directly is not the best option. You may still use MySQLi in database independent solutions using an abstraction layer.

Binding parameters with MySQLi is not as easy or flexible as with PDO. MySQLi uses a numbered parameter system and does no’t support named parameters like PDO. MySQLi has good support and maintenance, making the transition to and use the new system safe and secure.

You will be able to utilize new features available in the newer versions of MySQL servers. This is one of the biggest advantages of MySQLi. PDO may not have extensive support to take full advantage of MySQL’ newer capabilities.

The installation process with MySQLi is not only easy, but is automatic when the PHP 5 MySQL extension that comes built-in Windows or Linux distributions.

6. Converting MySQL Applications to Use PDO or MySQLi

If you have a project using the old MySQL extension and you need to convert it to use MySQLi or PDO, it may take you a while to rewrite it if you were not using a database abstraction layer.

If you need a quick a easy solution that does not require to change much your code, you can try either the package PDO or the MySQLi to use each of these extensions by the means of MySQL wrapper functions that call mysql_* functions using PDO by Aziz S. Hussain or PHP MySQL to MySQLi by Dave Smith for PDO and MySQLi extension functions respectively.

This will allow you to make your code run on PHP 7 while you do a real migration of code that does not require a wrapper.

Dave Smith also has written a tutorial on how to migrate mysql code to mysqli considering the differences between those extensions.

Source: https://www.phpclasses.org/blog/post/521-mysqli-vs-pdo-vs-mysql.html

5 Best WordPress Security Plugins to Keep Your Site Secure

WordPress (WP) is the most popular and widely used blogging platform. It supports every kind of website, from a simple blog to a full-featured business website. Twenty-six percent of all websites globally use WordPress. As a result of this popularity, hackers and spammers have taken keen interest in breaking the security of WP-operated sites.

In this post, we’re going to cover some of the best WordPress security plugins that can help reduce the risk of your website being hacked. These security plugins offer several features to make your WordPress blog secure from known vulnerabilities. The list contains plugins for access control, login security, spam protection, content theft protection, backup tools, file integrity monitoring, email protection, firewall and much more.

Here is a list of some of the top security plugins that can be used to keep your WordPress site secured:

WORDFENCE

With one million downloads and a rating of 4.9/5, WordFence is one of the most popular WordPress security plugins. It covers login security, IP blocking, security scanning, and WordPress firewall and monitoring.

WordFence starts by checking if the site is already infected. It does a deep server scan of the site’s source code and compares it to the Official WordPress repository for core, themes and plugins.

The plugin is great for beginners and pro users alike.

If you want to secure your website with some more features, then you can also try the premium version of this plugin, which includes country blocking, two-step authentication, scheduled scanning and more.

ITHEMES SECURITY

iThemes Security is a WordPress security plugin that claims to provide 30+ ways to secure and protect your WordPress website from attacks. It strengthens user credentials by fixing common vulnerabilities and automated attacks. The plugin is available in both free and premium versions.

iThemes covers all of the following:

  • Two-factor authentication

  • Brute force protection
  • Monitoring core files for any changes
  • Ticketed support (for pro users)
  • Logging user actions
  • Locking out users for multiple incorrect credential attempts
  • Forcing the use of secure passwords for specific user roles and file permissions

SUCURI SECURITY

Sucuri offers a free plugin that is available in the WordPress repository. This plugin offers various security features like malware scanning, security activity auditing, blacklist monitoring, effective security hardening, file integrity monitoring, and a website firewall. It is a security suite meant to complement your existing security posture.

The Sucuri plugin tracks all activity on your site. This includes when users log in or when changes are made to your site. This way, if there is a breach in security, you’ll be able to review the activity logs and find out what happened.

ALL IN ONE WPSECURITY & FIREWALL

All In One WP Security & Firewall is also among the most popular WordPress security plugins. It has a user-friendly interface for those who are not familiar with advanced security settings. This plugin protects your website by checking vulnerabilities and implementing the latest techniques and security measures.

One useful feature of All in One WP Security & Firewall is a meter on your dashboard that gives your site a score of how secure it is. By adding additional security options, you can increase your score.

It also has a security scanner that keeps track of files and notifies you about each change in your WordPress system. It can also detect malicious code in your WordPress website.

BULLETPROOF SECURITY

Another popular plugin that helps to secure your WordPress website is BulletProof Security. This plugin provides single click security solution. It secures your website against RFI, XSS, CRLF, SQL injection, and code injection hackings.

The full list of features included with BulletProof security is too long to list, but here are a few:

  • An easy single-click setup
  • A record of the number of login attempts
  • File monitoring and quarantining of uploaded files
  • Email alerts for a variety of user actions
  • Alerts when suspected malicious activity affects your site

It also has a pro version that offers some advanced features to improve the security of your website.
With an increasing number of hacking attacks, it is necessary to have security in your WordPress website. The security plugins mentioned above will help you with that. For users who don’t code a lot, plugins are the best ways to secure your blog. Most of them are free, safe and easily usable.

Source: https://www.tripwire.com/state-of-security/featured/5-best-wordpress-security-plugins-to-keep-your-site-secure/

The Best SEO is Human-Based SEO

This last weekend I the pleasure of speaking at WordCamp Miami. While I was fortunate enough to participate on two business panels, my main presentation was a solo one focused on search engine optimization.

If you’d like to review my presentation, you can download the presentation on as well as view the livestream video below.

Everyone From Young to Old Wants to Learn SEO

The topic of SEO is always a hot one. People may say SEO is dead, but this is farthest from the truth. SEO is alive and there is a lot of interest in this skill-set.

At each conference I seem to have a room full of attentive attendees with lots of post presentation interaction that is followed by even more mini conversations in the hallway and at social events.

Everyone wants to obtain a better understanding of search engine optimization. And who can blame them? SEO can be very intimidating and confusing.

What I love about these conferences is the audience is diverse and their inquiries are just as varied. This weekend my questions came from a young attendee of ten years old all the way up attendees who were eligible for senior discounts.

Questions ranged from “what is SEO” to complex architecture inquiries and requests for long-term strategy creation. They came from brand new bloggers to well established website owners.

The diversity in audience and questions reminded me that SEO is a strange world of constantly changing elements and this ongoing movement can be so overwhelming.

But guess what? SEO hasn’t changed that much at all. The core fundamental is still the same. The people who use SEO may have broadened, but SEO is just as it was fifteen years ago when I stated.

Focus is the Most Important Lesson I Can Offer About SEO

Throughout my presentation and my one-on-one talks I held one common theme that I desperately wanted to drive home to everyone I spoke with over the three-day event.

It was a basic concept, but a critical one: The best SEO is human-based SEO.

High performing SEO isn’t about automation, shortcuts, binary code, or even outsourcing SEO services to a third-party consultant. While we did that years ago and it may have been successful in the past, it won’t work today.

The best SEO is about understanding your website visitor, connecting with them on a personal level, and helping them solve problems.

Search – and in particular search engines – have matured. And yet, the fundamental objective of serving the visitor and providing value has not changed.

We might be flooded with mobile inquiries, demands for performance, and long voice based search phrases, yet the ultimate goal of serving the visitor has not changed and it won’t change.

As long as there are living, breathing humans with questions, there will be a need for high quality, human-based SEO.

The best SEO has and always will be a strong focus on the user experience and proving tangible value.

Real SEO isn’t about data, website code, or plugins. We may use these elements in our pursuit of serving the visitor, but the common thread of SEO should always be a strong focus on providing a positive user experience that solves a user’s question or inquiry.

All of the shortcuts, Fiverr gigs, and unsolicited email offers of SEO services won’t help in providing real value through your website or blog. They won’t resonate with the visitor on a personal level. And when I say visitor I am referring to real, human people who have everyday problems and who need everyday solutions to those problems.

SEO is Complex and Yet So Very Simple

SEO is evolving and everything about it is getting more and more complex. Articles are getting longer, search phrases are becoming much longer, and search engines are much more sophisticated in their processing of inquiries and sorting of content. And yet through all of that, nothing has changed.

Google is still simply looking for webmasters and bloggers to do the right thing. Help people. Provide value. Freely offer solutions to everyday issues.

My youngest attendee asked if he could game the system and use automation or code to push himself to the top of Google. I replied as I would to my own son. I was quick and forceful and gave him a definitive no as my answer.

When he questioned this and pushed for black hat SEO, I reminded him that he has lost focus on the visitor and the gaming of SEO would serve no long-term or tangible value.

And that is because SEO is about people and helping these people. Black hat SEO and shortcuts don’t help people. They create clutter and Google is now very good at removing such clutter.

If you are just embarking on your SEO journey, take the time to learn about SEO in depth but look past algorithms and shortcuts. Focus on the why of SEO and how this skill-set will help you reach your future website visitors.

Always stay focused on your visitor, their struggles, and how you can help them. Don’t lose sight of this core principle.

Learn About Real SEO and Empower Yourself

The take away I wanted to give users this weekend was that anyone can rank well in search. I am a very passionate about this statement because I believe it with my whole heart.

If you do the right thing and do so for the right reasons, you’ll see SEO isn’t a mystery at all. It’s really just the process of helping Google find solutions to human problems.

Here are some excellent ways you can learn more about SEO:

  • Goggle’s Search Engine Optimization Starter Guide
  • The Beginner’s Guide to Search Engine Optimization eBook
  • My DIY SEO Courses
  • SEO Bootcamp’s Onsite Training Workshop
  • Virtual SEO Summit
  • YouTube Videos
  • Monthly SEO Webinars

Now that you know the core objective of SEO, you need to decide if you’re willing to put in the due diligence into learning SEO. I hope the answer is yes.

Source: https://www.jdslsolutions.com/the-best-seo-is-human-based-seo/

Design Websites with a Goal in Mind

Designing an eye-catching website that looks good is great. However, it must do more than look good.

Compare a business website to the first thirty seconds meeting someone in person. That’s when their initial impression of you is formed. Your website may get even less time unless, as an interface, it communicates function with these elements:

  • Ease of use so simple they’re not distracted by the mechanics.
  • Draw positive feeling and emotion about business from the visitor.
  • Present an attractive and professional appearance;
  • Offer an impressively easy format at first glance;
  • Clearly, label important information;
  • Make a positive first impression of your company business practices in text and graphics.
  • These elements of strategic design will guide you in identifying your goals and use them as guides to meet the business objectives that drive your website design.

    Implementing Strategic Design Applications

    Consider these steps to think through a strategically designed website project.

    Define your Clients Goals

    You must clearly define the client’s goals and understand exactly what you are expected to achieve designing or redesigning their website.Just asking the client what their website goals are may give you enough information. However, it is common for the client to be unable to put into words the company’s objectives.

    Spend the time needed discussing the options. Get to know their style and website goals. Then come to an agreement on a clear direction and purpose.

    Web designers often struggle to put function above art. You want a visually attractive and well-balanced layout but web design is functional art.

    The function of selling products, imparting information, giving access to services, entertainment and more must be fulfilled on your website design or redesign. The goals should be clear to everyone, especially when redesigning.

    Know Your Audience

    How your website looks and functions will depend on for whom and what purpose it is being designed. The demographics of the profession, technology, gender, age, common interest and more will influence your choice of aesthetics and usability.

    An early learning website for preschoolers will be very different from a forum on aging. Usability for technologically savvy game playing websites will differ from an e-commerce site.

    Audience influences other details such as font size and style, use of graphics and even color choices. Be conscientious about identifying with your audience.

    Brand Image Drives Design

    Designers love new trends and ideas and it’s easy to get carried away.

    Adding flash and sizzle is great for some websites but not all. Your design projects an image; be sure the image represents the brand.

    You have taken the right steps and set achievable goals, established demographics of your audience and have a clear vision of the brand image. Now it’s time to sync design strategy with design decisions.

    Where to start? Focus on the main objective of creating or recreating the website. This example of the first 3 steps uses “increased registration numbers” as the goal

  • The “About Us” text on the “Home” page must be clear, concise, and free of trade jargon. Describe the function so there is no confusion.
  • You want to draw the eye of the website visitor to the registration button or link. If you use brand appropriate color and contrast the button or link will be instantly visible. Visitors to websites are not likely to take time looking for the place to sign up. Use your design skills so their attention zero’s in with no confusion.
  • The registration process should be as simple as name and contact information. Don’t make it a questionnaire, survey, or financial inquiry. Keep it short and simple because people may be put off by the sight of a long drawn out form. That information can be collected on an as needed and when needed basis.

These steps will direct your design toward the set goal of increasing sign-ups. This strategy of directing the focus of design elements toward the goal is the same regardless of the goal You want the aesthetics and focus that best suits the brand and audience.

If the brand is entertainment then focus on creating an emotional experience using shape, imagery, and sound.

If the website is meant to inform then make sure it’s easy to use and read. You want to create an interface that doesn’t distract the user from the content.
Everyone may be a potential customer but there is one right audience that stands apart. That audience is the most likely to be influenced by the products or services your website promotes. Focus on attracting that right audience.

Everything about the website including periodic advertising or promotions, product design, overall look, and feel are for one target group of people.

A website for motorcycles may target adults over the age of 20-45 earning $50,000 and up per year. That’s a huge group and yes others outside that demographic buy motorcycles.

However, that group is your target. Alternatively, a quilting website has a smaller target audience of all women with a broad age range.

Barriers to Sign-up are Counter-Productive

If you think customers are impressed with the need to provide a complete financial and personal profile to be registered users of your website then your own poverty is within sight.

The paying customers like to give as little information as possible until they’ve had time to research your products and services. The more barriers you erect to sign up the quicker they will click out and look elsewhere.

There is evidence that shows the fewer fields on a sign-up form the more likely people are to sign up.

Why wouldn’t you make it easy?

If you are offering a free trial, customers are more likely to accept that promotion if they don’t have to give you their credit card. If the service is web-based or the product is downloadable, then you don’t even need their address yet.You need the information you need to provide a product or service but don’t ask for more than is necessary and even that should be kept brief. Try it for yourself and adjust your own sign-up forms.

Simplify them to the essentials and if some information can wait until a later time, don’t include it in the initial sign up. Monitor to see if you notice increased traffic on your sign-up page.

Marketing Drives Engagement and Investment

Before sign-up comes marketing. Marketing tells the potential customer about the nuts and bolts of the product or service. It answers important questions; What is it? What does it do? Why do I want it? Why yours?

You make this information clearly available. Don’t make customers go digging through your website to find the details.

Put them right out there in easy to find and understand text and graphics. Include the real cost along with how and when you will be billed.

People are more likely to sign-up if they are clear about what you are selling and the term under which you operate.

So often a Free Trial makes it is easier to give in to a feature request than it is to buy. You would begin to wonder if the SaaS provider really wants your money.

There was a time when the sales process was separate from the application. No longer. The two are the same and the app must sell itself as much as your sales associates and marketing site.

Conversion must be engineered into each app with the ability to ask for and complete the sale anytime during the free trial.

The bonus is internal and external expansion loops that reach social networks, colleagues, distributors, trading partners; in short, your whole sphere of influence where the app can sell itself.

Ending thoughts

Strategic design is common sense. You design a product or service to meet a specific need and the product fulfills its purpose.

It is just that simple if you avoid the traps of losing sight of your goals, choosing new design trends that are inappropriate to the purpose, shaping a section of the website to your liking instead of to the job it’s supposed to do.

You can avoid these design traps by applying “Why” to each element of the design.

  • Why did you choose tabs here, buttons there?
  • What was my reasoning when I chose that font?
  • Why did I decide on icons on this page?
  • These colors work perfectly because?
  • Who will this website represent?
  • What is the target audience?
  • Is the context appropriate to the brand?
  • Does this website fulfill the intended purpose at a high level?

Review your reasoning each step of the way and your website will fulfill its purpose and still be beautiful.

Source: https://designmodo.com/design-websites-goal/