-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
92 lines (75 loc) · 2.03 KB
/
index.php
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
<?php
require_once 'bing.class.php';
if(isset($_GET['q'])) {
$q = $_GET['q'];
} else { $q = 'MooTools'; }
$appid = '49EB4B94127F7C7836C96DEB3F2CD8A6D12BDB71';
$obj = new Bing($appid);
$obj->search( $q );
$out = $obj->getHTML();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Microsoft's Bing Search</title>
<style type="text/css">
body {
margin: 10px;
font-family: Helvetica, Arial;
}
a {
color: navy;
}
.outer {
padding: 10px 10px 0 10px;
background: #eee;
}
input.gsc-input {
border-color: #BCCDF0;
font-size: 1.5em;
background-image: none !important;
padding: 0.5em !important;
border-radius: 10px;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
color: #555;
box-sizing: border-box;
width: 67%;
border: 1px solid #fff
}
input.gsc-input:hover {
color: black;
border-color: black;
border: 1px solid #000
}
input.gsc-search-button {
border-color: #666666;
background-color: #CECECE;
font-size: 2em;
height: auto;
}
.yui-g{
background: #eee;
padding: 10px;
}
</style>
</head>
<body>
<div id="doc2" class="yui-t7">
<div id="hd" role="banner"><h1>Bing Search</h1></div>
<div id="bd" role="main">
<div class="yui-g">
<div>
<form id="googleform">
<label for="q">Bing</label>
<input class="gsc-input" type="text" id="q" name="q" placeholder="" required autocomplete="off" value="<?php if($_GET['q']) echo$_GET['q'] ;?>"/>
<input class="gsc-search-button" type="submit" id="send" value="Go!"/>
</form>
</div>
</div>
<div id="results"><?php echo$out; ?></div>
</div>
<div id="ft" role="contentinfo"><p>© 2013 Some Rights Reserved | created by @<a href="http://twitter.com/thinkphp">thinkphp</a> | Download on <a href="http://github.com/thinkphp/bing.php">GitHub </a></p></div>
</div>
</body>
</html>