{"id":3055,"date":"2022-09-11T19:15:24","date_gmt":"2022-09-11T14:15:24","guid":{"rendered":"https:\/\/www.edopedia.com\/blog\/?p=3055"},"modified":"2022-09-11T19:15:26","modified_gmt":"2022-09-11T14:15:26","slug":"website-alexa-rank-checker-using-php","status":"publish","type":"post","link":"https:\/\/www.edopedia.com\/blog\/website-alexa-rank-checker-using-php\/","title":{"rendered":"Website Alexa Rank Checker Using PHP [Latest Method]"},"content":{"rendered":"\n<p>In this tutorial, I will teach you <strong>how to check the Alexa Rank of any website using PHP<\/strong>. You will get the full <strong>source code<\/strong> of this latest <strong>Alexa Rank Checker<\/strong> tool.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">PHP Alexa Rank Checker Source Code<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">index.php<\/h3>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;php&quot;,&quot;mime&quot;:&quot;text\/x-php&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;PHP&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;php&quot;}\">&lt;?php\nfunction alexaRank($url)\n{\n $alexaData = simplexml_load_file(&quot;http:\/\/data.alexa.com\/data?cli=10&amp;url=&quot;.$url);\n $alexa['globalRank'] =  isset($alexaData-&gt;SD-&gt;POPULARITY) ? $alexaData-&gt;SD-&gt;POPULARITY-&gt;attributes()-&gt;TEXT : 0 ;\n $alexa['CountryRank'] =  isset($alexaData-&gt;SD-&gt;COUNTRY) ? $alexaData-&gt;SD-&gt;COUNTRY-&gt;attributes() : 0 ;\n return json_decode(json_encode($alexa), TRUE);\n}\n \nif(isset($_GET['siteinfo']))\n{\n $url = $_GET['siteinfo'];\n $alexa = alexaRank($url);\n $globalRank =&quot;Global Alexa Rank of &quot;.$_GET['siteinfo'].&quot; is : &quot;.$alexa['globalRank'][0];\n $countryRank =&quot;Alexa Rank In &quot;.$alexa['CountryRank']['@attributes']['NAME'].&quot; is : &quot;.$alexa['CountryRank']['@attributes']['RANK'];\n}\n?&gt;\n \n&lt;html&gt;\n&lt;head&gt;\n&lt;title&gt;Alexa Rank Checker By Edopedia&lt;\/title&gt;\n&lt;style&gt;\nbody\n{\n text-align:center;\n width:100%;\n margin:0 auto;\n padding:0px;\n font-family:helvetica;\n background-color:#424242;\n}\n#wrapper\n{\n text-align:center;\n margin:0 auto;\n padding:0px;\n width:995px;\n}\n#rank_form p\n{\n color:white;\n font-size:16px;\n font-weight:bold;\n}\n#rank_form input[type=&quot;text&quot;]\n{\n width:250px;\n height:40px;\n border:none;\n padding-left:10px;\n font-size:16px;\n}\n#rank_form input[type=&quot;submit&quot;]\n{\n background-color:#2E2E2E;\n height:42px;\n border:none;  \n color:white;\n width:50px;\n font-size:16px;\n}\n.rank_para\n{\n color:white;\n}\n &lt;\/style&gt;\n \n&lt;\/head&gt;\n&lt;body&gt;\n&lt;div id=&quot;wrapper&quot;&gt;\n \n &lt;form method=&quot;get&quot; id=&quot;rank_form&quot;&gt;\n  &lt;p&gt;Website Alexa Rank Checker&lt;\/p&gt;\n  &lt;input type=&quot;text&quot; name=&quot;siteinfo&quot; placeholder=&quot;https:\/\/example.com&quot; required=&quot;required&quot;\/&gt;\n  &lt;input type=&quot;submit&quot; value=&quot;Find&quot;&gt;\n&lt;\/form&gt;\n \n &lt;p class=&quot;rank_para&quot;&gt;&lt;?php echo $globalRank; ?&gt;&lt;\/p&gt;\n &lt;p class=&quot;rank_para&quot;&gt;&lt;?php echo $countryRank;?&gt;&lt;\/p&gt;\n \n&lt;\/div&gt;\n&lt;\/body&gt;\n&lt;center&gt;Copyright By Edopedia.com&lt;\/center&gt;\n&lt;\/html&gt;<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, I will teach you how to check the Alexa Rank of any website using PHP. You will get the full source code of this latest Alexa Rank Checker tool. PHP Alexa Rank Checker Source Code index.php<\/p>\n","protected":false},"author":1,"featured_media":1762,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[112],"tags":[],"class_list":["post-3055","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Website Alexa Rank Checker Using PHP [Latest Method]<\/title>\n<meta name=\"description\" content=\"In this tutorial, I will teach you how to check the Alexa Rank of any website using PHP. You will get the full source code of this latest Alexa Rank\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.edopedia.com\/blog\/website-alexa-rank-checker-using-php\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Website Alexa Rank Checker Using PHP [Latest Method]\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, I will teach you how to check the Alexa Rank of any website using PHP. You will get the full source code of this latest Alexa Rank\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.edopedia.com\/blog\/website-alexa-rank-checker-using-php\/\" \/>\n<meta property=\"og:site_name\" content=\"Edopedia\" \/>\n<meta property=\"article:author\" content=\"trulyfurqan\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-11T14:15:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-09-11T14:15:26+00:00\" \/>\n<meta name=\"author\" content=\"Furqan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Furqan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Website Alexa Rank Checker Using PHP [Latest Method]","description":"In this tutorial, I will teach you how to check the Alexa Rank of any website using PHP. You will get the full source code of this latest Alexa Rank","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.edopedia.com\/blog\/website-alexa-rank-checker-using-php\/","og_locale":"en_US","og_type":"article","og_title":"Website Alexa Rank Checker Using PHP [Latest Method]","og_description":"In this tutorial, I will teach you how to check the Alexa Rank of any website using PHP. You will get the full source code of this latest Alexa Rank","og_url":"https:\/\/www.edopedia.com\/blog\/website-alexa-rank-checker-using-php\/","og_site_name":"Edopedia","article_author":"trulyfurqan","article_published_time":"2022-09-11T14:15:24+00:00","article_modified_time":"2022-09-11T14:15:26+00:00","author":"Furqan","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Furqan","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.edopedia.com\/blog\/website-alexa-rank-checker-using-php\/#article","isPartOf":{"@id":"https:\/\/www.edopedia.com\/blog\/website-alexa-rank-checker-using-php\/"},"author":{"name":"Furqan","@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/person\/3951cb19e3aa56df09e408c98aa02339"},"headline":"Website Alexa Rank Checker Using PHP [Latest Method]","datePublished":"2022-09-11T14:15:24+00:00","dateModified":"2022-09-11T14:15:26+00:00","mainEntityOfPage":{"@id":"https:\/\/www.edopedia.com\/blog\/website-alexa-rank-checker-using-php\/"},"wordCount":48,"commentCount":0,"publisher":{"@id":"https:\/\/www.edopedia.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.edopedia.com\/blog\/website-alexa-rank-checker-using-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/02\/default_featured_image.jpg","articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.edopedia.com\/blog\/website-alexa-rank-checker-using-php\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.edopedia.com\/blog\/website-alexa-rank-checker-using-php\/","url":"https:\/\/www.edopedia.com\/blog\/website-alexa-rank-checker-using-php\/","name":"Website Alexa Rank Checker Using PHP [Latest Method]","isPartOf":{"@id":"https:\/\/www.edopedia.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.edopedia.com\/blog\/website-alexa-rank-checker-using-php\/#primaryimage"},"image":{"@id":"https:\/\/www.edopedia.com\/blog\/website-alexa-rank-checker-using-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/02\/default_featured_image.jpg","datePublished":"2022-09-11T14:15:24+00:00","dateModified":"2022-09-11T14:15:26+00:00","description":"In this tutorial, I will teach you how to check the Alexa Rank of any website using PHP. You will get the full source code of this latest Alexa Rank","breadcrumb":{"@id":"https:\/\/www.edopedia.com\/blog\/website-alexa-rank-checker-using-php\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.edopedia.com\/blog\/website-alexa-rank-checker-using-php\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.edopedia.com\/blog\/website-alexa-rank-checker-using-php\/#primaryimage","url":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/02\/default_featured_image.jpg","contentUrl":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2022\/02\/default_featured_image.jpg","width":880,"height":495,"caption":"Default Featured Image"},{"@type":"BreadcrumbList","@id":"https:\/\/www.edopedia.com\/blog\/website-alexa-rank-checker-using-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.edopedia.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Website Alexa Rank Checker Using PHP [Latest Method]"}]},{"@type":"WebSite","@id":"https:\/\/www.edopedia.com\/blog\/#website","url":"https:\/\/www.edopedia.com\/blog\/","name":"Edopedia","description":"Coding\/Programming Blog","publisher":{"@id":"https:\/\/www.edopedia.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.edopedia.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.edopedia.com\/blog\/#organization","name":"Edopedia","url":"https:\/\/www.edopedia.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2017\/10\/edopedia_icon_text_10.jpg","contentUrl":"https:\/\/www.edopedia.com\/blog\/wp-content\/uploads\/2017\/10\/edopedia_icon_text_10.jpg","width":400,"height":100,"caption":"Edopedia"},"image":{"@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/person\/3951cb19e3aa56df09e408c98aa02339","name":"Furqan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.edopedia.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e5e68aef3ad8f0b83d56f4953c512c8e57bd2e6dc64daec33b5d0495d9058f51?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e5e68aef3ad8f0b83d56f4953c512c8e57bd2e6dc64daec33b5d0495d9058f51?s=96&d=mm&r=g","caption":"Furqan"},"description":"Well. I've been working for the past three years as a web designer and developer. I have successfully created websites for small to medium sized companies as part of my freelance career. During that time I've also completed my bachelor's in Information Technology.","sameAs":["http:\/\/www.edopedia.com\/blog\/","trulyfurqan"],"url":"https:\/\/www.edopedia.com\/blog\/author\/furqan\/"}]}},"_links":{"self":[{"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/posts\/3055","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/comments?post=3055"}],"version-history":[{"count":1,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/posts\/3055\/revisions"}],"predecessor-version":[{"id":3056,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/posts\/3055\/revisions\/3056"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/media\/1762"}],"wp:attachment":[{"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/media?parent=3055"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/categories?post=3055"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.edopedia.com\/blog\/wp-json\/wp\/v2\/tags?post=3055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}