cranklin
file 148 lines (139 sloc) 4.022 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<?php
$url = "http://api.wolframalpha.com/v2/query?input=what+day+is+it+today&appid=YOUR_APP_ID_HERE&format=plaintext&podtitle=Result";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
ob_start();
curl_exec($ch);
curl_close($ch);
$contents = ob_get_contents();
ob_end_clean();
echo $contents;


/*
<?xml version='1.0' encoding='UTF-8'?>
<queryresult success='true'
error='false'
numpods='6'
datatypes='City,Country,Leader,People,USState'
timedout=''
timing='2.685'
parsetiming='0.436'
parsetimedout='false'
recalculate=''
id='MSP664419ii17e963a79ch500004cbei5i8b191b862&amp;s=23'
related='http://www3.wolframalpha.com/api/v2/relatedQueries.jsp?id=MSP664519ii17e963a79ch5000026264d1284ce0966&amp;s=23'
version='2.1'>
<pod title='Input interpretation'
scanner='Identity'
id='Input'
position='100'
error='false'
numsubpods='1'>
<subpod title=''>
<plaintext>United States | President</plaintext>
</subpod>
</pod>
<pod title='Result'
scanner='Identity'
id='Result'
position='200'
error='false'
numsubpods='1'
primary='true'>
<subpod title=''
primary='true'>
<plaintext>Barack Obama</plaintext>
</subpod>
</pod>
<pod title='Basic information'
scanner='Data'
id='BasicInformation:LeaderData'
position='300'
error='false'
numsubpods='1'>
<subpod title=''>
<plaintext>official position | President (44th)
country | United States
political affiliation | Democrat
start date | January 20, 2009 (2 years 11 months 23 days ago)</plaintext>
</subpod>
</pod>
<pod title='Sequence'
scanner='Data'
id='LeaderSequence:LeaderData'
position='400'
error='false'
numsubpods='1'>
<subpod title=''>
<plaintext>January 2009 to present | Barack Obama (Democrat)
January 2001 to January 2009 (8 years) | George W. Bush (Republican)
January 1993 to January 2001 (8 years) | Bill Clinton (Democrat)
January 1989 to January 1993 (4 years) | George H.W. Bush (Republican)
January 1981 to January 1989 (8 years) | Ronald Reagan (Republican)</plaintext>
</subpod>
<states count='1'>
<state name='More'
input='LeaderSequence:LeaderData__More' />
</states>
</pod>
<pod title='Personal information'
scanner='Data'
id='LeaderDataPersonalInformationPod:PeopleData'
position='500'
error='false'
numsubpods='2'>
<subpod title=''>
<plaintext>full name | Barack Hussein Obama II
date of birth | August 4, 1961 (age: 50 years)
place of birth | Honolulu, Hawaii, United States</plaintext>
</subpod>
<subpod title='Timeline'>
<plaintext></plaintext>
</subpod>
</pod>
<pod title='Image'
scanner='Data'
id='Image:PeopleData'
position='600'
error='false'
numsubpods='1'>
<subpod title=''>
<plaintext></plaintext>
</subpod>
</pod>
<sources count='3'>
<source url='http://www.wolframalpha.com/sources/CountryDataSourceInformationNotes.html'
text='Country data' />
<source url='http://www.wolframalpha.com/sources/LeaderDataSourceInformationNotes.html'
text='Leader data' />
<source url='http://www.wolframalpha.com/sources/PeopleDataSourceInformationNotes.html'
text='People data' />
</sources>
</queryresult>





<?xml version='1.0' encoding='UTF-8'?>
<queryresult success='true'
error='false'
numpods='1'
datatypes='City,DateObject,Holiday'
timedout=''
timing='1.989'
parsetiming='0.198'
parsetimedout='false'
recalculate=''
id='MSP360619ii19h8h5gc645100005a8i6b127h4f978b&amp;s=64'
related='http://www4c.wolframalpha.com/api/v2/relatedQueries.jsp?id=MSP360719ii19h8h5gc6451000014d96b6fd2a242aa&amp;s=64'
version='2.1'>
<pod title='Result'
scanner='Identity'
id='Result'
position='200'
error='false'
numsubpods='1'
primary='true'>
<subpod title=''
primary='true'>
<plaintext>Thursday, January 12, 2012</plaintext>
</subpod>
</pod>
</queryresult>
*/
?>

Markdown Cheat Sheet

Format Text

Headers

# This is an <h1> tag
## This is an <h2> tag
###### This is an <h6> tag

Text styles

*This text will be italic*
_This will also be italic_
**This text will be bold**
__This will also be bold__

*You **can** combine them*

Lists

Unordered

* Item 1
* Item 2
  * Item 2a
  * Item 2b

Ordered

1. Item 1
2. Item 2
3. Item 3
   * Item 3a
   * Item 3b

Miscellaneous

Images

![GitHub Logo](/images/logo.png)
Format: ![Alt Text](url)

Links

http://github.com - automatic!
[GitHub](http://github.com)

Blockquotes

As Kanye West said:

> We're living the future so
> the present is our past.

Code Examples in Markdown

Syntax highlighting with GFM

```javascript
function fancyAlert(arg) {
  if(arg) {
    $.facebox({div:'#foo'})
  }
}
```

Or, indent your code 4 spaces

Here is a Python code example
without syntax highlighting:

    def foo:
      if not bar:
        return true

Inline code for comments

I think you should use an
`<addr>` element here instead.
Something went wrong with that request. Please try again. Dismiss

Looking for the GitHub logo?