REST API : Web Services

Representational state transfer (REST) or RESTful web services is one way of providing Building RESTful web administrations, as other programming abilities is part craftsmanship, part science. As the Internet business advances, making a REST API turns out to be more concrete with developing prescribed procedures. As RESTful web administrations don’t take after an endorsed standard aside from HTTP, it’s vital to manufacture your RESTful API as per industry best practices to ease advancement and increment customer selection.

By and by, there aren’t a considerable measure of REST API advisers for help the forlorn engineer. RestApiTutorial.com is committed to following REST API best practices and making assets accessible to empower brisk reference and self training for the improvement makes individual. We’ll examine both the workmanship and investigation of making REST Web administrations.

What is REST ?

REST remains for REpresentational State Transfer. REST is a web norms based engineering and uses HTTP Protocol for information correspondence. It rotates around assets where each part is an asset and an asset is gotten to by a typical interface utilizing HTTP standard strategies. REST was first presented by Roy Fielding in year 2000.

In REST engineering, a REST Server essentially gives access to assets and the REST customer gets to and shows the assets. Here every asset is distinguished by URIs/Global IDs. REST utilizes different portrayals to speak to an asset like Text, JSON and XML. JSON is presently the most mainstream arrange being utilized as a part of Web Services.

HTTP Methods : 

The accompanying HTTP strategies are most usually utilized as a part of a REST based engineering.

GET – Provides a read just access to an asset.

PUT – Used to make another asset.

Erase – Used to evacuate an asset.

POST – Used to refresh a current asset or make another asset.

Choices – Used to get the upheld operations on an asset.

 

RESTFul Web Services

A web benefit is an accumulation of open conventions and principles utilized for trading information between applications or frameworks. Programming applications written in different programming dialects and running on different stages can utilize web administrations to trade information over PC systems like the Internet in a way like between prepare correspondence on a solitary PC. This interoperability (e.g., amongst Java and Python, or Windows and Linux applications) is because of the utilization of open gauges.

Web administrations in view of REST Architecture are known as RESTful Web Services. These web administrations utilize HTTP techniques to actualize the idea of REST design. A RESTful web benefit as a rule characterizes a URI (Uniform Resource Identifier), which is an administration that gives asset portrayal, for example, JSON and an arrangement of HTTP Methods.

RESTful Web Services Tutorial

RESTful  Web Services are fundamentally REST Architecture based Web Services. In REST Architecture everything is an asset. Relaxing web administrations are light weight, profoundly adaptable and viable and are regularly used to make APIs for online applications. This instructional exercise will show you the nuts and bolts of RESTful Web Services and contains sections talking about all the essential segments of RESTful Web Services with reasonable illustrations.

Audience

This instructional exercise is intended for Software Professionals who will learn RESTful Web Services in straightforward and simple strides. This instructional exercise will give you awesome comprehension on RESTful Web Services ideas and subsequent to finishing this instructional exercise you will be at middle of the road level of aptitude from where you can take yourself at more elevated amount of mastery.

Prerequisites

Before continuing with this instructional exercise, you ought to have a fundamental comprehension of Java Language, Text Editor, and so on. Since we will create web administrations applications utilizing RESTful, so it will be great in the event that you have understanding on other web advancements like HTML, CSS, AJAX, and so on.

What is Opencart ?

OpenCart is free open source internet business stage for online traders. OpenCart gives an expert and dependable establishment from which to construct an effective online store. This establishment bids to a wide assortment of clients; going from prepared web designers searching for an easy to understand interface to use, to shop proprietors simply propelling their business online interestingly. OpenCart has a broad measure of components that gives you a solid hold over the customization of your store. With OpenCart’s devices, you can help your online shop experience its fullest potential.

System Requirements : 

OpenCart requires certain specialized prerequisites to be met for the store to work legitimately. Initial, a web server must be made to make the OpenCart store freely accessible on the web. Area names and facilitating administrations can without much of a stretch be acquired at a reasonable cost.
While choosing a facilitating administration, you ought to verify that these server prerequisites are given and introduced on their web servers:
These expansions must be empowered for OpenCart to introduce legitimately on the web server.
• Web Server (Apache recommended)
• PHP 5.4+
• Database (MySQLi recommended)
Required PHP libraries/modules
• Curl
• ZIP
• Zlib
• GD Library
• Mcrypt
• Mbstrings
• Xml

The above PHP expansions ought to be accessible by all facilitating suppliers, amid the introduce processa it will check you have them all empowered. You ought to contact your facilitating supplier in the event that one is absent.

Installing The Following Step  :

1. Download the expansion from here: Bulk Export/Import Extension for OpenCart. Make sure to look down the page and find the Download tab. Download the one for your specific OpenCart adaptation.
2. Extract the records that you just downloaded
3. Upload the envelopes “administrator”, “framework”, and “vqmod” and their records from the “transfer” registry to your root
4. Login to your OpenCart Dashboard
5. In your OpenCart Dashboard go to: System > Users > Users Group
6. Select the Top Administrator and snap Edit on the correct side.
7. Find the passage for instrument/send out in both Access and Modify dropdown records and place a check by tapping on their cases.

What is Swift Tools ?

Swift tools is a discretionary PC based programming and analytic utility for use with SWIFT remote frameworks.
It is possible to play out a site overview, allot profiles, and set up a remote work utilizing just SWIFT gadgets. In any case, framework setup and assessment can be refined quicker and with more data utilizing SWIFT TOOLS, enabling you to set up strong work systems with the best execution.

What’s required?

Swift tools can be downloaded for nothing from esd.notifier.com. This program is utilized with the W USB radio dongle (which must be requested independently), and a Windows PC with the accompanying least necessities:

Working System: Windows XP Professional (SP3), Vista, Windows 7, or Windows 8 (32 or 64 bit)

Hard Drive: 20 GB hard drive space with least 1GB free space on hard plate

Smash: Minimum 512MB RAM Processor speed: 1GHz least (2.4 GHz suggested)

Processor reserve: 512K

 

How does SWIFT TOOLS function?

SWIFT TOOLS utilizes the W-USB connector to convey remotely to SWIFT gadgets in two ways:

Discusses specifically with any SWIFT gadgets that are inside around 20 feet of the SWIFT TOOLS PC and have not been designed into a work organize.

Speaks with any portal inside 20′ of the PC running SWIFT TOOLS. At the point when the entryway is a piece of a dynamic work arrange, all gadgets in the system can be seen by means of SWIFT TOOLS.

Quick remote gadgets that are inside correspondence scope of the SWIFT TOOLS PC are shown in the “Communicator” area on the correct hand side of most SWIFT TOOLS screens.

The Communicator segment is the place singular gadgets or work systems (by entryway) are chosen for different operations in SWIFT TOOLS.

What is incorporated into SWIFT TOOLS?

The SWIFT TOOLS suite fuses three unique components – Site Survey, System Configuration, and Diagnostics.

Each of these components utilizes the Communicator to for choice of particular gadgets or work systems.

 

SWIFT TOOLS function

SWIFT TOOLS function

How to create simple contact Form in PHP and HTML

As we discussed and learned how to send email using email() in PHP in the previous article. Now in this article we will see creating simple contact form in PHP and HTML.

First of all we are going to create simple contact form in HTML which allows viewers to enter their information like “Full Name”, ”Subject”, ”E-mail”, “Message” these are common values that we want in our contact form. And then we will create PHP form to process these and send the mail. So first create new HTML file and name it as “index.html”.

 

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Simple Contact Us Form</title>

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

<link rel="stylesheet" type="text/css" href="style.css" />

</head>

<body>

<div id="page-wrap">

<h1 align ="center">Simple <strong>Contact Us</strong> Form</h1>

<div id="form-area">

<form method="post" action="contactengine.php">

<label for="Name">Name:</label>

<input type="text" name="Name" id="Name" required/>

<label for="number">Contact Number:</label>

<input type="text" name="number" id="number"

required/>

<label for="Email">Email:</label>

<input type="text" name="Email" id="Email" required/>

<label for="Enquiry">Message:</label><br />

<textarea name="message" rows="20" cols="20" id="message"></textarea>

<input type="submit" name="submit" value="Submit" class="submit-button" />

</form>

</div>

</div>

</body>

</html>

 

Now next step is to create PHP form to send these values to the given mail. For that create another PHP file and name it as “contactengine.php” and follow the below code.

<?php

$EmailFrom = Trim(stripslashes($_POST['Email'])); //"lotsofthing13@gmail.com";

$EmailTo = "lotsofthing13@gmail.com";

$Subject = "You have a new email from contact form";

$Name = Trim(stripslashes($_POST['Name']));

$number = Trim(stripslashes($_POST['number']));

$Email = Trim(stripslashes($_POST['Email']));

$message = Trim(stripslashes($_POST['message']));

$headers = "From: $EmailFrom \r\n";

$headers .= "Cc: $Emailcc \r\n";

// validation

$validationOK=true;

if (!$validationOK) {

print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";

exit;

}

// prepare email body text

$Body = "";

$Body .= "Name: ";

$Body .= $Name;

$Body .= "\n";

$Body .= "Contact Number: ";

$Body .= $number;

$Body .= "\n";

$Body .= "Email: ";

$Body .= $Email;

$Body .= "\n";

$Body .= "message: ";

$Body .= $message;

$Body .= "\n";

// send email

$success = mail($EmailTo, $Subject, $Body, $headers);

// redirect to success page

if ($success){

print "<meta http-equiv=\"refresh\" content=\"0;URL=contactthanks.php\">";

}

else{

print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";

}

?>

This is how we can create a simple contact form using HTML and PHP for contact us for Enquire us as well. In the next article we extend this article for adding the header like ”CC” and “BCC” which is one of the wanted requirement of clients.

Download:  create-Simple-contact-form-with-different-field

1 2 3