Skip to content

Instantly share code, notes, and snippets.

View adamdilek's full-sized avatar
🎯
focusing

Adam Dilek adamdilek

🎯
focusing
View GitHub Profile
@adamdilek
adamdilek / example.rb
Created December 29, 2011 22:11
Example RUBY Code for Location API
require 'rubygems'
require 'json'
require 'net/http'
require 'uri'
def get(base_url)
url="#{base_url}"
response=Net::HTTP.get_response(URI.parse(url))
data=response.body
@adamdilek
adamdilek / example.php
Created December 29, 2011 22:34
Example PHP Code for Location API
<?php header("content-type: text/html; charset=utf-8"); ?>
<?php
function get($request){
$session=curl_init($request);
curl_setopt($session, CURLOPT_HEADER, false);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
$response=curl_exec($session);
curl_close($session);
return json_decode($response);
}
@adamdilek
adamdilek / Form1.cs
Created January 1, 2012 00:32
c# Example for Location API
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Web;
using System.Net;
@adamdilek
adamdilek / Query.cs
Created January 1, 2012 00:34
Query class for Location API example
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace locationApi
{
class Query
{
public string id { get; set; }
@adamdilek
adamdilek / Form1.cs
Created January 1, 2012 00:36
c# Example for University API
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Web;
using System.Net;
@adamdilek
adamdilek / Query.cs
Created January 1, 2012 00:37
Query class for University API example
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace university_api
{
class Query
{
public string id { get; set; }
@adamdilek
adamdilek / validation.php
Created January 10, 2012 20:46
Example PHP Code for Validation API
<?php header("content-type: text/html; charset=utf-8");?>
<html>
<body>
<form id="form1" name="form1" method="post" action="index.php">
<label for="textfield">Tc </label>
<input type="text" name="tc" id="textfield" />
<label for="textfield">Credit Card </label>
<input type="text" name="cc" id="textfield" />
<label for="textfield">Email </label>
<input type="text" name="email" id="textfield" />
@adamdilek
adamdilek / validation.rb
Created January 12, 2012 17:50
Example RUBY Code for Validation API
require 'json'
require 'net/http'
require 'uri'
def get(base_url)
url="#{base_url}"
response=Net::HTTP.get_response(URI.parse(url))
data=response.body
result=JSON.parse(data)
@adamdilek
adamdilek / validation.html
Created January 12, 2012 18:51
Jquery Example for Validation API
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.3/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$('#submit').click(function() {
var tc=$("#tc").val();
request = 'http://pigon.ws/validation/tc?tcno='+tc+'&callback=?';
get(request, tc);
@adamdilek
adamdilek / Form1.cs
Created January 12, 2012 19:15
C# Example for Validation API
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Web;
using System.Net;