This file contains hidden or 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 header("content-type: text/html; charset=utf-8");?> | |
<html> | |
<body> | |
<form id="form1" name="form1" method="post" action="json.php"> | |
<label for="textfield">İsim </label> | |
<input type="text" name="name" id="textfield" /> | |
<input type="submit" name="button" id="button" value="Submit" /> | |
</form> | |
<body> | |
</html> |
This file contains hidden or 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
source 'http://rubygems.org' | |
gem 'rails', '3.1.0' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'mysql2' | |
gem 'pg' | |
gem 'execjs' |
This file contains hidden or 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
C:\Projects\api-app>git push heroku | |
Counting objects: 24, done. | |
Delta compression using up to 2 threads. | |
Compressing objects: 100% (20/20), done. | |
Writing objects: 100% (20/20), 1.99 KiB, done. | |
Total 20 (delta 16), reused 0 (delta 0) | |
-----> Heroku receiving push | |
-----> Removing .DS_Store files | |
-----> Ruby/Rails app detected |
This file contains hidden or 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
require 'rubygems' | |
require 'json' | |
require 'net/http' | |
@base_url="http://pigon.ws/name/show?name=" | |
def find_name_gender(name) | |
url="#{@base_url}#{name}" | |
resp=Net::HTTP.get_response(URI.parse(url)) | |
data=resp.body | |
result=JSON.parse(data) | |
puts result['status'] |
This file contains hidden or 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
<html> | |
<head> | |
<script type="text/javascript" charset="utf-8"> | |
function callTheJsonp() | |
{ | |
var name = document.getElementById('name').value; | |
var request = "http://pigon.ws/name/show?callback=parsedata&name="; | |
var url= request+name; | |
var script = document.createElement('script'); | |
script.setAttribute('src', url); |
This file contains hidden or 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
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; |
This file contains hidden or 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 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); | |
} |
This file contains hidden or 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
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 |
This file contains hidden or 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
<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"> | |
function faculty(university_id){ | |
$.getJSON('http://pigon.ws/university/faculties?university_id='+university_id+'&callback=?', | |
function(data){ | |
$.each(data,function(i,item){ | |
$('#faculty').append("<option value="+item.id+">"+item.name+"</option>"); |
This file contains hidden or 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
<html> | |
<head> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.2.3/jquery.min.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
function districts(city_id){ | |
$.getJSON('http://pigon.ws/location/districts?city_id='+city_id+'&callback=?', | |
function(data){ | |
$.each(data,function(i,item){ |