This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$ch = curl_init('http://cts-web-api.cloudapp.net/api/hotels?destination=mgm'); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_VERBOSE, 1); | |
curl_setopt($ch, CURLOPT_HEADER, 1); | |
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Range: items=1-5')); | |
$response = curl_exec($ch); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include('inc/functions.php'); | |
$myTourOS = new TourOs(); | |
// Get a new session from Tours API and store it in out own session to use it again | |
$_SESSION['tourOsToken'] = (string)$myTourOS->getSession(); | |
output($_SESSION['tourOsToken'], 'tourOsToken'); | |
// get the detials of the departure sending our own session and the ID sent in the URI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$content = new SimpleXMLElement(file_get_contents('http://www.traveleditions.co.uk/service.asmx/ReturnTours')); | |
foreach ($content->Tours->Tour as $tour) { | |
if ($tour->Country['Name'] == 'United Kingdom') { | |
echo '<p>' . htmlentities($tour->OfferTitle, ENT_QUOTES | ENT_IGNORE, "UTF-8") . '</p>'; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" charset="utf-8"> | |
<!-- | |
function findLocation() | |
{ | |
navigator.geolocation.getCurrentPosition(foundLocation, noLocation); | |
} | |
function foundLocation(position) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There is an error with the response from the CHANGEBASKET function. | |
Sending | |
http://www.techfortesco.com/groceryapi/restservice.aspx?COMMAND=CHANGEBASKET&PRODUCTID=5556666777788888&CHANGEQUANTITY=1&SESSIONKEY={sessionKey} | |
Should not return | |
{ "StatusCode": 0, "StatusInfo": "Basket change completed successfully" } |
NewerOlder