Last active
February 4, 2025 16:13
-
-
Save mammuth/9f2c5b2235a35875454c to your computer and use it in GitHub Desktop.
Get Backlinks to URL in PHP via Google [Warning: deprecated]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Use: Add following url parameters: | |
// link: The url you want to get the backlinnks from (required) | |
// siteFilter: The site your backlinks should come from (eg. twitter.com) (optional) | |
function getJsonObject($link, $site) { | |
return json_decode(file_get_contents("https://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=link:$link+site:$site"), true); | |
} | |
$link = $_GET["link"]; | |
$siteFilter = $_GET["site"]; | |
$jsonObject = getJsonObject($link, $siteFilter); | |
// echo "Number of backlinks: ".$jsonObject['responseData']['cursor']['resultCount']; | |
?> |
Not work for me. See https://bangtra.com/101backlink
Thanks for sharing, I hope this code works for https://www.ikaunissula.or.id
Just to check again https://devwithshams.com/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice post saas marketing agency