diff --git a/index.php b/index.php
new file mode 100644
index 0000000..62af7d5
--- /dev/null
+++ b/index.php
@@ -0,0 +1,251 @@
+(round($pagesindexed/10,0,PHP_ROUND_HALF_DOWN)+1) or $pp<0){
+ echo "".$pp."
";
+ header("Refresh:0; url=/bot_trap/?pp=".$pp);
+ exit;
+ }
+}else{$pp=1;}
+if (isset($_GET['qq'])){
+ $quary=$qq=trim($_GET['qq']);
+// $quary=strtolower($qq);
+// $quary=trim(htmlentities($quary,ENT_QUOTES|ENT_HTML5,'UTF-8',true));
+}
+$pages=paging('/',$pp,$pagesindexed,$qq,$offset);
+$sql="SELECT * FROM tidysearch.sites WHERE sites.hits>0;";
+$ret=pg_query($con,$sql);
+while($row=pg_fetch_array($ret)){if (isset($row['hits'])){$THits=$THits+$row['hits'];}}
+$Websites=pg_num_rows(pg_query($con,$sql));
+$SITE="TidySearch";
+$keywords="Fediverse, Decentralized, Federated, Search, Engine, MPAQ, ".$SITE."";
+$desc="Decentralized Search Engine by MPAQ like the Fediverse AKA ActivityPub AKA Mastodon and XMPP. ".$SITE." has indexed ".$Websites." websites.";
+$site_addy="http://search.mpaq.org";
+$title=$SITE." Indexed Websites: ".$Websites;
+unset($sql,$res);
+$found=0;
+echo "
+
+
+ ![]() "; +?> + |
+
+
+
+ + |
+
+
+
+ ";
+ $found++;
+ }else{$data['share']=NULL;}
+ display($data);unset($tmp1,$tmp2,$data);
+ memory_get_usage();
+ }
+}else{
+/* Database searching takes place here but still needs work */
+ $LINE=0;
+ if (isset($pp)){$offset=$pp*10;}else{$offset=0;}
+ $sql="select * from tidysearch.pages where kwords like '% ".$quary." %' ORDER BY pages.date DESC, pages.idex DESC LIMIT 10 OFFSET ".$offset.";";
+ $test=pg_fetch_array(pg_query($con,$sql));
+ if ($test==false){
+ $sql="select * from tidysearch.pages where kwords like '%".$quary." %' ORDER BY pages.date DESC, pages.idex DESC LIMIT 10 OFFSET ".$offset.";";
+ $test=pg_fetch_array(pg_query($con,$sql));
+$LINE=__LINE__;
+ }
+ if ($test==false){
+ $sql="select * from tidysearch.pages where kwords like '% ".$quary."%' ORDER BY pages.date DESC, pages.idex DESC LIMIT 10 OFFSET ".$offset.";";
+ $test=pg_fetch_array(pg_query($con,$sql));
+$LINE=__LINE__;
+ }
+ if ($test==false){
+ $sql="select * from tidysearch.pages where kwords like '%".$quary."%' ORDER BY pages.date DESC, pages.idex DESC LIMIT 10 OFFSET ".$offset.";";
+ $test=pg_fetch_array(pg_query($con,$sql));
+$LINE=__LINE__;
+ }
+ if ($test==false){
+ $sql="select * from tidysearch.pages where title like '%".$quary."%' ORDER BY pages.date DESC, pages.idex DESC LIMIT 10 OFFSET ".$offset.";";
+ $test=pg_fetch_array(pg_query($con,$sql));
+$LINE=__LINE__;
+ }
+ if ($test==false){
+ $sql="select * from tidysearch.pages where description like '%".$quary."%' ORDER BY pages.date DESC, pages.idex DESC LIMIT 10 OFFSET ".$offset.";";
+ $test=pg_query($con,$sql);
+ $test=pg_fetch_array(pg_query($con,$sql));
+$LINE=__LINE__;
+ }
+ if ($test==true){
+ $ret=pg_query($con,$sql);
+ }else{
+ echo "
+
+
+ ";
+ $found++;
+ }else{$data['share']=NULL;}
+ $data['title']=highlightStr($data['title'],$quary,"blue");
+ $data['description']=highlightStr($data['description'],$quary,"red");
+ display($data);unset($tmp1,$tmp2,$data);
+ memory_get_usage();
+ }
+}
+$botZero="