Category : PHP


PHP - Capture screenshot of website from URL example

Today, i am going to give you example of how to grab screen shot from given URL using PHP curl. There are several website provide API for capture website screenshot image using their API Secret and Key. In this example i am using screenshotmachine.com website API. This website provide very simple way to user their API. If you haven't account on screenshotmachine.com then you must create new account and get <strong class="path">Account Key</strong>. So you have to just copy that key. I also use variable "$accountKey", you have to just assign that key on that variable. It is very simple exampl.....

By Hardik Savani | September 12, 2016 | | 1456 Viewer | Category : PHP
READ MORE

Laravel 5.3 Image Upload with Validation example

Laravel is very popular PHP framework today and Laravel 5.3 released few days ago. There are several changes and enhancement on Laravel 5.3 version. So, Today i want to share with you how to image uploading in Laravel 5.3 with validation. If you are beginners then you can do that simply by following few step. Laravel 5.3 provide very simple way to create file uploading with proper validation like max file size 2MB, valid file extension like jpeg,png,jpg,gif or svg etc. So you can easily also implement this on your laravel 5.3 application. I give you very easy and simple example that way you.....

By Hardik Savani | September 2, 2016 | | 67880 Viewer | Category : PHP
READ MORE

How to send mail using mailable in laravel 5.3?

Laravel 5.3 released few days ago, that update several part from laravel 5.2, Laravel 5.3 also change mail sending function. Laravel 5.3 introduce mailable class for mail sending like Laravel 5.3 event and mailable class provide several method like view(), from(), text() etc. Mail send example is pretty interesting then laravel other version and also very simple with fully customize. Today, i am going to tell you how to send simple email with gmail smtp configuration using laravel 5.3 mailable class. It is very simple and best way. you have to just follow few step and you will get simple mail.....

By Hardik Savani | August 31, 2016 | | 12271 Viewer | Category : PHP
READ MORE

How to integrate google map using gmaps.js in php example?

Today, i am going to show you how to create simple google map in PHP. In this example i use gmaps.js plugin for integrate google map with marker of your location. You can simply generate google map in your any php framework like laravel framework, codeigniter framework, zend framework, cakephp framework etc. Gmaps.js plugin provide us map events, markers, Geolocation, Geolocation etc. you can use very simply and use your project. Bellow example you can see i added one marker on my location and also setted title, so you can also see demo and preview after bellow example file. <strong>Preview.....

By Hardik Savani | August 30, 2016 | | 1709 Viewer | Category : PHP
READ MORE

PHP - How to implement Google new reCAPTCHA Code Example with Demo?

We have to use Google captcha code on our registration form, contact form etc because captcha code prevent spams, bots etc. Google provide us to prevent bots sending form requests that way we can protect our site. So, Today i am going to give you very simple example of how to add google reCAPTCHA code in Core PHP from scratch. In this example you have to generate our own API Site Key and Secret from google account. But If you don't know how to generate then no worry, here is the step to generate API Key. we will create two files one "index.php" file for generate view for layout using bootstra.....

By Hardik Savani | August 28, 2016 | | 3887 Viewer | Category : PHP
READ MORE

How to implement infinite ajax scroll pagination in Laravel 5?

We always want to see auto load more data on page scroll on your home page or other pages for posts, news, listing etc like on facebook, twitter, linkedin etc. If you implemented infinite scroll on your php application then you don't require to give pagination and also not require to page refresh every time when page scroll. So, Today, i going to give you simple example of infinite scroll using jquery ajax on page scroll in laravel application from scratch. I use jquery scroll event for page scroll. this example is pretty simple, you can customize simply for your development. You have to jus.....

By Hardik Savani | August 23, 2016 | | 18183 Viewer | Category : PHP
READ MORE

PHP - How to remove duplicate values from multidimensional array?

Sometimes, we require to remove duplicates value from multidimensional array in our PHP framework php like laravel, codeigniter, zend etc. Today, In this example i going to give you example of get unique values from multidimensional array that way duplicates will be delete. In this example i have simple multidimensional array with duplicates values array and i will perform to get only unique values from multidimensional. It is possible by core PHP array_map() and array_unique(). It helps to remove duplicates values from multidimensional array. So, first you can see bellow my multidimensional.....

By Hardik Savani | August 20, 2016 | | 1361 Viewer | Category : PHP
READ MORE

Simple Add remove input fields dynamically using jquery with Bootstrap

In this tutorial, I am going to show you how to add remove input fields dynamically in your form using jquery. In this simple example, i give you to add multiple input fields with remove button that way you can remove field if you don't require. In this example i use bootstrap also because layout become pretty good. In this example, Simply i added two click event of jquery as listed bellow: <strong>1.add-more Class:</strong> On ".add-more" class that way we can write jquery append code. <strong>2.remove Class:</strong> On ".remove" class that way we can remove input field. I also added "copy.....

By Hardik Savani | August 19, 2016 | | 16547 Viewer | Category : PHP
READ MORE

PHP - jquery ajax crop image before upload using croppie plugin

we mostly need to crop image before upload and as specially when we save image for user profile or etc. In this post i tell you how to crop image and save using jquery ajax. In this example i use croppie plugin that provide to crop image with zoom and etc. croppie.js plugin is very professional that way we can easily use for crop profile image. Bellow example through you can implement easily with php and jquery. It is pretty simple example for upload crop and save image php using croppie.js plugin. You have to create two file and one upload directory for store crop image like as bellow: <s.....

By Hardik Savani | August 6, 2016 | | 22498 Viewer | Category : PHP
READ MORE

Jquery select2 ajax autocomplete example with demo in PHP

Jquery select2 plugin is a very famous jquery plugin, using select2 plugin we can do several thing like select box with search, select option with check box, ajax auto-complete etc. We normally require to do autocomplete task with select box when we have large amount of data like products, items, category, tag, user etc. so we can't load all then data at time and it's hard to find that item from several records. So select2 plugin provides us with select box with search and Ajax dynamically auto complete that way page will never load more and it will work fine. In this example, I have two fil.....

By Hardik Savani | August 5, 2016 | | 30089 Viewer | Category : PHP
READ MORE

    How to create middleware for XSS protection in laravel 5?

    How to create middleware for XSS protection in laravel 5?

    Open Post

    How to send mail using mailable in laravel 5.3?

    How to send mail using mailable in laravel 5.3?

    Open Post

    How to get filename from file path in MySQL?

    How to get filename from file path in MySQL?

    Open Post

    Laravel 5 Google OAuth authentication using Socialite Package

    Laravel 5 Google OAuth authentication using Socialite Package

    Open Post

    PHP Laravel 5 - Sub-domain routing file Example

    PHP Laravel 5 - Sub-domain routing file Example

    Open Post

    Laravel 5 client side validation using Parsley.js example

    Laravel 5 client side validation using Parsley.js example

    Open Post