How to Insert Form Post Data in Mysql Database Table in PHP
To store data from html form to database table, First create the HTML form with input variable. Give unique name for input type boxes.
To store data from html form to database table, First create the HTML form with input variable. Give unique name for input type boxes.
Jive software provide the facility to collaborate and communicate employees, customers and partners to work together. In this post we explain how to create a document in Jive software using jive rest api in PHP. So you automate the jive document creation process based on any trigger. For this api call first you need to …
How to Create Document Using Jive Rest API Call in PHP Read More »
A jive instance support Basic and Oauth 2.0 for authentication. To access jive first register as a client with jive and install a add on. Using installed add on get client id and secret key. Let we explain procedure step by step. For this we use jive sandbox account. Step 1: Login in you jive …
Escapia Vacation rental Network provide the functionality to book rentals online. You can implement ECRN api into your website using XML/Soap api. Here i am describe you to integration with it in Soap api call. EVRN api is SOAP/XML base api. Primary prerequisites: Version: Request schema version. Default value is 1.000 ID: Escapianet username MessagePassword: …
Integration Gateway to Connect with Escapia Vacation Rental Network API Read More »
To implement UPS api on your website credential required like access number, username and password. Get access number from UPS account. Steps to Implement UPS API: Step 1: Let me explain with an HTML Form example, which you can use your website for post shipping and billing information.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
<form method="post" action="postshipping.php"> <input type="hidden" name="create_xml" value="true"> <h2>Bill To:</h2> <input type="text" name="sender_name" value="SENDER NAME" /> <br/> <input type="text" name="attention_name" value="ATTENTION NAME" /> <br/> <input type="text" name="Address_Line_1" value="ADDRESS LINE 1" /> <br/> <input type="text" name="city_name" value="CITY NAME" /> <br/> <input type="text" name="postal_code" value="POSTAL CODE" /> <br/> <input type="text" name="country_code" value="GB" /> <br/> <input type="text" name="state_code" value="STATE CODE" /> </td> <td> <h2>Ship To:</h2> <input type="text" name="recipient_name" value="RECIPIENT NAME" /> <br/> <input type="text" name="Recipient_Company_Name" value="RECIPEINT COMPANY NAME" /> <br/> <input type="text" name="Recipient_Address_Line_1" value="RECIPIENT ADDRESS LINE 1" /> <br/> <input type="text" name="Recipient_city_name" value="RECIPIENT CITY NAME" /> <br/> <input type="text" name="Recipient_postal_code" value="RECIPIENT POSTAL CODE" /> <br/> <input type="text" name="Recipient_country_code" value="GB" /> <br/> <input type="text" name="Recipient_state_code" value="RECIPIENT STATE CODE" /> <br/> <input type="text" name="Recipient_telephone" value="RECIPIENT TELEPHONE" /> <input type="submit" value="Genrate Label" /> </form> |
Step 2: Now after submit the …
How to Implement UPS API and Create Shipping Label Read More »
BestBuy api helps you getting every minute detail about the products in BestBuy store. The prerequisites to make a call to BestBuy api: 1. API key: You can easily get api key from BestBuy developer site. 2. URL to make api call: http://api.remix.bestbuy.com/v1/products 3. List of parameters to pass into the url so that to …
Code For Integrating BestBuy API Into Your Application Read More »
To access the slideshare.net api you will need api key and secret that slideshare provided to you and username and password of slideshare account.
Step 1: To create a new order in ship station using through api call in php. First get the ship station api key and merchant id to access that api data. Step 2: Use that merchant Id and api key in “OneShopAPI.php” file.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
<?php # OneShopAPI: PHP wrapper class for MCSSL.com API class OneShopAPI { var $_merchantId = "2****3"; var $_merchantKey = "898c57db*********9fab4bf"; var $_apiUri = "https://www.mcssl.com"; var $_apiParameters; function OneShopAPI($merchantId, $merchantKey, $apiUri) { $this->_merchantId = $merchantId; $this->_merchantKey = $merchantKey; $this->_apiUri = $apiUri; } # This method is used to add parameters to the # $_apiParameters array. This array is used by the # CreateRequestString() method. function AddApiParameter($parameterKey, $parameterValue) { # If $parameterKey exists, NULL it out and set the new value if (@array_key_exists($parameterKey, $this->_apiParameters)) { $this->_apiParameters[$parameterKey] = NULL; } $this->_apiParameters[$parameterKey] = $parameterValue; } # This method clears the $_apiParameters array # so it can be reused. function ClearApiParameters() { $this->_apiParameters = NULL; } # This method uses the curl object to make # a POST request to the api and return the response # from the API function SendHttpRequest($uri, $request_body) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $uri); curl_setopt($ch, CURLOPT_POSTFIELDS, $request_body); curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-POST_DATA_FORMAT: xml')); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); # TODO - SET THIS TO true FOR PRODUCTION curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec($ch); $err = curl_error($ch); curl_close($ch); if ($err) return $err; return $data; } # This method will call the SendHttpRequest method # after appending the proper information to the uri # and creating the request body function ApiRequest($path, $parameters = "") { $uri = $this->_apiUri."/API/".$this->_merchantId.$path; $request_body = $this->CreateRequestString(); $result = $this->SendHttpRequest($uri, $request_body); return($result); } # This method will take a properly formatted api uri # and create the response body then call the http request method function XLinkApiRequest($xlink, $parameters = "") { $request_body = $this->CreateRequestString(); $result = $this->SendHttpRequest($xlink, $request_body); return($result); } function CreateRequestString() { $request_body = "<Request><Key>".$this->_merchantKey."</Key>".$this->ParseApiParameters($this->_apiParameters)."</Request>"; return $request_body; } function ParseApiParameters($parameters) { $request_payload = ""; if ((!empty($parameters)) && (is_array($parameters))) { foreach($parameters as $key => $value) { if (!is_array($value)) { $request_payload .= ("<".$key.">".$value."</".$key.">\r\n"); } else { $request_payload .= "<".$key.">\r\n"; $request_payload .= $this->create_request($value); $request_payload .= "</".$key.">\r\n"; } } } return $request_payload; } function GetOrdersList() { return($this->ApiRequest("/ORDERS/LIST")); } function GetOrderById($orderId) { return($this->ApiRequest("/ORDERS/" . $orderId . "/READ")); } function GetProductsList() { return($this->ApiRequest("/PRODUCTS/LIST")); } function GetProductById($productId) { return($this->ApiRequest("/PRODUCTS/" . $productId . "/READ")); } function GetClientsList() { return($this->ApiRequest("/CLIENTS/LIST")); } function GetClientById($clientId) { return($this->ApiRequest("/CLIENTS/". $clientId ."/READ")); } function GetErrorsList() { return($this->ApiRequest("/ERRORS/LIST")); } function GetAvailableApiMethods() { return($this->ApiRequest("")); } } ?> |
Step 3: Use another file “OneShopNotificationListener.php” and change merchant id and …
How to Send Order Data in Shipstation Via API Call Read More »
To fetch the google analytics data through google api, you need to enable the google analytics api from google developer console panel. Use this link to access google api console. Find the analytics api and enable it. To enable this api, first you have to create a project in it. Just click on Create Project …
How to Use Google API to Get Google Analytics Data with PHP Read More »
Step 1: First you have to create an account in D&B using this online form http://developer.dnb.com/register-v2 and get your Username and Password. Step 2: You can get connected with D&B direct api via SOAP and REST api. Soap API Call Example: To get connected with D&B api using soap client call. Follow the below php …
How to Authenticate with D&B Direct API Web Service Read More »
Paypal Integration in PHP Step by Step. This is simple html code to use paypal payment button on website. It is recommended that use paypal sandbox account for test the payment.
Cloudshare Rest api allows to perform number of actions using web UI application. Client will do create the environments and check the status of its environments and take snapshop of them. Let me explain how to get connect or authenticate with Cloudshare rest api in PHP: Request Url: https://use.cloudshare.com/API/v2 Parameter Required for api request are: …