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

free web hosting
Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > PHP Programming

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

matak
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...

QUOTE
<form action="search.php" method="POST">
<input type="text" name="search">
<input type="submit" value="Search">
</form>
search.php

QUOTE

<?php

if (@$_POST['search']==""){
echo "What are you doing?";
}
else{
$query = file_get_contents("http://www.google.com/search?q=".urlencode($_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!

 

 

 


Reply

Blessed
Greetings

thanx fot the nice script man
cant wait for the next one.

have a nice day

Reply

Imtay22
Thats a nice script I like it. THe google custom search is for me, though.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. php get keywords - 41.69 hr back. (1)
Similar Topics

Keywords : , search, results, localhost, simple, 100, results, allowing, cookies

  1. Ms-access Database Question
    Allowing Web Access to the Informaton (3)
  2. Blank Cookies...
    Need some help with Cookies... (4)
    Hi. I'm doing a website that basically checks if it has chosen a css style before. If it has, it
    shows the last shown style, and if it doesn't, it shows "natura" style. On the page there's
    a form that lets the user choose the style. It is based on cookies. The thing is that when I do java
    script:alert(document.cookie) on the address bar it gives me a blank alert! And, obviously, when
    I reload the page, the style doesn't change!!! The thing is I'm sure it has
    nothing to do with the HTML code, and I also thing it does have nothing to do ....
  3. To Search Within Search Results
    To search within search results (0)
    Is there a good and efficient way of searching within previously searched records using PHP/MySql? I
    tried searching on google with several keywords like nested search, search within results, recursive
    search with PHP and MySql, haven't got a clue so far yet. But I thought it might be just storing
    previously queried sql statements and to a select on it each time the search button is called? Any
    ideas?....
  4. Help With Moving Html Form Results To Shopping Cart?
    (3)
    Hello All- So I think I'm tackling a pretty big project here and was looking for some help... I
    am fairly new to extensive coding (beyond HTML and a little bit of JavaScript) and wanted to know
    how I can recall HTML form results on the next page (in a shopping cart) with a price based on the
    choices picked in the form. It sounds complicated...look at this example: Check out this page:
    http://www.plugcomputers.com/intelprobuild.php See how when the user goes through and picks all
    their computer parts a price at the bottom shows the system price based on their sel....
  5. How To Group Mysql Results In A List
    (1)
    Ok so I have an array that I would like to group by date. When I use the group by in a mysql query
    it only shows one record with that value. However I want to show all the records grouped by date.
    This is what I have so far.


    CODE $completedprojectsresults=mysql_query(&#....
  6. Help With Some Website Coding
    Databases and saving form results (4)
    Hey all, I was looking for some help with creating my new website. I have a form already created,
    with some text areas, checkboxes, drop down menu's, ect. I need some help setting up the code to
    save the form data once the user clicks "Submit" after filling in their information in the form. I
    was hoping to do this 2 ways - 1. Saving the information into some type of database (MySQL I'm
    guessing?) and 2. Have the form results emailed to me. I am familiar with the old way of emailing
    the results by putting "mailto:email@domain.com" into the form, but new browse....
  7. Using Sessions Instead Of Cookies, Help Please
    (1)
    This is a simple code to register and login.. this uses cookies.. i want to use sessions instead..
    can someone tell how i can do it ? config.php CODE <?    ob_start(); // allows you
    to use cookies    $conn =
    mysql_connect("localhost","USER","PASSWORD");   
    mysql_select_db(DATEBASE) or die(mysql_error());    //fill in the above
    lines where there are capital letters.    $logged = MYSQL_QUERY("SELECT * from users
    WHERE id='$_COOKIE[id]' AND password = '$....
  8. Submit Restrictions
    Is there anyway to bypass this on my localhost? (21)
    This can be considered my first php page after a long while, I did a little basic php years ago and
    I have totally forgotten most of it. But I have come up with a page; a simple calculator if you will
    with the essential add, subtract, multiply and divide functions. When I load the page on my
    localhost, I get this error However when I upload it to trap17, there is no problem, please
    take a look http://darran.trap17.com/php/Calculator/calculator.php I know this does not matter
    but I want to find out where I went wrong on my first php page. The code listing for ....
  9. Display MySQL results in a Table
    question (8)
    hi all i know php and my sql i want to know how can show mysql result in this tabel for example :
    CODE <table cellpadding="0" cellspacing="0" width="200"
    height="151">     <!-- MSTableType="layout" -->     <tr>
            <td height="21" width="100" valign="top">1</td>
            <td height="21" width="100" valign="top">8</td>
        </tr>     <tr>         <td height="21" width="100" valign=&....
  10. Not Allowing Symbols In A String
    (3)
    I was looking for a quick solution so i could check a string for any symbols and stuff (basically
    anything that isnt numbers and letters) in it. One of the first google searches that came up were
    for a forum called "sitepoint". The thread was talking about the same thing I was trying to do.
    This was their solution: CODE if (ereg("[a-zA-Z0-9]+",
    $username)) {    echo 'OK.'; } else {    echo 'Invalid characters.';
    } So i tried it out. Didn't work. I played with the code and i still couldn't get....
  11. Sessions And Login
    Without Cookies (5)
    Hi, I have a login script i made using PHP sessions and MySQL. It works fine but there is a
    problem. As you know Sessions are stored in Cookies by PHP. So if someone has switched Cookies off
    then no sessions will work. How to solve this problem ? Please help me. Thanks and have a good
    day. ....
  12. Cookies
    How to make something like that? (1)
    Can anybody help me? Im making new website and there will be needed such thing as login... so there
    will be needed thing as cookies too. Can anybody please tell me how to make them and how and where
    to use them? Alredy thanks, Dawiss....
  13. Php/mysql Search Engine Help
    Having issues displaying results (1)
    I've been using a tutorial
    (http://www.devarticles.com/c/a/MySQL/Developing-A-Site-Search-Engine-With-PHP-And-MySQL/) at this
    address to help me get started on building my own search engine. I've completed the tutorial but
    when I run the search, I get no results on the results page. I'm wondering if anyone will take a
    look at this script and see if they can figure out why my I'm not getting any results displayed.
    I'm using phpMyAdmin to build the database and simple notepad to build the PHP script. CODE
    <?php $submit = $_POST[&....
  14. Help Importing Mysql Database Results
    Need help formatting link (3)
    I am having trouble formatting my table to display the results of a mySQL query the way I want.
    Here is the part of my code: CODE $result = mysql_query("SELECT * FROM uploads
    WHERE Category='Drama'") or die(mysql_error()); ?> <table
    cellspacing="2" cellpadding="2"> <tr> <th>Title</th>
    <th>Author</th> <th>File</th></tr> <?php // keeps
    getting the next row until there are no more to get while($row = mysql_fetch_array....
  15. Grrrr, Cookies Just Wont Work :(
    (2)
    Ok i have tried many tutorials and all tell me to do this: setcookie("uname", $name,
    time()+36000); But it always says: "Warning: Cannot modify header information - headers already
    sent" They say to put it on the very first line with no spaces, which i do, like this: Im using
    IIS with XP Pro, and have PHP 4.3 installed... why wont it work? /sad.gif' border='0'
    style='vertical-align:middle' alt='sad.gif' /> **edit, wow i cant believe no one could answer this
    EASY question, but after reading many documents, i figured out that i hadent declared the $name....

    1. Looking for , search, results, localhost, simple, 100, results, allowing, cookies

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for , search, results, localhost, simple, 100, results, allowing, cookies

*MORE FROM TRAP17.COM*
advertisement



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



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE