Category Archive Php Training

BySlide Scope

Tools needed to Run PHP on local server – PHP Tutorial Part 2

We introduced PHP to students in the Part 1 of this tutorial. In order to run PHP locally or in your computer or laptop you will need following resources:

  1. Apache Web Server

Note – Nginx (high-performance HTTP server), lightspeed (open-source web server) etc. are some alternatives to Apache.

  1. PHP

You can download php from www.php.net/downloads

  1. MySql Server

Needed to Create and Test Databases.

These three resources must be present in your computer in order to run and test PHP code.

PHP can run on any operating system from Microsoft, Linux and Mac-OS if you have necessary resources installed.

If you don’t want to install php manually you can use a simple tool that will install APACHE, PHP, PERL and MYSQL in your computer.

You will need Web Browser like Google Chrome or Mozilla to run your web pages.

We suggest you to use any of the following tools to Install Server for PHP and MySql in your PC or laptop:

  1. XAMPP – https://www.apachefriends.org/download.html
  2. AMPPS – http://www.ampps.com/download

XAMPP is commonly used for running PHP websites in local server but AMPPS is also as efficient as XAMPP.

These tools will install all resources needed to run PHP in Local Server.

After Installing XAMPP you will get a folder in your default drive (or chosen drive while installing) named XAMPP.

xampp-folder

 

Inside XAMPP folder you will find configuration files for all resources which you can see in this image.

Tools needed to Run PHP in local server

Inside the XAMPP folder you will see HTDOCS folder. This HTDOCS folder is the root folder of your local website hosting.

step by step php tutorial

Directories created within HTDOCS folder will represent new Websites.

For Example: If you will create a directory named SLIDESCOPE in your HTDOCS folder then inside the SLIDESCOPE named folder you will put your web pages and files.

After Installing XAMPP you will find XAMPP CONTROL PANEL in your computer. It looks like this:

 

xampp-control-panel

 

 

Yu can see that it is showing the Operating System Details and the status of APACHE and MYSQL server.

In order to run PHP and MySql you have to start the APACHE and MySQL in control panel.

BySlide Scope

Step By Step PHP Tutorial – Part 1 – Introduction

  • PHP is a server side scripting language and it stands for Hypertext Pre-Processor. Originally PHP was called “Personal Home Page”.
  • PHP was created by Rasmus Lerdorf in the year 1994.
  • PHP was primarily developed for Web Development Purpose.
  • PHP can be used to post and retrieve data from one html form on any other page.
  • You can insert PHP code inside HTML or HTML code Inside PHP code.
  • Knowledge of Basic HTML and CSS is preferred to learn PHP.
  • Syntax of PHP is very easy to learn. If you are familiar with C Programming language then you will be able to understand PHP easily.
  • PHP is not a client side programming language which means that it cannot run without a server.
  • APACHE server can be used to test and run PHP.
  • PHP is an open-source programming language. It has a huge community of users and hence it has a lot of support.
  • PHP can be used in a Procedural Programming Style and Object Oriented Programming Style.
  • Beginners will start with Learning Procedural Style and then OOPs style.
  • Websites like Stackoverflow and Php.net can be used to get solutions to any problem related to PHP.
  • A server side scripting language like PHP can be used to communicate with the database directly.
  • It can be used to Create, Read, Update and Delete records of a database.
  • Database is used to store data in tables. Tables have columns that are named as per the data which will be stored n them.
  • MYSQL database is commonly used with PHP and we will learn MySql in this tutorial as well.
  • PHP can be used to Create, Read and Delete files on targeted folders and directories.
  • PHP is the backbone of many popular CMS tools like WordPress, Drupal, Magento etc. After learning PHP you will be able to configure above mentioned CMS scripts to any extent.
  • PHP can be used to set and access Cookies and Sessions. It is helpful in creating Login and Signup Based User Management Systems.
  • You can use PHP to encrypt data.

This is a Step By Step PHP Tutorial & In this introduction part of PHP we have covered some common points that a students or a beginner must know about PHP before learning it.

Some point may have not been covered in the introduction section but you will find them in the newer parts of this tutorial.

If you have any doubts or feedback related to this introduction, you can comment below.

BySlide Scope

How to use openweathermap api with PHP

Openweathermap api with PHP

In this tutorial we are going to discuss about a useful API from openweathermap.org. Its API can be used to display Current weather and 13 day Forecast data.

It displays following data:

  • Minimum Temperature
  • Maximum Temperature
  • Wind Speed
  • Humidity Value
  • Weather Condition and other details.

Using PHP to Develop your own weather checking website :

Step 1 – Go to Openweathermap.org and register to get your free or paid api key (app_id).

Step 2 – Create a PHP file and write HTML code for a Simple Form.

<form method=”post”>

<label for=”city”>

Enter Location Name :

</label>

<input class=”form-control” id=”searchTextField” name=”city” placeholder=”Enter a location” autocomplete=”on”>

<!–<label for=”cc”>

Country Code (Eg: IN for India):

</label>

<input class=”form-control” name=”cc”>–>

<button class=”btn btn-success” type=”submit” name=”sub”>View</button>

</form>

Using the form given above users will enter the name of their city.

Step – 3 Write the following php code:

<?php

                if (isset($_POST[‘sub’])){

$city = $_POST[‘city’];

$country = $_POST[‘cc’];

$url=”http://api.openweathermap.org/data/2.5/weather?q=”.$city.”,”.$country.”&units=metric&cnt=7&lang=en&appid={Your-APi-key}”;

//Replace your API key with your key.

//When user will submit the query, $_POST variable will be set and you have supply these variable in the url.

//The above given url produced JSON output. Now write:

$json=file_get_contents($url);

$data=json_decode($json,true);

echo “<h2>Current Temperature in ” . $city . ” is :<button class=’btn btn-success’>” . $data[‘main’][‘temp’] . “&#176; Celcius</button></h2>”;

echo “<h2>Wind Speed is :<u>” . $data[‘wind’][‘speed’] . “</u> KMPH</h2>”;

echo “<h2>Humidity is :<u>” . $data[‘main’][‘humidity’] . “</u> %</h2>”;

 

echo  “<h2>Weather condition:<u>” . $data[‘weather’][0][‘main’]  . “</u>”;

 

echo “<img src=’http://openweathermap.org/img/w/” .$data[‘weather’][0][‘icon’]. “.png’ width=’90’ height=’90’></h2>”;

?>

You will see a form and when you will enter name of any city in the Input field and hit enter your application will get the data from following JSON:

In this example we have checked our URL with “Lucknow”.

This is a pretty json output:

{
  "coord": {
    "lon": 80.92,
    "lat": 26.85
  },
  "weather": [
    {
      "id": 721,
      "main": "Haze",
      "description": "haze",
      "icon": "50d"
    }
  ],
  "base": "stations",
  "main": {
    "temp": 40,
    "pressure": 1005,
    "humidity": 16,
    "temp_min": 40,
    "temp_max": 40
  },
  "visibility": 3000,
  "wind": {
    "speed": 1
  },
  "clouds": {
    "all": 0
  },
  "dt": 1492077600,
  "sys": {
    "type": 1,
    "id": 7817,
    "message": 0.0125,
    "country": "IN",
    "sunrise": 1492042451,
    "sunset": 1492088381
  },
  "id": 1264733,
  "name": "Lucknow",
  "cod": 200
}

You can see Live Demo at this URL : http://weather.slidescope.com

 

BySlide Scope

Codeigniter training in Lucknow

Codeigniter Training is for Web Developers with knowledge of core / basic php and Object Oriented Programming concepts.

What is Codeigniter ?

Codeigniter is a PHP framework for developing Web Applications quickly and more professionally. It is used by millions of developers across the globe.

Why Codeigniter ?

  • Codeigniter is Open Source.
  • It is light weight.
  • It used very Less resources on the server.
  • Documentation of Codeigniter on it’s official website is easy to understand and very strong.
  • Codeigniter is backed by a large community of Users. Help topics, tutorials and good trainers are easily available.
  • Many organizations are using Codeigniter and looking for professionals with sound knowledge of Codeigniter.

Who can do Codeigniter Training ?

People with knowledge of Basic / Core PHP and Object Oriented Programming Concepts can learn Codeigniter easily.

Candidates who want to build a career in web development (using PHP) can learn Codeigniter.

Where to Learn Codeigniter ?

  • You can learn codeigniter in Online and Classroom training module by Escalera Technologies.
  • You will learn everything from scratch.
  • You will work on live projects while learning.
  • You will learn database management – like done in large enterprises.

 

BySlide Scope

Lucknow Php Training Institute Core Php Advanced Php

Php is an open source Server Side Scripting Language used by many web developers and companies to develop basic and advanced web applications. You can learn Php to create fast web applications and you don’t need to pay any amount to install and setup the tools that are required to learn Php because it is opens source.

Many free tools are available to run and test php scripts on your Personal Computer or Laptop.

If you are familiar with Java Coding or C#(Sharp) coding then understanding Php will not be difficult for you.

If you are fairly new to the world of coding then also you can learn creating applications in php in 2 to 3 months.

There are various tutorials, books and articles available on internet which can help you in learning Php on your own.

If you are familiar with the basics of programming, learning online will not be difficult for you but Guidance of a professional trainer is always important because a trainer will explain you things practically and you will get experience of working on the Live Projects. A trainer can explain you the core concepts in detail.

We are associated with Best Php Training Institute in Lucknow, which is a great institute with 10 + years of computer languages coaching experience .

Contact This Institute –

Php from Php Training Institute – Lucknow
1/132, Kursi Road,
Vikas Nagar, Lucknow, IN,
UP 226022

List of Alumni

Saurabh Kanaujia


Nirbhay Saurabh


Vaibhav Shukla

You can learn Core and Advanced Php from Php Training Institute – Lucknow with working experience on Live projects.

A complete training with Database Management and Database Logic on MySql with complete understanding of  Business Logic.

Learn Documentation of Small, Medium and Large Scale projects.

Learn advanced usage of Roles, Sessions, Cookies etc.

Learn Advanced Php using frameworks like Codeigniter.

Learn creating frameworks based on Model View Controller

Fill this Simple Form to Contact us : http://slidescope.com/contact-us/