View step4.php
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 | |
require 'curl_request.class.php'; | |
//update this to point to your install | |
$base = 'http://iain-workingsoftware-com-au.mockups.decalcms.com'; | |
$url = $base.'/index.php?h=DecalApi'; | |
$api_key = 'qZnSiN).yH4cw(gkhPTEKx>[vsg|&mf199Y5Vi]!e5oOalKp0nW0>=&Yt3>i$=+*'; | |
//formulate the post fields for the request | |
//we'll look at the options in detail below | |
$fields = array('api_key' => $api_key, |
View step1.php
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 | |
require_once('curl_request.class.php'); | |
//update this to point to your install | |
$url = 'http://www.decalcms.com/index.php?h=DecalApi'; | |
$api_key = '597990c64261faa854805f6366f9dcc4f505ed0e'; | |
//formulate the post fields for the request | |
//we'll look at the options in detail below | |
$fields = array('api_key' => $api_key, | |
't' => 'Home',//fetch pages that use the Home |
View step1.php
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 | |
require 'curl_request.class.php'; | |
//update this to point to your install | |
$url = 'http://www.decalcms.com/index.php?h=DecalApi'; | |
$api_key = '597990c64261faa854805f6366f9dcc4f505ed0e'; | |
//formulate the post fields for the request | |
//we'll look at the options in detail below | |
$fields = array('api_key' => $api_key, | |
't' => 'Home',//fetch pages that use the Home |
View step2.php
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 | |
require_once('curl_request.class.php'); | |
//update this to point to your install | |
$url = 'http://www.decalcms.com/index.php?h=DecalApi'; | |
$api_key = '597990c64261faa854805f6366f9dcc4f505ed0e'; | |
//formulate the post fields for the request | |
//we'll look at the options in detail below | |
$fields = array('api_key' => $api_key, | |
'list' => '1', //get the first list of pages |
View step2_ex2.php
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 | |
require_once('curl_request.class.php'); | |
//update this to point to your install | |
$url = 'http://www.decalcms.com/index.php?h=DecalApi'; | |
$api_key = '597990c64261faa854805f6366f9dcc4f505ed0e'; | |
//formulate the post fields for the request | |
//we'll look at the options in detail below | |
$fields = array('api_key' => $api_key, | |
't' => 'Home', |
View step3_ex1.php
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 | |
require_once('curl_request.class.php'); | |
//update this to point to your install | |
$url = 'http://www.decalcms.com/index.php?h=DecalApi'; | |
$api_key = '597990c64261faa854805f6366f9dcc4f505ed0e'; | |
//formulate the post fields for the request | |
//we'll look at the options in detail below | |
$fields = array('api_key' => $api_key, | |
'search' => 'true', |
View step3_ex2.php
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 | |
require_once('curl_request.class.php'); | |
//update this to point to your install | |
$url = 'http://www.decalcms.com/index.php?h=DecalApi'; | |
$api_key = '597990c64261faa854805f6366f9dcc4f505ed0e'; | |
//formulate the post fields for the request | |
//we'll look at the options in detail below | |
$fields = array('api_key' => $api_key, | |
'search_more' => 'true',//returns more results than "search" |
View decal_html_structure.html
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
<div area="Homepage items"> | |
<div class="homepageItem" component="Home page item"> | |
<a href="" editable="true"> | |
<img editable="true" width="100" name="Homepage item graphic" /> | |
</a> | |
<h6 editable="true" tags="none">Your heading here</h6> | |
<p editable="true" tags="inline">Short description here</p> | |
<a class="learnMore" editable="true">Learn more</a> | |
</div> | |
</div> |
View css_styles.css
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
#home p.didYouKnow /* decal: Lightbulb graphic */ | |
{ | |
background-image:url('lightbulb.png'); | |
} | |
#home p.important /* decal: #ff0000 */ | |
{ | |
colour:red; | |
} |
View xpath_escape_test.php
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 | |
require('xpath_escape.php'); | |
$strings = array('i think therefore i am', | |
'the pimp\'s "main squeeze" was talkin\' jive'); | |
foreach($strings as $query) | |
echo xpathEscape($query).PHP_EOL; | |
/** | |
* EXPECTED OUTPUT: |
OlderNewer