- How to write a PHP script to find the number of indexed pages in Google?
- How to write a PHP script to find the number of indexed pages in Google?
- Example
- Does Google crawl and index sites hosted on an IP address only (with no domain name) and non-standard port?
- How to force google to re-index a page
- How to list all pages in Google search results?
- Saved searches
- Use saved searches to filter your results more quickly
- berkaycatak/php-google-indexing-api
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
- About
How to write a PHP script to find the number of indexed pages in Google?
Question: A website I’ve made has been recently hacked and Google indexed that hacked homepage and now its showing irrelevant text on search result. Solution: Google does index sites accessible under IPs.
How to write a PHP script to find the number of indexed pages in Google?
I need to find the number of indexed pages in google for a specific domain name, how do we do that through a PHP script?
foreach ($allresponseresults as $responseresult) < $result[] = array( 'url' =>$responseresult['url'], 'title' => $responseresult['title'], 'abstract' => $responseresult['content'], ); >
what do i add for the estimated number of results and how do i do that? i know it is (estimatedResultCount) but how do i add that? and i call the title for example this way: $result[‘title’] so how to get the number and how to print the number?
I think it would be nicer to Google to use their RESTful Search API. See this URL for an example call:
(You’re interested in the estimatedResultCount value)
In PHP you can use file_get_contents to get the data and json_decode to parse it.
You can find documentation here:
Example
Warning : The following code does not have any kind of error checking on the response!
function getGoogleCount($domain) < $content = file_get_contents('//ajax.googleapis.com/ajax/services/' . 'search/web?v=1.0&filter=0&q=site:' . urlencode($domain)); $data = json_decode($content); return intval($data->responseData->cursor->estimatedResultCount); > echo getGoogleCount('stackoverflow.com');
You’d load http://www.google.com/search?q=domaingoeshere.com with cURL and then parse the file looking for the results
bit.
You’d have the resulting html stored in a variable $html and then say something like
Please note that this is untested and a very rough example. You’d be better off parsing the html with a dedicated parser or matching the line with regular expressions.
google ajax api estimatedResultCount values doesn’t give the right value. And trying to parse html result is not a good way because google blocks after several search.
Count the number of results for site:yourdomainhere.com — stackoverflow.com has about 830k
Building an index of URLs , what features to include?, Also a few things to add to your index: Subdomains associated with the domain. IP addresses associated with the domain. Average page speed. Links pointing at the domain in Yahoo — e.g link:nytimes.com or search on yahoo. Number of pages on the domain — site:nytimes.com on Google.
Does Google crawl and index sites hosted on an IP address only (with no domain name) and non-standard port?
I have website on 203.162.177.159:8071 (Actually, that isn’t the real IP address, I changed it for this question.) Because of an internal rule, this site must not have a domain name, and running on non-standard port .
In Google Webmaster Tools, I see
- no crawl errors found
- no verification errors found
- I tried «Fetch as Google» and they are all successful. I can then click the URL to get to the page myself.
- I don’t have the sitemap yet
So why the crawled page and indexed page is still zero ? Does Google not accept non-domain-name URLs?
Google does index sites accessible under IPs.
Random example: 162.13.35.10
Also indirectly confirmed by Matt Cutts:
Can rel=»canonical» index my hostname and not my IP address?
Does Google crawl and index sites hosted on an IP, Because of an internal rule, this site must not have a domain name, and running on non-standard port. In Google Webmaster Tools, I see. no crawl errors found; no verification errors found; I tried «Fetch as Google» and they are all successful. I can then click the URL to get to the page myself. I don’t have the sitemap yet
How to force google to re-index a page
A website I’ve made has been recently hacked and Google indexed that hacked homepage and now its showing irrelevant text on search result.
The hack has been resolved but the search results haven’t changed. Is there a way to force Google to re-index my homepage?
You could try resubmitting your sitemap via Google Webmaster Central.
Site Configuration -> Sitemaps -> Submit a sitemap
If your website has been hacked and then found by Google I would recommend you to log into Google Webmaster Tools and request a reconsideration.
Write an explanation of what happend, and then submit your sitemap, keep your content updated frequently and try to get more incoming links.
Another tip, use twitter, because Google have full access to their database, it might speed up your index problem.
Take a look at some SEO techniques on how you can have google reindex. I think one thing you can try is to rename the page. Since your page is uniquely identified by the complete url, if you change the name it causes google to reindex. You will loose your ranking however.
Google sees first error on the site. If there is a lot of errors within the site (end links . etc), Google these sites virtually ignored. The content of the Google home page looks less than say on the «blog» if it exists on the site. I write from personal experience. Finally, if Google penalties site for any reason, you need to take all possible measures to restore the reputation of the site, otherwise the site and that does not exist. Frequently the first page is deleted from the index while others appear normal in the search. However, they can all be affected by the fine page directly. There are no rules.
Seo — Google Search Console reports my URLs are, Many pages may be indexed with Google that aren’t shown with the site: search parameter. It’s quite common for websites to have more pages indexed according to search console than displayed using site: and in fact, almost all of my sites have more pages indexed according to search console than when I use site:
How to list all pages in Google search results?
My website was recently hacked and Google mentioned «This site may be hacked» so I removed the entire wordpress website and changed server. I installed a new wordpress website however, Google is still crawling the old pages. It runs into 20+ Google pages meaning there’s over 200 links generated by the hack.
Now, I would like to do a 301 Redirect to all this links using htaccess so Google cache faster and remove these links.
How do I list all this links displayed in the searched result? or is there a better way to do? Yes, I have asked Google for Review but they said it will take several weeks 🙁
You can see all youre indexed pages by writing this in Google search
Just write youre domain name instead of example.com
SEO Site Tools, Site Analysis, One-click SEO extension for Edge. Quick access to website SEO analysis. Main features: website indexed pages, backlinks, Alexa, IP, SEO stats and tools. Full Features: Indexed Pages in Google, Yahoo, Bing, Baidu Backlinks in Google, Yahoo, Bing Page Cache in Google Alexa Rank Server IP Geolocation Domain Whois …
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Indexing project written in PHP, using Google Indexing Api. PHP Google Indexing API.
berkaycatak/php-google-indexing-api
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
Indexing project written in PHP, using Google Indexing Api.
Add your json file to the following directory.
Interface — Fill in the inputs.
Password: The name of your json file. (medialyra.com for medialyra.com.json)
Website address: The website you want indexed.
http://localhost/api/?url=https://www.your-website.com
http://localhost/api/?method=1&url=https://www.your-website.com
http://localhost/api/?method=2&url=https://www.your-website.com
http://localhost/api/multiple?urls[]=https://www.your-website.com&urls[]=https://www.your-website.com/contact
http://localhost/api/multiple?method=1&urls[]=https://www.your-website.com&urls[]=https://www.your-website.com/contact
http://localhost/api/multiple?method=2&urls[]=https://www.your-website.com&urls[]=https://www.your-website.com/contact
You can use Composer or simply Download the Release
The preferred method is via composer. Follow the installation instructions if you do not already have composer installed.
Enter the name of your JSON file:
Line 15 in app/controllers/home.php
... $googleClient->setAuthConfig( 'YOUR_JSON_FILE_NANME.json' ); ...
Line 15 in app/controllers/multiple.php
... $googleClient->setAuthConfig( 'YOUR_JSON_FILE_NANME.json' ); ...
If your PHP version is below 8
composer install --ignore-platform-reqs
2- Edit the following file as indicated:
Line 104 in vendor/psr/cache/src/CacheItemInterface.php
... public function expiresAfter($time); ...
Line 30 in vendor/psr/log/src/LoggerInterface.php
... public function emergency( $message, array $context = []); ...
Line 43 in vendor/psr/log/src/LoggerInterface.php
... public function alert( $message, array $context = []); ...
Line 55 in vendor/psr/log/src/LoggerInterface.php
... public function critical( $message, array $context = []); ...
Line 66 in vendor/psr/log/src/LoggerInterface.php
... public function error( $message, array $context = []); ...
Line 79 in vendor/psr/log/src/LoggerInterface.php
... public function warning( $message, array $context = []); ...
Line 89 in vendor/psr/log/src/LoggerInterface.php
... public function notice( $message, array $context = []); ...
Line 101 in vendor/psr/log/src/LoggerInterface.php
... public function info( $message, array $context = []); ...
Line 111 in vendor/psr/log/src/LoggerInterface.php
... public function debug( $message, array $context = []); ...
Line 124 in vendor/psr/log/src/LoggerInterface.php
... public function log($level, $message, array $context = []); ...
About
Indexing project written in PHP, using Google Indexing Api. PHP Google Indexing API.