Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whois, Alexa, API, Data-Scrapping, UI Customization and Cache Integration #90

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f6ab74d
Added new features and fixed few bugs
rohitcoder Mar 1, 2018
2c3fcb9
Updated Extension Features - Fixed Whois Popups
rohitcoder Mar 1, 2018
3336326
Updated Changes in popup.js and index.html
rohitcoder Mar 1, 2018
515b482
Add files via upload
rohitcoder Mar 1, 2018
0c995fa
Update README.md
rohitcoder Mar 1, 2018
b8adfc6
Whois data API you can host it yourself on your server
Mar 4, 2018
f1c6f1c
Added Whois API Codes
rohitcoder Mar 4, 2018
3b5b596
Updated popup.js and index.html for supporting alexa API
Mar 6, 2018
e011195
Alexa and Whois API Codes
rohitcoder Mar 6, 2018
4830e5d
Added snapshots of project for testing purpose
Mar 6, 2018
be3dc27
Added snapshots of project for testing purpose
Mar 6, 2018
e2b901d
Added snapshots of project for testing purpose
Mar 6, 2018
915fcfb
Whois API for Chrome extension
rohitcoder Mar 6, 2018
d0cabf3
Alexa API for Chrome Extension
rohitcoder Mar 6, 2018
d034c59
Added Alexa API
rohitcoder Mar 6, 2018
e0451da
Added Alexa API
rohitcoder Mar 6, 2018
79a0acf
Added Alexa API
rohitcoder Mar 6, 2018
791d0ae
Fixed some 500 Internal server errors
rohitcoder Mar 8, 2018
da65a32
Design issue fixed and fixed some bugs related to about button and se…
Mar 18, 2018
61acbf6
Merge branch 'master' of http://github.com/rohitcoder/wayback-machine…
Mar 18, 2018
dc84b21
Delete index2.html
rohitcoder Mar 18, 2018
dbd1901
Updated Complete UI and Loading Screen
rohitcoder Mar 18, 2018
26c3ad4
Now Supporting Localized Cache
rohitcoder Mar 23, 2018
794e0e5
Delete popup.js
rohitcoder Mar 23, 2018
82cb456
Now Supporting Localized Cache
rohitcoder Mar 23, 2018
ce0a27f
Added auto cache feature - Faster than ever
rohitcoder Mar 23, 2018
6cda1c0
Update Files for Supporting Customizations
rohitcoder Mar 29, 2018
27c7a45
Updated Codes for Customization and Caching System
rohitcoder Mar 29, 2018
73f16b5
Integrated Whois Cache for fast Access
rohitcoder Apr 1, 2018
44af703
Search list UI Updated
rohitcoder Apr 6, 2018
56c670a
Delete manifest.json.bak
rohitcoder Apr 6, 2018
0119eec
Delete index.html.bak
rohitcoder Apr 6, 2018
b3f0faf
Replaced Internal Stylesheet with External
rohitcoder Apr 6, 2018
859b0e1
New Updated Custom.css after modification
rohitcoder Apr 6, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,23 @@ AGPL-3
- Abhishek Das, @abhidas
- Vangelis Banos, @vbanos
- Rodden Kerry, @kerryrodden

## Updates
- Updated popup.js and index.html file
- Removed Whois Popup
- Added JSON Api Based result filteration rather than opening popups
- No third party Whois data API (You can host it yourself created using html_dom_parser.php)
- Own Hosted Whois API -> https://rohitcoder.cf/research/whois_api/?site=github.com
- Own Hosted Alexa API -> https://rohitcoder.cf/research/whois_api/alexa.php?site=github.com
- Smoothness in Whois & Alexa tab

I also uploaded my whois data API code and used lib simple_html_dom in "host" folder these files should be uploaded on your server and this will act like a API for your extension. After setting up this api don't forget to change API Link from popup.js file

![Snapshot 1](https://i.imgur.com/nkuFIWT.png)
![Snapshot 2](https://i.imgur.com/jLnON9U.png)
![Snapshot 3](https://i.imgur.com/BkObDFU.png)
![Snapshot 4](https://i.imgur.com/chp8CHw.png)

## A Step Towards GsoC2018 ;)

For more check snap_shots directory of this project.
260 changes: 260 additions & 0 deletions css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@

a,a:hover{text-decoration:none;cursor:pointer;}
.button,.buttonA,.button-tweet{
width:90%;
outline:none;
font-family:arial;
}
.button-fancy{
background-color:tomato;
color:white;
font-size:17px;
padding:3px;
border-radius:20px;
border:2px solid tomato;;
transition:background-color,.4s;
border-radius:20px;
}
.button-simple{
color:#605d5d;
background-color:white;
font-size:17px;font-weight: 200;
border-radius:10px;
padding:3px;
border:2px solid #605d5d;
transition:background-color,.4s;
transition:border,.4s
}
.button-fancy:hover{
color:black;
background-color:white;
}
.button:hover{

color:white;
background-color:#9575CD;
border:2px solid #9575CD;
}
.button-tweet,.button-tweet:hover{
color:white;
border-radius: 10px;
background-color:#448AFF;
border:2px solid #448AFF;

}
.search-bar{
padding:6px;
width:90%;
border:2px solid #3F51B5;
color:black;
border-radius:3px;
transition:background-color,.6s;
}
.search-bar:focus{
outline:none;
background-color:black;
color:black;
border:2px solid black;
font-size:18;
}.dropdown-menu>li>a {
display: block;
padding: 3px 32px;
border-bottom: 1px solid black;
clear: both;
font-weight: 400;
line-height: 1.42857143;
color: #333;
white-space: nowrap;
}.metrics-title, h5.font-1{
font-size: 14px;
font-weight:bold;
color:blue;
}strong.metrics-data{
font-weight:regular;
font-size:16px;
}
a[rel=nofollow]{
display:none;
}
table.subdo_table>tbody>td, table.subdo_table>thead>th{width:50%;}
.global_stats a,.word-wrap a, .upstream_sites a,.similar_sites a {
pointer-events: none;
cursor: default;
}.spark-bar{
display:none;
}.change-down {
padding:2px;border-radius:2px;
background: #E41F26 no-repeat 5px 50%;
color: #fff;
}.metrics-data, .metrics-pending {
font-size: 24px;
font-family: "Open Sans",Helvetica,Arial,sans-serif;
color: #333;
}.change-up {
padding:2px;border-radius:2px;
background: #2bbb0f no-repeat 5px 50%;
color: #fff;
}
.df-heading {
font-size: 15px;
font-weight: bold;
color:blue;
text-transform: uppercase;
padding: 5px 8px;
}.df-block {
margin-bottom: 15px;
background-color: #eef7fe;
font-size: 13px;
padding: 8px;
border: 1px solid #a4d4fa;
border-radius: 8px;
}.df-row {
padding: 3px 8px;
}.df-label {
float: left;
font-weight: bold;
width: 116px;
}.df-value {
float: left;
width: 560px;
}.clear {
clear: both;
}
/*
ul li { list-style-type: none;
list-style-position:inside;
margin:0;
padding:0; }
*/
li{
margin:0px 0px 0px -18px;
padding: 0px;
}

tr.spaceUnder > td
{
padding-bottom: 0.5em;
}
.container {
margin: 2px;
width: auto;
height: 45px;
line-height: 45px;
text-align: center;
}
.resize_fit_center {
max-width:100%;
max-height:100%;
vertical-align: middle;
}

a.btn-social,
.btn-social
{
border-radius: 50%;
color: #ffffff !important;
display: inline-block;
height: 54px;
line-height: 54px;
margin: 8px 4px;
text-align: center;
text-decoration: none;
transition: background-color .3s;
webkit-transition: background-color .3s;
width: 54px;
}

.fa{
margin-top:6px;
}
.btn-social .fa,.btn-social i
{
backface-visibility: hidden;
moz-backface-visibility: hidden;
ms-transform: scale(1);
o-transform: scale(1);
transform: scale(1);
transition: all .25s;
webkit-backface-visibility: hidden;
webkit-transform: scale(1);
webkit-transition: all .25s;
}
.btn-social:hover,.btn-social:focus
{
color: #fff;
outline: none;
text-decoration: none;
}
.btn-social:hover .fa,.btn-social:focus .fa,.btn-social:hover i,.btn-social:focus i
{
ms-transform: scale(1.3);
o-transform: scale(1.3);
transform: scale(1.3);
webkit-transform: scale(1.3);
}
.btn-social.btn-xs
{
font-size: 9px;
height: 24px;
line-height: 13px;
margin: 6px 2px;
width: 24px;
}
.btn-social.btn-sm
{
font-size: 13px;
height: 36px;
line-height: 18px;
margin: 6px 2px;
width: 36px;
}
.btn-social.btn-lg
{
font-size: 22px;
height: 72px;
line-height: 4px;
margin: 10px 6px;
width: 72px;
}

.btn-behance
{
background-color: #1769ff;
}
.btn-behance:hover
{
background-color: #4a8aff;
}
.btn-facebook
{
background-color: #3b5998;
}
.btn-facebook:hover
{
background-color: #4c70ba;
}
.btn-google-plus
{
background-color: #dd4b39;
}
.btn-google-plus:hover
{
background-color: #e47365;
}
.btn-twitter
{
background-color: #55acee;
}
.btn-twitter:hover
{
background-color: #83c3f3;
}

.btn-linkedin
{
background-color: #1E88E5;
}
.btn-linkedin:hover
{
background-color: #4a8aff;
}
59 changes: 59 additions & 0 deletions host/alexa.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?php
/*
* Credits
* @rohitcoder - Rohit Kumar
* Website - https://rohitcoder.cf
* Profile - https://github.com/rohitcoder
*/
header("Content-Type: application/json");
include('simple_html_dom.php');
$link = $_GET['site'];
$url = 'https://www.alexa.com/siteinfo/'.$link;
$html = file_get_html($url);
$array = array();
$vala = "https://traffic.alexa.com/graph?o=lt&y=t&b=ffffff&n=666666&f=999999&p=4e8cff&r=1y&t=2&z=30&c=1&h=150&w=340&u=".$link;
$array['global_graph'] = $vala;
$valb = $html->find('.metrics-data', 0)->innertext;
$array['global_rank'] = $valb;
$tempa = $html->find('.metrics-title', 1)->innertext;
$tempa = str_get_html($tempa);
foreach($tempa->find("a") as $ht) {
$data = $ht->innertext;
}
$tempa = $data;
$valc = $html->find('.metrics-data', 1)->innertext;
$tempb = $html->find('.countryRank',0)->innertext;
if(!empty($tempb)){
$tempb = str_get_html($tempb);
foreach($tempb->find("img") as $ht) {
$datac = $ht->attr['src'];
}
$tempb = $datac;
}
$array['country']['name'] = $tempa;
$array['country']['rank'] = $valc;
$array['country']['flag'] = "https://www.alexa.com/".$datac;
$vald = str_replace("/http","http",str_replace("Rank in Country", "Rank",str_replace("Percent of Visitors","Visitors",str_replace("/topsites/countries/","http://alexa.com/topsites/countries/",str_replace("images/flags","http://alexa.com/images/flags",$html->find('#demographics_div_country_table', 0)->innertext)))));
$array['demographics_country_table'] = "<table class='table global_stats' width='100%'>".$vald."</table>";
$vale = $html->find('#engagement-content', 0)->innertext;
$array['engage_content'] = $vale;
$valf = "https://traffic.alexa.com/graph?o=lt&y=q&b=ffffff&n=666666&f=999999&p=4e8cff&r=1y&t=2&z=0&c=1&h=150&w=340&u=".$link;
$array['search_graph'] = $valf;
$valg = $html->find('.sitemetrics-col', 0)->innertext;
$array['search_data'] = $valg;
$valh = $html->find('#keywords_top_keywords_table', 0)->innertext;
$array['top_search_keywords'] = str_replace("Percent of Search Traffic","Traffic","<table class='table global_stats' width='100%'>".$valh."</table>");
$vali = $html->find('#keywords_upstream_site_table', 0)->innertext;
$array['upstream_sites'] = "<table class='upstream_sites table'>".str_replace("Percent of Unique Visits","Percent",$vali)."</table>";
$valj = $html->find('.box1-med3', 0)->innertext;
$array['count_linkin_sites'] = $valj;
$valk = $html->find('#linksin_table', 0)->innertext;
$array['linkin_sites'] = "<table class='table'>".str_replace("Page","",$valk)."</table>";
$valm = $html->find('#audience_overlap_table', 0)->innertext;
$array['similar_sites'] = "<table class='similar_sites table'>".str_replace("Percent of Unique Visits","Percent",$valm)."</table>";
$valn = $html->find('#subdomain_table', 0)->innertext;
$array['subdomains'] = "<table class='subdo_table'>".str_replace("<td","<td width='100px'",str_replace("Percent of Visitors","Visitors",$valn))."</table><Br>";
$valo = $html->find('#loadspeed-panel-content', 0)->innertext;
$array['load_speed'] = $valo;
echo json_encode($array, JSON_PRETTY_PRINT);
?>
Loading