Skip to content

Instantly share code, notes, and snippets.

View kinlane's full-sized avatar

Kin Lane kinlane

View GitHub Profile
@kinlane
kinlane / citygrid-api-places-api-search-sample.rhtml
Created January 16, 2012 07:18
CityGrid Places API - Search Sample
<%
require 'net/http'
qs = ENV['QUERY_STRING']
qf={}
for f in qs.split("&")
s = f.split("=")
qf[s[0]] = s[1]
end
@kinlane
kinlane / citygrid-api-places-api-detail-sample.rhtml
Created January 16, 2012 07:21
CityGrid Places API - Detail Sample
<%
require 'net/http'
qs = ENV['QUERY_STRING']
qf={}
for f in qs.split("&")
s = f.split("=")
qf[s[0]] = s[1]
end
@kinlane
kinlane / citygrid-jquery-embed-v1.html
Created March 14, 2012 04:40
CityGrid Jquery Embed - v1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CityGrid Jquery Embed Directory</title>
</head>
<body>
<!-- Begin CityGrid Embed Widget--->
<!--JQuery-->
@kinlane
kinlane / CityGrid-Places-That-Pay-Tracker.php
Created March 29, 2012 21:40
CityGrid Places that Pay Tracker
<!-- Begin CityGrid Tracker -->
<script type="text/javascript">
var _csv = {};
_csv['action_target'] = 'listing_profile';
_csv['listing_id'] = '<?php echo $id; ?>';
_csv['publisher'] = '<?php echo $publishercode; ?>';
_csv['reference_id'] = '<?php echo $reference_id; ?>';
_csv['placement'] = 'hyp3rl0cal_detail';
_csv['ua'] = '<?php echo $_SERVER['HTTP_USER_AGENT']; ?>';
_csv['i'] = '<?php echo $impression_id; ?>';
@kinlane
kinlane / m-upload.php
Created April 6, 2012 07:04
iDrive - Upload
<?php
$uid = "[your username]";
$pwd = "[your password]";
$certpath = '[path to your cert]';
$PostFields = 'uid=' . $uid. '&pwd=' . $pwd;
// Get Server Address
$ch = curl_init();
@kinlane
kinlane / getServerAddress.php
Created April 13, 2012 04:10
IDrive - EVS - REST API - getServerAddress
$uid = "[your IDrive user ID]";
$pwd = "[your IDrive user password]";
$crtpath = "[path to your local cert]";
$url = "https://evs.idrive.com/evs";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url.'/getServerAddress');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
@kinlane
kinlane / getServerAddress.java
Created April 13, 2012 04:13
IDrive - EVS - REST API - getServerAddress
String params=&quot;uid=&quot;+user+&quot;&amp;pwd=&quot;+pass;
URL evsURL = new URL(&quot;https://evs.idrive.com/evs/getServerAddress&quot;);
HttpURLConnection con = (HttpURLConnection)evsURL.openConnection();
con.setRequestMethod(&quot;POST&quot;);
con.setRequestProperty(&quot;Content-Type&quot;,&quot;application/x-www-form-urlencoded; charset=UTF-8&quot;);
@kinlane
kinlane / validateAccount.php
Created April 13, 2012 04:34
IDrive - EVS - REST API - validateAccount
$uid = "[your IDrive user ID]";
$pwd = "[your IDrive user password]";
$crtpath = "[a path to your local cert]";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $this->data['weburl'].'/evs/validateAccount');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
@kinlane
kinlane / validateAccount.java
Created April 13, 2012 04:35
IDrive - EVS - REST API - validateAccount
String params=&quot;uid=&quot;+user+&quot;&amp;pwd=&quot;+password;
try
{
URL evsURL = new URL(&quot;https://&lt;server address&gt;/evs/accountValidate&quot;);
HttpURLConnection con = (HttpURLConnection)evsURL.openConnection();
@kinlane
kinlane / configureAccount.php
Created April 13, 2012 04:43
IDrive - EVS - REST API - configureAccount
$uid = "[your IDrive user ID]";
$pwd = "[your IDrive user password]";
$crtpath = "[a path to your local cert]";
$enctype = "default";
$pvtkey = "";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $this->data['weburl'].'/evs/configureAccount');