Jump to content
xisto Community
Sign in to follow this  

<?php ?> Get Search Results To Your Localhost Simple way to get 100 results without allowing cookies

Recommended Posts

Ultimately simple script that allows you getting google search results to your localhost. This is the first part of the Crawler script i'm developing, and if you are interested in developing the script with me, IM me @icq328866661@msn/evil_matak/a\hotmail-com.


Here's the form part...


<form action="search.php" method="POST">

<input type="text" name="search">

<input type="submit" value="Search">






if (@$_POST['search']==""){

echo "What are you doing?";



$query = file_get_contents("https://www.google.com/search?q($_POST['search'])."&num=100&hl=en&ie=UTF-8&filter=2");


//needs to be added with more queries

$replace_array = array('/\n/','/<head>(.*)<\/head>/','/(.*)<div id=res>/','/<br clear=all>(.*)/');

//pregraplacing unneeded parts

$results = preg_replace($replace_array, '', $query);

echo $results;



NOTE: This script shouldn't be used for public services, couse it is against google TOS. This should only be used for learning purposes. Also beacouse of those facts i added limits to the script so that you can't use it for all searches.


Also google has custom search engines like the one I created here where you can help with adding good pages, and labeling bad pages. Join the community and help us make google even better search engine!

Edited by matak (see edit history)

Share this post

Link to post
Share on other sites
any updates on google results on localhost<?php ?> Get Search Results To Your Localhost

any updates on this

any progress how it goes to the next page the next page isnt working at the moment 

-reply by joseph


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.