{"id":21077708,"url":"https://github.com/howie6879/php-google","last_synced_at":"2025-05-16T08:31:02.733Z","repository":{"id":56986088,"uuid":"95122475","full_name":"howie6879/php-google","owner":"howie6879","description":"Google search results crawler, get google search results that you need - php","archived":false,"fork":false,"pushed_at":"2017-06-24T23:32:27.000Z","size":15,"stargazers_count":31,"open_issues_count":1,"forks_count":10,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-04T12:41:08.461Z","etag":null,"topics":["crawler","google-search","php-google"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/howie6879.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-22T14:10:58.000Z","updated_at":"2025-03-27T11:50:43.000Z","dependencies_parsed_at":"2022-08-21T12:20:55.253Z","dependency_job_id":null,"html_url":"https://github.com/howie6879/php-google","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howie6879%2Fphp-google","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howie6879%2Fphp-google/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howie6879%2Fphp-google/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howie6879%2Fphp-google/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/howie6879","download_url":"https://codeload.github.com/howie6879/php-google/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254496081,"owners_count":22080649,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crawler","google-search","php-google"],"created_at":"2024-11-19T19:38:00.371Z","updated_at":"2025-05-16T08:30:57.711Z","avatar_url":"https://github.com/howie6879.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# php-google\nThis is an easy Google Searching crawler that you can get anything you want in the page by using it.\n\nDuring the process of  crawling,you need to pay attention to the limitation from google towards ip address and the warning of exception , so I suggest that you should pause running the program and own the Proxy ip\n\npython - [MagicGoogle](https://github.com/howie6879/MagicGoogle)\n\n### 2.How to Use?\nThis project can be installed via composer by requiring the `howie6879/php-google` package in `composer.json`:\n\n``` json\n{\n    \"require\": {\n        \"howie6879/php-google\": \"1.0\"\n    }\n}\n```\n\nIf you have installed `php-google` in your project, you can get google search results that you need.\n\n**Example**\n\n``` php\n# Add boostrap autoload file\n\nrequire_once '../vendor/autoload.php';\nuse \\howie6879\\PhpGoogle\\MagicGoogle;\n\n# Or new MagicGoogle()\n$magicGoogle = new MagicGoogle('http://127.0.0.1:8118');\n\n# The first page of results\n$data = $magicGoogle-\u003esearch_page('python');\n\n# Get url\n$data = $magicGoogle-\u003esearch_url('python');\n\nforeach ($data as $value) {\n    var_dump($value);\n}\n\n/** Output\n * string(23) \"https://www.python.org/\"\n * string(33) \"https://www.python.org/downloads/\"\n * string(35) \"https://docs.python.org/3/tutorial/\"\n * string(44) \"https://www.python.org/about/gettingstarted/\"\n * string(43) \"https://wiki.python.org/moin/BeginnersGuide\"\n * string(41) \"https://www.python.org/downloads/windows/\"\n * string(24) \"https://docs.python.org/\"\n * string(59) \"https://en.wikipedia.org/wiki/Python_(programming_language)\"\n * string(39) \"https://www.codecademy.com/learn/python\"\n * string(25) \"https://github.com/python\"\n * string(38) \"https://www.tutorialspoint.com/python/\"\n * string(28) \"https://www.learnpython.org/\"\n * string(44) \"https://www.programiz.com/python-programming\"\n */\n \n# Get {'title','url','text'}\n$data = $magicGoogle-\u003esearch('python', 'en', '1');\n\nforeach ($data as $value) {\n    var_dump($value);\n}\n\n/** Output\n * array(3) {\n * [\"title\"]=\u003e\n * string(21) \"Welcome to Python.org\"\n * [\"url\"]=\u003e\n * string(23) \"https://www.python.org/\"\n * [\"text\"]=\u003e\n * string(54) \"The official home of the Python Programming Language. \"\n * }\n */\n\n```\n\nYou can see [sample.php](./examples/sample.php)\n\n**If  you need a big amount of querie but only having an ip address,I suggest  you can have a time lapse between 5s ~ 30s.**\n\nThe reason that it always return empty might be as follows:\n\n```html\n\u003cHTML\u003e\u003cHEAD\u003e\u003cmeta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\"\u003e\n\u003cTITLE\u003e302 Moved\u003c/TITLE\u003e\u003c/HEAD\u003e\u003cBODY\u003e\n\u003cH1\u003e302 Moved\u003c/H1\u003e\nThe document has moved\n\u003cA HREF=\"https://ipv4.google.com/sorry/index?continue=https://www.google.me/s****\"\u003ehere\u003c/A\u003e.\n\u003c/BODY\u003e\u003c/HTML\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhowie6879%2Fphp-google","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhowie6879%2Fphp-google","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhowie6879%2Fphp-google/lists"}