webslesson.blogspot.in









Search Preview

Webslesson | PHP, MySql, Jquery, AngularJS, Ajax, Codeigniter Tutorial

webslesson.blogspot.in
Webslesson is a web programming tutorial blog. In tutorials we mainly focused on programming queries related to php, mysql, javascript, css, css3, jquery, ajax, angularJS, codeigniter etc. Webslesson also offered web development video tutorials also.
.in > webslesson.blogspot.in

SEO audit: Content analysis

Language Error! No language localisation is found.
Title Webslesson | PHP, MySql, Jquery, AngularJS, Ajax, Codeigniter Tutorial
Text / HTML ratio 42 %
Frame Excellent! The website does not use iFrame solutions.
Flash Excellent! The website does not have any flash contents.
Keywords cloud = website data PHP > email make file web form user
Ajax send view method function page login
Keywords consistency
Keyword Content Title Description Headings
= 87
website 64
data 55
PHP 43
> 40
email 38
Headings
H1 H2 H3 H4 H5 H6
8 9 43 1 0 0
Images We found 18 images on this web page.

SEO Keywords (Single)

Keyword Occurrence Density
= 87 4.35 %
website 64 3.20 %
data 55 2.75 %
PHP 43 2.15 %
> 40 2.00 %
email 38 1.90 %
make 37 1.85 %
file 36 1.80 %
33 1.65 %
web 33 1.65 %
form 32 1.60 %
user 31 1.55 %
30 1.50 %
Ajax 29 1.45 %
send 29 1.45 %
view 24 1.20 %
method 24 1.20 %
function 23 1.15 %
page 22 1.10 %
login 22 1.10 %

SEO Keywords (Two Word)

Keyword Occurrence Density
we have 43 2.15 %
your website 29 1.45 %
we can 23 1.15 %
NOT NULL 21 1.05 %
you can 20 1.00 %
has been 18 0.90 %
have to 16 0.80 %
using PHP 15 0.75 %

15 0.75 %
by using 12 0.60 %
it is 12 0.60 %
for table 12 0.60 %
view file 12 0.60 %
an email 12 0.60 %
have use 12 0.60 %
you have 12 0.60 %
will be 11 0.55 %
query = 11 0.55 %
send an 11 0.55 %
that you 11 0.55 %

SEO Keywords (Three Word)

Keyword Occurrence Density Possible Spam
we have to 14 0.70 % No
we have use 10 0.50 % No
send an email 10 0.50 % No
this we have 10 0.50 % No
on web page 9 0.45 % No
statement = connect>preparequery 9 0.45 % No
row sub_array = 8 0.40 % No
Share This Facebook 7 0.35 % No
query = SELECT 7 0.35 % No
= connect>preparequery statement>execute 7 0.35 % No
we can see 7 0.35 % No
int11 NOT NULL 7 0.35 % No
logout from system 7 0.35 % No
sub_array = row 7 0.35 % No
This Facebook Twitter 7 0.35 % No
Stumble Digg Read 7 0.35 % No
we have make 7 0.35 % No
Facebook Twitter Google 7 0.35 % No
Digg Read More 7 0.35 % No
Google Stumble Digg 7 0.35 % No

SEO Keywords (Four Word)

Keyword Occurrence Density Possible Spam
Facebook Twitter Google Stumble 7 0.35 % No
Stumble Digg Read More 7 0.35 % No
statement = connect>preparequery statement>execute 7 0.35 % No
Twitter Google Stumble Digg 7 0.35 % No
Google Stumble Digg Read 7 0.35 % No
This Facebook Twitter Google 7 0.35 % No
Share This Facebook Twitter 7 0.35 % No
sub_array = row sub_array 6 0.30 % No
query = SELECT FROM 6 0.30 % No
= row sub_array = 6 0.30 % No
for send an email 6 0.30 % No
variable value is set 5 0.25 % No
5 0.25 % No
rel=stylesheet href=httpsmaxcdnbootstrapcdncombootstrap336cssbootstrapmincss > 5 0.25 % No


5 0.25 % No
statement>execute result = statement>fetchAll 5 0.25 % No
this we have to 5 0.25 % No
5 0.25 % No
row sub_array = row 5 0.25 % No
required >
4 0.20 % No

Internal links in - webslesson.blogspot.in

Webslesson.blogspot.in Spined HTML


Webslesson | PHP, MySql, Jquery, AngularJS, Ajax, Codeigniter Tutorial Webslesson Webslesson PHP, MySql, Jquery, AngularJS, Ajax, Codeigniter, Laravel Tutorial Menu Home Tutorial PHP MySql JQuery Ajax Codeigniter AngularJS Tools Online Slug Generator Online SourceLawmakingFormatter HTML Encoder / Decoder ConvertSpecimen& Count CharacterWell-nighUs Write for Us Privacy Policy Terms and Condition Contact Me Friday, 28 September 2018 Pop-up Login Form If Session Expired using PHP Ajax  Webslesson     21:13     check session expired using ajax php, snift session timeout using ajax, php session expired, php session timeout, popup login form on php session timeout, popup login modal, session time out, timeout     No comments    This is the most worldwide full-length of any website, if user has unwittingly logout from system or his session has been expired and in browser still unshut website inner page then login modal has been popup for prevent to wangle inner pages of website without login into system. This type of full-length we have make in this post by using PHP with Ajax. So, If Session has been expired or Session timeout then automatically login modal form will be pop up on web page to prevent to wangle website inner pages, and without login into system user cannot wangle that unshut page. This type of functionality is for unwittingly logout from system in one tab or browser and in flipside website private pages has been open. So, in that pages login modal form will be popup on web page to tell user you are logout from system and if you want to wangle this you want to then login into system. In most of current website use this type of full-length for unwittingly logout from system or session timeout or expired. If you have make website using PHP then you can hands implement this type of functionality into your system, so it will add one new full-length in your website. You can hands build this type of full-length in PHP using Ajax and jQuery. By using Ajax jQuery with PHP we can hands popup login modal form on web page when PHP session timeout. In this post we have step by step describe how weightier way we can handle Session expired with Ajax and popup login modal form for requite notification to user your logout from system and to wangle system you have to login then into system on web page. First we have to make simple login form for get wangle into system, For make login form we have use Ajax with PHP for validate user details. When user have filled login details then Ajax request will be send to check_login.php file to validate user information is proper or not. If details is not proper then it will exhibit error on login page otherwise page will be redirect to index.php.Unelevatedyou can find source lawmaking for login.php and check_login.php. Database -- -- Database: `testing` -- -- -------------------------------------------------------- -- -- Table structure for table `tbl_login` -- CREATE TABLE `tbl_login` ( `id` int(11) NOT NULL, `first_name` varchar(100) NOT NULL, `last_name` varchar(100) NOT NULL, `gender` varchar(30) NOT NULL, `email` varchar(200) NOT NULL, `password` varchar(200) NOT NULL, `address` text NOT NULL, `mobile_no` varchar(15) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tbl_login` -- INSERT INTO `tbl_login` (`id`, `first_name`, `last_name`, `gender`, `email`, `password`, `address`, `mobile_no`) VALUES (1, 'John', 'Smith', 'male', 'johnsmith@gmail.com', '$2y$10$vgo3NI5w5cLB74E4B2sdVuKwdSpJL/EAeKSUdevkc/j3zl0sJAf5i', 'test address', '9632587410'); -- -- Indexes for dumped tables -- -- -- Indexes for table `tbl_login` -- ALTER TABLE `tbl_login` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `tbl_login` -- ALTER TABLE `tbl_login` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; login.php <?php //login.php session_start(); if(isset($_SESSION["name"])) { header('location:index.php'); } ?> <!DOCTYPE html> <html> <head> <title>Login Modal PopupWithoutSession Timeout in PHP using Ajax</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> <style> soul { background-color:#f1f1f1; } #box { width:500px; background-color:#ffffff; margin:0 auto; padding:16px; text-align:center; margin-top:50px; border:1px solid #ccc; border-radius:5px; } </style> </head> <body> <div class="container"> <br /> <br /> <h1 align="center">Login Modal PopupWithoutSession Timeout in PHP using Ajax</h1> <div id="box"> <h2>Login</h2> <br /> <span id="error_message"></span> <form method="post" id="login_form"> <input type="text" name="email" placeholder="Enter Email" class="form-control" required /><br /> <input type="password" name="password" placeholder="Enter Password" class="form-control" required /><br /> <input type="submit" name="submit" id="submit" class="btn btn-info" value="Login" /> </form> <br /><br /> </div> </div> </body> </html> <script> $(document).ready(function(){ $('#login_form').on('submit', function(event){ event.preventDefault(); $.ajax({ url:"check_login.php", method:"POST", data:$(this).serialize(), success:function(data){ if(data != '') { $('#error_message').html(data); } else { window.location = 'index.php'; } } }) }); }); </script> check_login.php <?php //check_login.php if(isset($_POST["email"])) { $connect = new PDO("mysql:host=localhost;dbname=testing", "root", ""); session_start(); $query = "SELECT * FROM tbl_login WHERE email = '".$_POST['email']."'"; $statement = $connect->prepare($query); $statement->execute(); $total_row = $statement->rowCount(); $output = ''; if($total_row > 0) { $result = $statement->fetchAll(); foreach($result as $row) { if(password_verify($_POST["password"], $row["password"])) { $_SESSION["name"] = $row["first_name"]; } else { $output = '<label class="text-danger">Wrong Password</label>'; } } } else { $output = '<label class="text-danger">Wrong Email Address</label>'; } reverberate $output; } ?> View Demo In check_login.php page we can see for validate password details we have use password_verify() function, considering in database password has been stored under hash format, so for validate hash password we have use password_verify() function and user first name details has been store into $_SESSION variable for trammels user has login into system and this variable value we can wangle from any page of system. Once user has successfully login into system then he will be redirect to alphabetize page. On this page can be view only to login user for this we have trammels $_SESSION variable value is set or not, if this variable value is set then he can view this page otherwise it will be redirect to login page again. But if $_SESSION variable value is set then he can wangle this page, now here we will make login modal lawmaking and make one jQuery function for trammels user $_SESSION variable value is set or not. index.php <!DOCTYPE html> <html> <head> <title>Login Modal PopupWithoutSession Timeout in PHP using Ajax</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> <style> #box { width:600px; color:white; margin:0 auto; padding:10px; text-align:center; } </style> </head> <body> <br /> <?php session_start(); if(isset($_SESSION["name"])) { reverberate "<h1 align='center'>Login Modal PopupWithoutSession Timeout in PHP using Ajax</h1>"; reverberate "<h1 align='center'>".$_SESSION["name"]."</h1>"; reverberate "<p align='center'><a href='logout.php'>Logout</a></p>"; } else { header('location:login.php'); } ?> </body> </html> <div class="modal fade" id="loginModal" role="dialog"> <div class="modal-dialog modal-sm"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title">Session Expired Login Again</h4> </div> <div class="modal-body"> <form method="post" id="login_form"> <input type="text" name="email" placeholder="Enter Email" class="form-control" required /><br /> <input type="password" name="password" placeholder="Enter Password" class="form-control" required /><br /> <input type="submit" name="submit" id="submit" class="btn btn-info" value="Login" /> </form> </div> </div> </div> </div> <script> $(document).ready(function(){ var is_session_expired = 'no'; function check_session() { $.ajax({ url:"check_session.php", method:"POST", success:function(data) { if(data == '1') { $('#loginModal').modal({ backdrop: 'static', keyboard: false, }); is_session_expired = 'yes'; } } }) } var count_interval = setInterval(function(){ check_session(); if(is_session_expired == 'yes') { clearInterval(count_interval); } }, 10000); $('#login_form').on('submit', function(event){ event.preventDefault(); $.ajax({ url:"check_login.php", method:"POST", data:$(this).serialize(), success:function(data){ if(data != '') { $('#error_message').html(data); } else { location.reload(); } } }); }); }); </script> Here in index.php file we have make login modal form with id #loginModal. This modal will be popup if PHP Session expired and for trammels Session timeout or not. For this here we have make check_session() function which send Ajax on every 10 seconds to check_session.php for trammels Session variable value expired or not. For undeniability check_session() on every seconds we have use setInterval() method. By using this method it will undeniability jQuery function every 10 seconds. Once modal has been popup then without stop to tabbed check_session() we have use clearInterval() method. check_session.php <?php //check_session.php session_start(); if(isset($_SESSION["name"])) { reverberate '0'; } else { reverberate '1'; } ?> This is PHP script to trammels $_SESSION variable value is set or not for trammels session timeout using isset() function. Lastly for logout from system unelevated you can find logout.php code. In which session variable value has been destroy using session_destroy() function.Withoutlogout from system page will be redirect to login.php. <?php //logout.php session_start(); session_destroy(); header("location:login.php"); ?> This is well-constructed step by step process for how to create full-length like Login form popup on web page if user Session timeout or expired using PHP script with Ajax jQuery. Share This:    Facebook Twitter Google+ Stumble Digg ReadIncreasinglyWednesday, 26 September 2018 Insert Tree View Node using PHP Ajax  Webslesson     00:02     add node in tree view, create node in treeview, dynamic treeview, dynamic treeview php mysql, insert node in treeview using ajax, jquery dynamic treeview example, php, tree structure in php with mysql     No comments    One of our previous post on Make Treeview from Mysql data by using Bootstrap Treeview plugin with PHP and Ajax and that post has received huge response from readers and request us to make this type of Dynamic Treeview in which we can add or create new node dynamically and make dynamic treeview hierarchical stucture using same Bootstrap plugin using PHP and Ajax. So, in this post we have add this topic in which you can learn how can we add or insert new node dynamically in Treeview using PHP Mysql Ajax and Boostrap Treeview plugin. By using this tutorial user can create multi level treeview node dynamically. Bootstrap Tree view is a easy solution for exhibit of hierarchical tree structures in the form of Tree View node and by using this plugin we can create multi level tree view nodes static or dynamically. For use this plugin we have to required jQuery library and Bootstrap library with this plugin library. This plugin has been initialize by using treeview() method and in this method data option is required, without data it will not exhibit Tree view on web page. So, for initialize this plugin data is required in json format. Data must be in unelevated format. [ { "text":"Chemicals", "nodes":[ { "text":"Inorganic chemicals", "nodes":[ ] }, { "text":"Organic Chemicals", "nodes":[ ] } ] }, { "text":"Electronics", "nodes":[ { "text":"Laptop", "nodes":[ { "text":"Dell", "nodes":[ { "text":"i3 Processor", "nodes":[ ] }, { "text":"i5 Processors", "nodes":[ ] }, { "text":"i7 Processors", "nodes":[ ] } ] } ] } ] } ] If data in whilom format then it will exhibit whilom data in treeview form on web page. In this post we have take an example of category and exhibit that category data in Treeview format. For create new node first we have make simple form for enter data into mysql table. Once data has been inserted into Mysql table then it will be widow into parent category select box also.Withoutinsert of new data we want to add new not in Treeview. For this we have make one fill_treeview() function, this function has been fetch data from mysql table in JSON format and convert into treeview stucture using treeview() function.Unelevatedyou can find well-constructed source lawmaking of this tutorial which helps you to know how to add or create new node in Tree view with Bootstrap Tree view plugin using PHP Mysql and Ajax. View Demo ReadMoreoverMake Treeview using Bootstrap Treeview Ajax JQuery with PHP Sorting Table Row using Jquery Drag Drop with Ajax PHP Make Dynamic XML sitemap in PHP Script SourceLawmaking-- -- Database: `testing` -- -- -------------------------------------------------------- -- -- Table structure for table `tbl_category` -- CREATE TABLE `tbl_category` ( `category_id` int(11) NOT NULL, `category_name` varchar(200) NOT NULL, `parent_category_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tbl_category` -- INSERT INTO `tbl_category` (`category_id`, `category_name`, `parent_category_id`) VALUES (2, 'Chemicals', 0), (3, 'Inorganic chemicals', 2), (4, 'Organic Chemicals', 2), (5, 'Electronics', 0), (6, 'Laptop', 5), (7, 'Dell', 6), (8, 'i3 Processor', 7), (9, 'i5 Processors', 7), (10, 'i7 Processors', 7); -- -- Indexes for dumped tables -- -- -- Indexes for table `tbl_category` -- ALTER TABLE `tbl_category` ADD PRIMARY KEY (`category_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `tbl_category` -- ALTER TABLE `tbl_category` MODIFY `category_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11; index.php <!DOCTYPE html> <html> <head> <title>How to Add New Node in Dynamic Treeview using PHP Mysql Ajax</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /> <script type="text/javascript" charset="utf8" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-treeview/1.2.0/bootstrap-treeview.min.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-treeview/1.2.0/bootstrap-treeview.min.css" /> <style> </style> </head> <body> <br /><br /> <div class="container" style="width:900px;"> <h2 align="center">How to Add New Node in Dynamic Treeview using PHP Mysql Ajax</h2> <br /><br /> <div class="row"> <div class="col-md-6"> <h3 align="center"><u>Add New Category</u></h3> <br /> <form method="post" id="treeview_form"> <div class="form-group"> <label>Select Parent Category</label> <select name="parent_category" id="parent_category" class="form-control"> </select> </div> <div class="form-group"> <label>Enter Category Name</label> <input type="text" name="category_name" id="category_name" class="form-control"> </div> <div class="form-group"> <input type="submit" name="action" id="action" value="Add" class="btn btn-info" /> </div> </form> </div> <div class="col-md-6"> <h3 align="center"><u>Category Tree</u></h3> <br /> <div id="treeview"></div> </div> </div> </div> </body> </html> <script> $(document).ready(function(){ fill_parent_category(); fill_treeview(); function fill_treeview() { $.ajax({ url:"fetch.php", dataType:"json", success:function(data){ $('#treeview').treeview({ data:data }); } }) } function fill_parent_category() { $.ajax({ url:'fill_parent_category.php', success:function(data){ $('#parent_category').html(data); } }); } $('#treeview_form').on('submit', function(event){ event.preventDefault(); $.ajax({ url:"add.php", method:"POST", data:$(this).serialize(), success:function(data){ fill_treeview(); fill_parent_category(); $('#treeview_form')[0].reset(); alert(data); } }) }); }); </script> database_connection.php <?php //database_connection.php $connect = new PDO("mysql:host=localhost; dbname=testing", "root", ""); ?> fill_parent_category.php <?php //fill_parent_category.php include('database_connection.php'); $query = "SELECT * FROM tbl_category ORDER BY category_name ASC"; $statement = $connect->prepare($query); $statement->execute(); $result = $statement->fetchAll(); $output = '<option value="0">Parent Category</option>'; foreach($result as $row) { $output .= '<option value="'.$row["category_id"].'">'.$row["category_name"].'</option>'; } reverberate $output; ?> add.php <?php //add.php include('database_connection.php'); $data = array( ':category_name' => $_POST['category_name'], ':parent_category_id' => $_POST['parent_category'] ); $query = " INSERT INTO tbl_category (category_name, parent_category_id) VALUES (:category_name, :parent_category_id) "; $statement = $connect->prepare($query); if($statement->execute($data)) { reverberate 'Category Added'; } ?> fetch.php <?php //fetch.php include('database_connection.php'); $parent_category_id = 0; $query = "SELECT * FROM tbl_category"; $statement = $connect->prepare($query); $statement->execute(); $result = $statement->fetchAll(); foreach($result as $row) { $data = get_node_data($parent_category_id, $connect); } reverberate json_encode(array_values($data)); function get_node_data($parent_category_id, $connect) { $query = "SELECT * FROM tbl_category WHERE parent_category_id = '".$parent_category_id."'"; $statement = $connect->prepare($query); $statement->execute(); $result = $statement->fetchAll(); $output = array(); foreach($result as $row) { $sub_array = array(); $sub_array['text'] = $row['category_name']; $sub_array['nodes'] = array_values(get_node_data($row['category_id'], $connect)); $output[] = $sub_array; } return $output; } ?> Share This:    Facebook Twitter Google+ Stumble Digg ReadIncreasinglyTuesday, 25 September 2018 Why Is It Important To Pursue WebMinutiaeSmallMerchantry?  Webslesson     23:58     web development     No comments    Small merchantry owners usually have a small budget, as they using small merchantry written software their profit will go with time. With the onset of technology and networks, our life is majority based on computer networks. Lots of startup merchantry are struggling to establish their merchantry in the market. The reason why many merchantry tent failure considering they depreciate the power of web presence. They need to create an constructive web presence now, at the initial stage of business, in order to be whiz to get a decent profit in the future. So if you have just started your small business, the sooner you create a website, the sooner you’ll get a profit. 5 Reasons Your SmallMerchantryNeeds A Website Show up in Google search results Wider regulars reaches due to website serviceability Showcase your product and services Collect consumer information Low upkeep web minutiae Show up in Google search results There are 80 % of customers who perform online research surpassing making a purchase. They search for one or increasingly keywords in Google like “best sports shoes”. If you don’t have a website then your chances in google search results will be zero. But if you have your own website then you can optimize it for search engines, thereby increasing your chances of seeming at the top of Google’s results and getting increasingly visibility with potential customers. You can customize your site with long-tail keywords, meta descriptions, and titles to modernize your search engine optimization. Wider regulars reaches due to website accessibility.Planeif your physical shop is sealed but your online merchantry is running for 24/7, your sales will protract to be on the market and this will vamp increasingly customers to your business. One increasingly reason to build a web presence for your merchantry is an vitiation of distances. A website allows you to expand your target regulars and make deals with customers who are yonder from you. Actually, the whole globe is within your reach. Showcase your product and services In today’s generation increasingly customers preferring to find and buy products online, having a website that showcases your products and services is important It actualizes two conveniences : Customers will find your products online and purchase them instantly Customers will find their products online and then visit your store to make a purchase. For example, merrchant, weightier small merchantry written software, is an written software run by Raletta Grad. Without a brick-and-mortar storefront, Raletta relies on their website to vamp visitors and convert them into paying customers. Collect consumer information A merchantry website is a platform for learning well-nigh your audience. It opens an opportunity to collect information well-nigh your customers. There are so many pieces of information you can collect it with your customers like name, email address, mobile number, street address, and many increasingly of your site visitors to learn who well-nigh who visits your website. Low upkeep web minutiae The upkeep for small merchantry people is unchangingly small. So their merchantry progresses gradually. If they want to bring profit into their merchantry then they will have to connect to the web development, in order to get a decent profit in the future. Low upkeep web minutiae allows you to wangle a simple but efficient website, worldly-wise to convert visitors into clients. It's quite affordable for startups and small merchantry to create a minimum viable product to quickly towards on the market and then invest in its improvements later on. Share This:    Facebook Twitter Google+ Stumble Digg ReadIncreasinglySaturday, 22 September 2018 Simple Way to Sending an Email in Laravel  Webslesson     03:07     email in laravel, email send laravel, how to send email in laravel, laravel, laravel email, laravel mailer, mail configuration in laravel, send email, send email laravel, send mail in laravel     No comments    If you are beginner level of Laravel framework programmer, then from this post you can learn something new like How can we send an in Laravel.Consideringany web using sending of email from using is required full-length or functionality. So, If you have make any web using in Laravel then you should required to put send an email from your web application. For this here you can find step by step guid how to make simple contact form in Laravel framework and when user submit contact form details then email should be received to owner of website. Laravel is an robust PHP framework and it has most of all functionality which we would required to make any robust web application. For send an email it has popular SwiftMailer library and by using this library we can get an wholesomeness of variegated email suburbanite for send an email. Here for send an email we will make one mailable which will handle all email setting. Once this matriculation has been ready then we should pinpoint email configuration like host name, port, driver, username and password details under .env file.Unelevatedyou can find step by step process for weightier way to sending an email from your Laravel application. Step 1 - Install LaravelUsingFirst we have to download Laravel application, for we have to go to writ prompt and in this first we should run composer writ which handle all dependency of Laravel and without write pursuit command. This writ will download Laravel and install into specified folder. composer create-project laravel/laravel student_crud Step 2 - Create Controller Once Laravel framework successfully installed then without we have to first make a controller for handle http request. For this we have to writ prompt and write pursuit command. This writ will make SendEmailController.php file in app/Http/Controllers. php wright make:controller SendEmailControllerWithoutcreate controller in this we have make index() method for load view file in which we will make contact form. This method will load resources/views/send_email.blade.php file in browser. app/Http/Controllers/SendEmailController.php <?php namespace App\Http\Controllers; use Illuminate\Http\Request; matriculation SendEmailController extends Controller { function index() { return view('send_email'); } } Step 3 - Create View Contact Form Now we would make view file for exhibit contact form on web page.Unelevatedyou can find source lawmaking of contact form view file. resouces/views/send_email.blade.php <!DOCTYPE html> <html> <head> <title>How Send an Email in Laravel</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <style type="text/css"> .box{ width:600px; margin:0 auto; border:1px solid #ccc; } .has-error { border-color:#cc0000; background-color:#ffff99; } </style> </head> <body> <br /> <br /> <br /> <div class="container box"> <h3 align="center">How Send an Email in Laravel</h3><br /> @if (count($errors) > 0) <div class="alert alert-danger"> <button type="button" class="close" data-dismiss="alert">×</button> <ul> @foreach ($errors->all() as $error) <li>{{ $error }}</li> @endforeach </ul> </div> @endif @if ($message = Session::get('success')) <div class="alert alert-success alert-block"> <button type="button" class="close" data-dismiss="alert">×</button> <strong>{{ $message }}</strong> </div> @endif <form method="post" action="{{url('sendemail/send')}}"> {{ csrf_field() }} <div class="form-group"> <label>Enter Your Name</label> <input type="text" name="name" class="form-control" value="" /> </div> <div class="form-group"> <label>Enter Your Email</label> <input type="text" name="email" class="form-control" value="" /> </div> <div class="form-group"> <label>Enter Your Message</label> <textarea name="message" class="form-control"></textarea> </div> <div class="form-group"> <input type="submit" name="send" class="btn btn-info" value="Send" /> </div> </form> </div> </body> </html>Whilomwe can see in Contact form view file we have use jQuery and Bootstrap library for make simple contact form. Laravel use stipule template for write server script lawmaking between html code. So here we can see validation error message lawmaking and success form submission message on web page. Once user has filled all form details then form submission request has been send to send() method of SendEmailController.php controller file which we can see below. <form method="post" action="{{url('sendemail/send')}}"> Step 4 - Set Route In this framework we should set the rule of each method which we have created under Controller file. So here we will make two method like index() and send() method under controller. For this we have to go to routes/web.php for set the route. <?php Route::get('/sendemail', 'SendEmailController@index'); Route::post('/sendemail/send', 'SendEmailController@send'); ?> Step 5 - Create Mailable ClassSurpassingmake mailable matriculation we should pinpoint email configuration in .env file of Laravel framework. MAIL_DRIVER=smtp MAIL_HOST=smtpout.secureserver.net MAIL_PORT=80 MAIL_USERNAME=xxxxxxx MAIL_PASSWORD=xxxxxxx MAIL_ENCRYPTION=null Now we are ready for make mailable matriculation for this we have to go teminal and write pursuit command. php wright make:mail SendMail This writ will make SendMail.php file inside App\Mail\SendMail.php. In this matriculation we have to pinpoint one property with name $data, by using this property we can pass data at the time of create an new instance of this class. App\Mail\SendMail.php <?php namespace App\Mail; use Illuminate\Bus\Queueable; use Illuminate\Mail\Mailable; use Illuminate\Queue\SerializesModels; use Illuminate\Contracts\Queue\ShouldQueue; matriculation SendMail extends Mailable { use Queueable, SerializesModels; public $data; /** * Create a new message instance. * * @return void */ public function __construct($data) { $this->data = $data; } /** * Build the message. * * @return $this */ public function build() { return $this->from('john@webslesson.info')->subject('NewConsumerEquiry')->view('dynamic_email_template')->with('data', $this->data); } } ?> In whilom source lawmaking we can see build() method, which build the message for send. from() - This method is use to pinpoint from email address. subject() - This method is use to pinpoint subject of an Email view() - By using this view method we can fetch content from view file which has been put under email body. with() - This is method is used to pass data into view file, so we can make dynamic email soul content. Step 6 - Make View file for EmailSoulIn this framework email soul content has been get from view file. We unelevated we have make one dynamic_email_template.blade.php view file under resources/views folder. resources/views/dynamic_email_template.blade.php <p>Hi, This is {{ $data['name'] }}</p> <p>I have some query like {{ $data['message'] }}.</p> <p>It would be appriciative, if you gone through this feedback.</p>Whilomwe can see in this file we have pass $data variable into this view file. Here we can see how we have pass $data['name'] and $data['message'] variable under this view file. So, this way we can make dynamic email soul in Laravel for send email. Step 7 - Make Send() under Controller This is last step for send an email in Laravel and in step we have to make send method for handle form submit request for send an email. app\Http\Controllers\SendEmailController.php <?php namespace App\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Support\Facades\Mail; use App\Mail\SendMail; matriculation SendEmailController extends Controller { function index() { return view('send_email'); } function send(Request $request) { $this->validate($request, [ 'name' => 'required', 'email' => 'required|email', 'message' => 'required' ]); $data = array( 'name' => $request->name, 'message' => $request->message ); Mail::to('web-tutorial@programmer.net')->send(new SendMail($data)); return back()->with('success', 'Thanks for contacting us!'); } } ?> Here in this send() method first we have validate form data by using validate() method we can validate form data and if any data not follow validation rules it stop lawmaking execution and send validation message to view file. But suppose all validation rules pass then this method process for send and email. So, here first we have store form data under $data variable. This variable has been pass into dynamic_email_tempate.php view file by using SendMail.php mailable class. And lastly for send an email we have use Maill matriculation and in this we have use to() in which we can pinpoint on which email write email must be received.Withoutthis for send an email we have use send() method. In this method we have create new instance of SendMail.php mailable matriculation and in this instance we have pass $data variable value and this method will send an email.Withoutsuccessfully email send url must be redirect to contact form then form this we have use back() method with success message which has been exhibit whilom contact form. Here How can we send an email in Laravel lawmaking is ready now we have to run Laravel application, for this we have to go to terminal and write pursuit command. php wright serve If you want to see video tutorial of this post, you can see whilom the start of post. If you have any query regarding of this tutorial, you can share query under scuttlebutt box. Share This:    Facebook Twitter Google+ Stumble Digg ReadIncreasinglyWednesday, 19 September 2018 Add Server-side DataTables Custom Filter using PHP with Ajax  Webslesson     05:40     Ajax, ajax php custom search, custom filter, custom search, datatable, datatables, datatables custom filter, datatables custom search, JQuery, php, php ajax datatable custom filter, php custom filter     1 comment    jQuery Datatables when initialized on the HTML table it has automatically make unrepealable valuable full-length like data pagination, table post sorting, search all table post data from single textbox, exhibit number of records per page functionality without writing of any line of lawmaking or script. So, here we have to discuss how can we remove default DataTables search textbox and make custom serach of filter DataTables data using PHP script with Ajax.ConsideringDefault Search box is used for search records of all table post and exhibit on Datatables. But in Web Development, Sometimes we want to required custom search filter for get specific post search onlu not whole table post search. For this in this tutorial, We will learn how can we implement custom search filter into jQuery DataTables by using Ajax with PHP script. jQuery DatatablesConsumerSearch filter with Server side processing help us to get records based on our choices of data filter. For example from the list of data we want to just filter "Male" gender data only. So we have search search in textbox then it will return sexuality data also. For this we have to required custom search filter in Datatables for increase efficiency of word-for-word search of data. We can implement custom search by using HTML Select box or plane textbox moreover for filter jQuery Datatables data. View Demo Database -- -- Database: `testing` -- -- -------------------------------------------------------- -- -- Table structure for table `tbl_customer` -- CREATE TABLE `tbl_customer` ( `CustomerID` int(11) NOT NULL, `CustomerName` varchar(250) NOT NULL, `Gender` varchar(30) NOT NULL, `Address` text NOT NULL, `City` varchar(250) NOT NULL, `PostalCode` varchar(30) NOT NULL, `Country` varchar(100) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `tbl_customer` -- INSERT INTO `tbl_customer` (`CustomerID`, `CustomerName`, `Gender`, `Address`, `City`, `PostalCode`, `Country`) VALUES (1, 'Maria Anders', 'Female', 'Obere Str. 57', 'Berlin', '12209', 'Germany'), (2, 'Ana Trujillo', 'Female', 'Avda. de la Construction 2222', 'Mexico D.F.', '5021', 'Mexico'), (3, 'Antonio Moreno', 'Male', 'Mataderos 2312', 'Mexico D.F.', '5023', 'Mexico'), (4, 'Thomas Hardy', 'Male', '120 Hanover Sq.', 'London', 'WA1 1DP', 'United Kingdom'), (5, 'Paula Parente', 'Female', 'Rua do Mercado, 12', 'Resende', '08737-363', 'Brazil'), (6, 'Wolski Zbyszek', 'Male', 'ul. Filtrowa 68', 'Walla', '01-012', 'Poland'), (7, 'Matti Karttunen', 'Male', 'Keskuskatu 45', 'Helsinki', '21240', 'Finland'), (8, 'Karl Jablonski', 'Male', '305 - 14th Ave. S. Suite 3B', 'Seattle', '98128', 'United States'), (9, 'Paula Parente', 'Female', 'Rua do Mercado, 12', 'Resende', '08737-363', 'Brazil'), (10, 'John Koskitalo', 'Male', 'Torikatu 38', 'Oulu', '90110', 'Finland'), (39, 'Ann Devon', 'Female', '35 King George', 'London', 'WX3 6FW', 'United Kingdom'), (38, 'Janine Labrune', 'Female', '67, rue des Cinquante Otages', 'Nantes', '44000', 'Finland'), (37, 'Kathryn Segal', 'Female', 'Augsburger Strabe 40', 'Ludenscheid Gevelndorf', '58513', 'Germany'), (36, 'Elizabeth Brown', 'Female', 'Berkeley Gardens 12 Brewery', 'London', 'WX1 6LT', 'United Kingdom'), (30, 'Trina Davidson', 'Female', '1049 Lockhart Drive', 'Barrie', 'ON L4M 3B1', 'Canada'), (31, 'Jeff Putnam', 'Male', 'Industrieweg 56', 'Bouvignies', '7803', 'Belgium'), (32, 'Joyce Rosenberry', 'Female', 'Norra Esplanaden 56', 'HELSINKI', '380', 'Finland'), (33, 'Ronald Bowne', 'Male', '2343 Shadowmar Drive', 'New Orleans', '70112', 'United States'), (34, 'Justin Adams', 'Male', '45, rue de Lille', 'ARMENTIERES', '59280', 'France'), (35, 'Pedro Afonso', 'Male', 'Av. dos Lusiadas, 23', 'Sao Paulo', '05432-043', 'Brazil'), (100, 'Kathryn Segal', 'Female', 'Augsburger Strabe 40', 'Ludenscheid Gevelndorf', '58513', 'Germany'), (101, 'Tonia Sayre', 'Female', '84 Haslemere Road', 'ECHT', 'AB32 2DY', 'United Kingdom'), (102, 'Loretta Harris', 'Female', 'Avenida Boavista 71', 'SANTO AMARO', '4920-111', 'Portugal'), (103, 'Sean Wong', 'Male', 'Rua Vito Bovino, 240', 'Sao Paulo-SP', '04677-002', 'Brazil'), (104, 'Frederick Sears', 'Male', 'ul. Marysiuska 64', 'Warszawa', '04-617', 'Poland'), (105, 'Tammy Cantrell', 'Female', 'Lukiokatu 34', 'HAMEENLINNA', '13250', 'Finland'), (106, 'Megan Kennedy', 'Female', '1210 Post Farm Road', 'Norcross', '30071', 'United States'), (107, 'Maria Whittaker', 'Female', 'Spresstrasse 62', 'Bielefeld Milse', '33729', 'Germany'), (108, 'Dorothy Parker', 'Female', '32 Lairg Road', 'NEWCHURCH', 'HR5 5DR', 'United Kingdom'), (109, 'Roger Rudolph', 'Male', 'Avenida Julio Saul Dias 78', 'PENAFIEL', '4560-470', 'Portugal'), (110, 'Karen Metivier', 'Female', 'Rua Guimaraes Passos, 556', 'Sao Luis-MA', '65025-450', 'Brazil'), (111, 'Charles Hoover', 'Male', 'Al. Tysiaclecia 98', 'Warszawa', '03-851', 'Poland'), (112, 'Becky Moss', 'Female', 'Laivurinkatu 6', 'MIKKELI', '50120', 'Finland'), (113, 'Frank Kidd', 'Male', '2491 Carson Street', 'Cincinnati', 'KY 45202', 'United States'), (114, 'Donna Wilson', 'Female', 'Hallesches Ufer 69', 'Dettingen', '73265', 'Germany'), (115, 'Lillian Roberson', 'Female', '36 Iolaire Road', 'NEW BARN', 'DA3 3FT', 'United Kingdom'); -- -- Indexes for dumped tables -- -- -- Indexes for table `tbl_customer` -- ALTER TABLE `tbl_customer` ADD PRIMARY KEY (`CustomerID`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `tbl_customer` -- ALTER TABLE `tbl_customer` MODIFY `CustomerID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=116; database_connection.php <?php //database_connection.php $connect = new PDO("mysql:host=localhost;dbname=testing", "root", ""); ?> index.php <?php include('database_connection.php'); $country = ''; $query = "SELECT DISTINCT Country FROM tbl_customer ORDER BY Country ASC"; $statement = $connect->prepare($query); $statement->execute(); $result = $statement->fetchAll(); foreach($result as $row) { $country .= '<option value="'.$row['Country'].'">'.$row['Country'].'</option>'; } ?> <html> <head> <title>Custom Search in jQuery Datatables using PHP Ajax</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /> <script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script> <script src="https://cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js"></script> <link rel="stylesheet" href="https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css" /> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> </head> <body> <div class="container box"> <h3 align="center">Custom Search in jQuery Datatables using PHP Ajax</h3> <br /> <div class="row"> <div class="col-md-4"></div> <div class="col-md-4"> <div class="form-group"> <select name="filter_gender" id="filter_gender" class="form-control" required> <option value="">Select Gender</option> <option value="Male">Male</option> <option value="Female">Female</option> </select> </div> <div class="form-group"> <select name="filter_country" id="filter_country" class="form-control" required> <option value="">Select Country</option> <?php reverberate $country; ?> </select> </div> <div class="form-group" align="center"> <button type="button" name="filter" id="filter" class="btn btn-info">Filter</button> </div> </div> <div class="col-md-4"></div> </div> <div class="table-responsive"> <table id="customer_data" class="table table-bordered table-striped"> <thead> <tr> <th width="20%">Customer Name</th> <th width="10%">Gender</th> <th width="25%">Address</th> <th width="15%">City</th> <th width="15%">Postal Code</th> <th width="15%">Country</th> </tr> </thead> </table> <br /> <br /> <br /> </div> </div> </body> </html> <script type="text/javascript" language="javascript" > $(document).ready(function(){ fill_datatable(); function fill_datatable(filter_gender = '', filter_country = '') { var dataTable = $('#customer_data').DataTable({ "processing" : true, "serverSide" : true, "order" : [], "searching" : false, "ajax" : { url:"fetch.php", type:"POST", data:{ filter_gender:filter_gender, filter_country:filter_country } } }); } $('#filter').click(function(){ var filter_gender = $('#filter_gender').val(); var filter_country = $('#filter_country').val(); if(filter_gender != '' && filter_country != '') { $('#customer_data').DataTable().destroy(); fill_datatable(filter_gender, filter_country); } else { alert('Select Both filter option'); $('#customer_data').DataTable().destroy(); fill_datatable(); } }); }); </script> fetch.php <?php include('database_connection.php'); $column = array('CustomerName', 'Gender', 'Address', 'City', 'PostalCode', 'Country'); $query = " SELECT * FROM tbl_customer "; if(isset($_POST['filter_gender'], $_POST['filter_country']) && $_POST['filter_gender'] != '' && $_POST['filter_country'] != '') { $query .= ' WHERE Gender = "'.$_POST['filter_gender'].'" AND Country = "'.$_POST['filter_country'].'" '; } if(isset($_POST['order'])) { $query .= 'ORDER BY '.$column[$_POST['order']['0']['column']].' '.$_POST['order']['0']['dir'].' '; } else { $query .= 'ORDER BY CustomerID DESC '; } $query1 = ''; if($_POST["length"] != -1) { $query1 = 'LIMIT ' . $_POST['start'] . ', ' . $_POST['length']; } $statement = $connect->prepare($query); $statement->execute(); $number_filter_row = $statement->rowCount(); $statement = $connect->prepare($query . $query1); $statement->execute(); $result = $statement->fetchAll(); $data = array(); foreach($result as $row) { $sub_array = array(); $sub_array[] = $row['CustomerName']; $sub_array[] = $row['Gender']; $sub_array[] = $row['Address']; $sub_array[] = $row['City']; $sub_array[] = $row['PostalCode']; $sub_array[] = $row['Country']; $data[] = $sub_array; } function count_all_data($connect) { $query = "SELECT * FROM tbl_customer"; $statement = $connect->prepare($query); $statement->execute(); return $statement->rowCount(); } $output = array( "draw" => intval($_POST["draw"]), "recordsTotal" => count_all_data($connect), "recordsFiltered" => $number_filter_row, "data" => $data ); reverberate json_encode($output); ?> Share This:    Facebook Twitter Google+ Stumble Digg ReadIncreasinglySaturday, 15 September 2018 Codeigniter -SniftUser IP Browser Operating System Details  Webslesson     04:14     Codeigniter, codeigniter get browser info, codeigniter get ip address, snift browser codeigniter, get browser name in codeigniter, get ip codeigniter, get os in codeigniter, user wage-earner library     No comments    If you want to get or fetch or collect user information like who has visit your website, so you can do this things very hands if you have use Codeigniter. By using Codeigniter we can hands collect user information like user IP Address, browser details, browser version, operating system which he has use in his computer, we can moreover snift from which device he has get wangle our website etc. We can fetch all these user information by using Codeigniter "user_agent" library. UserWage-earnerLibrary in Codeigniter is one matriculation which help programmer to snift user information well-nigh user browser, mobile device or plane robot visiting to website also. If you have use simple PHP script from get all these information then it is very difficult but in Codeigniter you have simple load this user_agent library and simple way to fetch all user information.Consideringwe want know who has visit our website, from which region or location our website has been open. So, If any one has do any fraud on our website then we can hands snift particular user based on his information. So, it is required to get such type of user information and this task we can hands do by using Codeigniter UserWage-earnerLibrary. SourceLawmakingControllers application/controllers/UserDetails.php <?php defined('BASEPATH') OR exit('No uncontrived script wangle allowed'); matriculation UserDetails extends CI_Controller { function index() { $this->load->library('user_agent'); $data['browser'] = $this->agent->browser(); $data['browser_version'] = $this->agent->version(); $data['os'] = $this->agent->platform(); $data['ip_address'] = $this->input->ip_address(); $this->load->view('user_details', $data); } } ?> Views <!DOCTYPE html> <html> <head> <title>How to Get User IP, Browser & OS Details in Codeigniter</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" /> </head> <body> <div class="container"> <br /> <h3 align="center">How to Get User IP, Browser & OS Details in Codeigniter</h3> <br /> <div class="table-responsive"> <table class="table table-bordered table-striped"> <tr> <td><b>IP Address</b></td> <td><?php reverberate $ip_address; ?></td> </tr> <tr> <td><b>Operating System</b></td> <td><?php reverberate $os; ?></td> </tr> <tr> <td><b>Browser Details</b></td> <td><?php reverberate $browser . ' - ' . $browser_version; ?></td> </tr> </table> </div> </div> </body> </html> Share This:    Facebook Twitter Google+ Stumble Digg ReadIncreasingly12 Fundamental Actions That Help You Secure Your Website from Hackers  Webslesson     04:06     No comments    Hacking is a rabble-rousing web worriedness that can turn your server into an interface that will transmit spam email messages to meet unrepealable illegal demands. Such an worriedness primarily emerges out of a unstudied vein on part of website owners who finger that their website can never be hacked. However, this notion is not at all true. Every website can be hacked, causing an immense loss to e-commerce businesses. Given the fact that stuff unscratched is largest than to finger sorry, here are 12 tips that can prevent your website from getting hacked. 1. "Update" Is The Keyword Website owners should know for a fact that sites with insecure and outdated software are prone to hacking. Therefore, you should unchangingly alimony your software updated. Businesses should enable their ‘software update’ option as and when a new CMS (Content Management System) or a plugin is available. You should moreover know that hacking is now an streamlined process. And it is not unbearable if you initiate weekly or monthly updates since bots constantly squint for vulnerable websites. In order to win this wrestle with bots, you should unchangingly update your website as soon as the update is available. WP Updates Notifier is a plugin meant for WordPress websites. This plugin sends an email that an update is now available. Additionally, it is moreover recommended that you have a website firewall in place to secure your website from hacking disasters. Hence it is very important that you alimony your scripts and platform up-to-date. 2. Unlock the Power of "HTTPS" It is now mandatory for websites to exhibit the HTTPS protocol as a measure of web security. Therefore, it is important that you switch to HTTPS which displays a padlock in the write bar; an indication that your website is unscratched to communicate and transact. HTTPS is a protocol that demonstrates to visitors that your website comes with an spare encryption standard tabbed the Transport Layer Security (TLS). HTTPS is moreover a yardstick of web security, informing the users that your site is supported by a Secure Sockets Layer (SSL) certificate. If you are looking to add an spare layer of security, you can buy unseemly SSL document from an authorized CA. This way, you are towers spare layers of security to your website, insulating it from all types of hacking attacks. 3. Parameterized Queries – The Perfect Solution to SQL Injection Hacks Website owners should realize that a number of hacking attacks take place on worth of SQL injections. An SQL injection emerges when your website has a form that needs to be filled in by visitors to provide information. It is here that you need to alimony a tropical watch on the various fields of the form. Forms with unshut fields can vamp the sustentation of hackers who can effortlessly insert any code. Once this is done, they will secure a gateway to your website. It is for this reason that you should take unrepealable steps to secure your site from SQL injection hacks. However, the simplest ways would be to employ parameterized queries. These queries will tighten your lawmaking with sufficient parameters that cannot be trespassed by hackers. 4. CSP Helps Build A Strong Wall Against XSS Attacks Content Security Policy (CSP) is a handy tool that can secure your website from cross-site scripting (XSS) attacks. XSS attacks are very worldwide threats to websites. These sally when hackers try to push rabble-rousing JavaScript lawmaking on your web pages. This worriedness harms the visitor pages of your website. In an struggle to safeguard your website from such attacks, you can take the help of CSP. Through CSP, you can ensure that every function or field that is used for inputting data is made as explicit as possible. That means, you are tightening the lawmaking so that hackers cannot slip any infected lawmaking on to your webpage. CSP, when widow to the header of your webpage will offer an variety of directives, informing the browser of unscratched domains. 5. Complex, Long and Unique Passwords Are Mandatory If you are of the opinion that strong passwords are required only for financial transactions and email conversations, think twice. The strength of a password is increasingly significant with databases, website servers and admins. A combination of alphabets (upper and lower case), numbers and special notation makes up a strong password. It is important that you have at least 12 password notation so as to secure your website.Flipsidetip here is to stave having the same password for variegated website logins. While you create a complex, unique and long password, it is prudent that you alimony waffly it wontedly so that hackers cannot mess with the crucial information of your users. 6. Have AReplacementStrategy In Place A hacked website can throw everything out of gear by wiping out all your data and efforts in towers a reliable digital interface. Hence it is unchangingly largest to be prepared of such rabble-rousing activities with unrepealable replacement strategies. Given the fact that website owners don’t replacement regularly, it is very important that you learn how to stave your unpatched CMS versions to fall into the hands of hackers. Backing up data and storing it in a place which cannot be accessed by the public is the trick that will protect your site from the damages caused by a hacked website. 7. Secure Your Admin Directories Admin directories, most of the times wilt gateways for hackers when they use scripts that can scan all the directories on your web server which are wontedly named as ‘login’ or ‘admin’.Withoutthat, they will do everything to enter into your folders, ultimately compromising the security of your website. Thus it comes as an intelligent move to rename all your admin folders with random names of your nomination so as to obfuscate them. 8. Website Security Tools CanMoreoverCome To Your Rescue There are a host of web security tools which are wontedly tabbed as Penetration Testing. You can rely on some self-ruling tools such as Netsparker, Xenotix XSS Exploit Framework and SecurityHeaders.io. Through these aides, you can powerfully trammels the moves of hackers who try to compromise the security of your website. 9. Selection of The Right Extensions Website owners are at an wholesomeness to use the extensibility full-length of CMS applications. However, there are an variety of add-ons, plugins and extensions that offer the same functionality. That means, you need to make the right nomination with regard to the apt extension. To victorious at a decision, here are some benchmarks. Checking out the stage when the extension was last updated can support your visualization to pick that one. If the update of the extension happened a year ago, then there is every endangerment that the tragedian of the extension was inactive. Such extensions goof to write your functionality needs and are moreover incompetent to resolve security issues. The number of installations coupled with the age of the extension are two other parameters that you need to focus on. Selecting an extension that was ripened by a reliable developer is recommended. That means, you need to segregate only the legitimate sources from which you can download all your themes and extensions. You should moreover know that the ‘free’ versions come with malware as most of them are pirated. It is weightier to stave such versions and subscribe to the ones that support paid downloads. 10. Understand The Importance of File Permissions To a layman, a file permission states the very user of the file and the activities that he can perform on it. A ‘Read’ (4) permission enables the user to simply view the file contents. A ‘Write’ (2) permission, on the other hand, approves him to make changes to the file. The ‘Execute’ (1) permission allows him to run the script or program. Since each file permission is associated with a number, it becomes easy for you to permit multiple permissions simply by subtracting the numbers. A ‘read-write-execute’ permission can be granted by setting the user permission to 7. This numerical representation will involve 3 types of users. Owner: Only one user who has created the file can be owner. Group: A tuft of users to whom a file is prescribed will be granted the same permission. Public: All other people You may oppose that CMS installations come with default permissions. However, it is prudent to squint into the unelevated subtitle concerning file and folder permissions that are default to any website. The wontedly used 666 file permission (allowing the owner, group and public the permission to read and write) can be a potential threat to your website information. This permission allows everyone including hackers the permission to mess with your files. Similar is the specimen with the ‘777’ folder permission (all the 3 groups of users are permitted to execute the script). This permits any visitor to delete your files or add malware code. Such acts can make your website susceptible to hacking attacks. So, you as a website owner should provide the apt permissions to variegated users so as to safeguard your website information. 11. Permitting Users to Upload Files – A Strict 'No' Website owners should be very shielding when granting the permission to users to upload files on to their sites. When a seemingly unscratched file is uploaded by a user, there is every possibility that it might have a script that opens your website, once it is executed. If your website supports a file upload form, then you should be uneaten cautious with all the files that are stuff uploaded. In an struggle to prevent such uploads robbing off your website information, you should consider installing a firewall. In the event you are permitting web files to be uploaded on to your website, you should stick to unscratched transport commands like SSH or SFTP.Flipsidetip would be to mount your website on one server, permitting your database to run on flipside server. You should moreover squint at restricting physical wangle to your server. All these tips can prevent your database server to land in the hands of hackers. 12. Actionable TipsWell-nighServer Configuration Files As the owner of a website, you should know well-nigh your web server configuration files which are powerful. You will find these files located in the root web directory. nginx.conf is the configuration file for Nginx servers. If you are using an Apache web server, you have the .htaccess configuration file. These configuration files, while permitting you to execute server rules moreover help you secure your website. Speaking of configuration files, unelevated are unrepealable rules that you need to follow and nail to your web server. Protect Sensitive Files: Under this head, you can come up with unrepealable rules that can safeguard unrepealable folders and files. You need to be watchful well-nigh CMS configuration files which are mounted on your web server, storing sensitive information. It is here that your database login details are stored in plain text. Admin areas should moreover be locked withal with restricting the PHP execution for directories that permit uploads and store images. Prevent Browsing of Directories: It should be your prime motive to limit the information that can be accessed by hackers. When you alimony a tab on the browsing of directories, you are preventing hackers to view the contents of your directories. These two rules, once implemented, safeguard your configuration files preventing them to land in the hands of hackers. Closing Thoughts Calling for some forethought, the supra proactive tips can help you modernize the security of your website. While informing you of the probable issues that may yield up at any time, it is very important that you tightly secure your website from various corners. This way, you will worldly-wise to stop the numerous streamlined hacking attacks on your website in wing to safeguarding your goodwill in the market. Share This:    Facebook Twitter Google+ Stumble Digg ReadIncreasinglyOlder Posts Home Webslesson Popular Posts Live Chat System in PHP using Ajax JQuery Dynamically Add / Remove input fields in PHP with Jquery Ajax Live Add Edit Delete Datatables Records using PHP Ajax Bootstrap Multi Select Dropdown with Checkboxes using Jquery in PHP PHP PDO Ajax CRUD with Data Tables and Bootstrap Modals Jquery Fullcalendar Integration with PHP and Mysql Live Table Add Edit Delete using Ajax Jquery in PHP Mysql Simple PHP Mysql Shopping Cart Sorting Table Row using Jquery Drag Drop with Ajax PHP How to Make Product Filter in php using Ajax Search for: Copyright © Webslesson