Keyword search in a web page

Can anyone tell how to search for a keyword in any web page in java...Suppose if
am giving query in a google page, The results will be displaying in many pages. In the 1st page i want to search for a keyword www. ...

code
import java.io.*;
import java.net.*;
public class page
public static void main(String args[]) throws IOException
java.io.BufferedInputStream in = new java.io.BufferedInputStream(new
java.net.URL("http://www.google.co.in/search?q=Testing&hl=en&start=00&sa=N").openStream()
java.io.FileOutputStream fos = new java.io.FileOutputStream("testing1.htm");
java.io.BufferedOutputStream bout = new BufferedOutputStream(fos,1024);
byte data[] = new byte[1024];
while(in.read(data,0,1024)>=0)
bout.write(data);
bout.close();
in.close();
problem is:
C:\Program Files\Java\jdk1.5.0\bin>javac page.java
C:\Program Files\Java\jdk1.5.0\bin>java page
Exception in thread "main" java.io.IOException: Server returned HTTP response co
de: 403 for URL: http://www.google.co.in/search?q=Testing&hl=en&start=00&sa=N
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:1133)
at java.net.URL.openStream(URL.java:1007)
at page.main(page.java:8)

Similar Messages

  • How can I add a "search" field for web pages content-not blogs or podcasts?

    This seems to be such a basic function, I can't believe I'm having so much trouble. I don't have a blog or a podcast on my new website that I'm in the process of designing. So how do I allow people who'll visit my site to search there for specified content? The only instructions I find are for the RSS in inspector for blogs or podcasts. All I want is for people to be able to search my site/web pages (that have no blogs or podcasts on them). This must be a common request... or am I crazy? How do I do that?
    Thanks for your help.

    I think I've answered my own question after a few hours of searching:
    http://services.google.com/searchcode2.html?accept=on
    Thank you Google.

  • How do I put a link to an imix search on a web page

    I want to put a link on a web page to a search for every imix with IHDA in the title.
    how do I do that?

    Right-click the title of the iMix, and choose "Copy link." Paste it where you want it. You will get something like this:
    http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewIMix?id=363873831&s=143441

  • Google search, gmail, most web pages are suddenly much smaller - Why?

    Suddenly, almost all web pages are now smaller. I have not changed monitors or reset the resolution on my monitor. I use the "control +" but the size reverts if I move off the original page. I cannot read most of the Google search results. I am having to resize every page I come to.

    Reset the page zoom on pages that cause problems, make sure that the window is not maximized:
    *<b>View > Zoom > Reset</b> (Ctrl+0 (zero); Cmd+0 on Mac)
    *http://kb.mozillazine.org/Zoom_text_of_web_pages

  • Safari has dissappared from my dock and the harddrive but  only appears if I search for a web page

    why has safari dissappeared ffrom both doch and appliactions but appears if I search for a previous web page ?

    Next time you open a document, drag the Word icon from the dock and drag it right back in again. It will stay there.

  • Google search disable the web page, how to get it back?

    When i do a Google search using the safari option up right, the web page turn grey but sont comme back available. I need to reboot the iPad.
    Any tricks?

    Make sure that you do not run Firefox in full screen mode (press F11 or Fn + F11 to toggle; Mac: command+Shift+F).
    You see the orange Firefox button when the menu bar is hidden
    *In current Firefox versions it is possible to hide the "Menu Bar" via "View > Toolbars" or via the right-click context menu of a toolbar to make the (orange) Firefox button appear.
    *Tap the Alt key or press the F10 key to bring up the menu bar temporarily if you need to access a menu on it.
    *Go to "View > Toolbars" or right-click the menu bar or empty space on the tab bar to select which toolbars to show or hide (click on an entry to toggle the state).

  • Searching a safari web page

    How do I do a search on a Safari web page on my Mac 10.8.3?  On a PC it's control F.  I need to search for a specific name on a comment page.  I have a Macbook Pro. Thanks.

    I found it - it's command f.

  • Keywords not visibles in web pages / Ap 2

    It's a real pain to view keywords on web pages. I have a project/album and all photos got keywords (name of the street, city, name of the building, etc...). When I will make a web page using the 'caption&keywords' als visible option on the pages (thumb+large image) Aperture don't work correctly and the keywords are visible only in some picture (3 or 4 of 90 pictures for example) or not at all!
    I decided to wait eventually if A. need some time to load all keywords on the web page, nothing...
    If I export the versions, slowly one after all it load on the web page the keyword, but only on this situation.
    After if I re-open Aperture and click againg the web page icon i see nothing, all keywords blank, no keywords and is impossible to export the web pages until keywords aren't visible in the preview because if I export no keywords are visible on the exported pages too...
    HELP...
    1. Did I made something worong ?
    2. What's the problem, I work so much with keywords and web pages that I need absolutely this feature, did I need to re-isntall the older version?
    Sorry for my bad english... hope I was enough clear on the problem explaination...
    Julien

    Finally some other people got some problems, I was affraid to be the only one having this trouble.
    Callie, mmm... strange because all my keywords used on this work using Ap2 were new: I wrote and create from skratch all keywords using Ap2 and I didn't use old one. So I'm a bit lost in this case too...
    It seems that Aperture 2 got a real problem with keywords and web pages...
    Julien

  • How to Highlight google search results in web pages??

    I try to find out why it isn't possible to get safari to highlight the search words in the webpages that are found after using the build in google search box.
    I spend a lot of time working trough the pages where the words are that I want to find in those (sometimes long) texts
    Does anybody have a solution that works automatically?
    I am trying "sitehilite" but that requires to enter the searcht words again... Double work...
    Rob
    Message was edited by: brainwash

    Thanks for the warm welcome...
    I posted this after searching the net and getting frustrated... :O)
    ctrl+f works okay but requires extra "work"/input
    I would like to get the highlighting automatically after entering the search terms in google box, performing the quiery and klicking on the page I would like to see.
    a sort of permanent "on" of ctrl+f .....:O)
    Rob
    Message was edited by: brainwash
    Message was edited by: brainwash

  • Search Function on web page

    My company has a website in which we have our product catalog in pdf form, which has approximately 1000 pages.
    I created the site using GOLIVE CS2.
    Our vendors want to be able to search that pdf for their specific products only. So that if they type in lets say a number that is assigned to them as a prefix to their product number, then a list of some kind would be generated and clicking on the list would then take them to that page in the catalog.
    What is the quickest and easiest way to do this?

    PDF is a clumsy way to publish searchable content online. Ideally, you'd have your catalog products in a database.
    A site visitor could still use the search function of the Adobe Reader plugin to find content in the PDF file.
    You could also generate a database table where you index the content of each page in one column, and note the page number in another. Then offer a search script on your site that searches the first column and returns the page number value of the second column. You can access pages in a PDF file directly...
    http://www.yoursite.com/yourfile.pdf#page=8

  • Searching web pages

    Since updating to IOS 7.1 everytime I try to search for a web page it automatically goes to itunes store. If I do manage to get to the web page it only stays there for a few seconds and then goes to itunes store. Don't know if it is a setting on the ipad or what is happening. Even if I bookmark the page when I try to open it the screen goes to itunes. Help

    Go to Settings>Safari>Clear History, Cookies and Data.
    Now close Safari. In order to close apps in iOS 7, you have to drag the app up from the multitasking display. Double tap the home button and you will see apps lined up going left to right across the screen. Swipe to get to the app that you want to close and then swipe "up" on the app preview thumbnail to close it.
    Next, reset the iPad. Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.

  • Searching one web page?

    I looked at the phone and I checked the new manual at http://manuals.info.apple.com/enUS/iPhone_UserGuide.pdf , but I cannot find any way to search a particular web page.
    Did I check well, or should this be possible? Is one still with 3.0 limited to google searches, which may lead to loooong pages, where one does not know where a particular search term appeared?

    I was really hoping for this ability, too... it seems bizarre that you can search the entire phone, but you can not search for a term within a web page. Hopefully it will be there in 3.1.

  • A new tab opens up everytime I do a search on my home page, how do I stop this from happening? I've checked the browser.search.openintab and the value is set to FALSE, any ideas?

    I just want all my searches to stay on the same tab that I already have open.

    The browser.search.openintab pref applies to the (Google) search bar on the Navigation Toolbar and not to search bars on web pages.

  • Copy & paste web page info

    i somewhat new to coldfusion and i can't figure out how to do something..
    lets say there is a web page with these texts
    hi abc bye
    hi 123 bye
    hi a1b2 c3 bye
    i want to create a page that will go to a specific web page and search throught that web page for the word hi and then grab the following text up to the word bye... then it'll place those text in a file... so for example it'll copy only the text
    abc
    123
    a1b2 c3
    ...and paste them in a file
    is this possible??
    can someone please point me in the right direction, i been at this for almost two days!
    thanks in advance.

    cfquery_select_name wrote:
    i want to create a page that will go to a specific web page
    So you want to make an HTTP request for a web page, that would be the purpose of the <CFHTTP....> Tag.
    cfquery_select_name wrote:
     search throught that web page
    Then you want to find text in the content returned from the request.  the find() and refind() functions (most likely the later) would be helpful here.
    cfquery_select_name wrote:
     ...and paste them in a file
    Finaly you would like to write output to a file.  The <cffile action="write"...> would be the first choice for this task.
    That just leaves the actual searching.  Like I said I would probably try a REFIND that uses regular expression syntax to find the desired text.  Something like this untested example off the top of my head should get you started.
    <cfset match = refind(searchString,"hi(.*?)bye",1,true)>
    <cfdump var="#match#">
    Then finally a loop over this code to find each instance of the desired string.
    cfquery_select_name wrote:
     is this possible??
    Quite possible, it should just take some trail and error and looking at the appropiate documentation.

  • Web page different from opening link in a new tab or new window from Google search results

    I had been using another browser for a few months because I did not want to lose the web pages I opened within Mozilla. I began using Mozilla again after saving off the web pages. I see that Google's web page pulls in search results as I type in keywords, a feature I don't remember seeing with other browsers along with a magnifying glass icon, like a look ahead of what a web page looks like before clicking on the link.
    With the list of search results, I click on the link and tell Mozilla to open the link in a new tab. I see the google icon, "loading..." or "testing...", then results other than the link I wanted. Those other results maybe bing.com, http://66.45.255.230/click.php?c=0920f96609cb269f1d0045095c09, http://superpages.iarbiz.com/o6gIoMdG6so=-tQ1LeOu1v0kY34rDZ|oRy8Xt294ACu6X, Info.com, Supermedia Reverse Proxy (http://superpages.iarbiz.com/o6gIoMdG6so=-tQ1LeOu1v0kY34rDZ|oRy8Xt294ACu6X)or whatever else. As for the link, I managed to press stop before being redirected.
    This is with any search results listed.
    I thought it was Google.
    Changed to Instant is off.
    Nope. Still the same issue. Have already gone after malware. Tried resetting the redirect value to 0.
    Above results also occur when opening the link in a new page via right menu click.
    Copying link location and pasting in a new window is displaying results okay.
    When resuming use of Mozilla, an update was available and installed. Did not experience the above issues before the update.
    Running version 3.6.12. Running Win XP Pro SP3.
    Had to go back to IE and Chrome/SRWare Iron.
    Example:
    Google keywords: rental cars
    Clicked on Ad: _Avis_Rent_a_Car_, link is Avis.com
    Clicked on top search result: Hertz_Rent-a-Car_-_Rental_Car_Discounts,_Coupons,_and_Great_Rates (magnifying glass), www.hertz.com

    Do a malware check with a few malware scan programs.<br />
    You need to use all programs because each detects different malware.<br />
    Make sure that you update each program to get the latest version of the database before doing a scan.
    * http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    * http://www.superantispyware.com/ - SuperAntispyware
    * http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    * http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    * http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    See also "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked and [[Searches are redirected to another site]]

Maybe you are looking for

  • CORBA problem after migration to JDK 1.5.0_05

    Hi, I faced some errors with CORBA, after performing migration from JDK 1.4.1 to JDK 1.5.0_02 on Solaris 8 2/02 (SPARC version). I've spend few days on digging in java.sun.com bug database and google archive, but haven't found similar case. The probl

  • The dreaded lollipop

    I have read as much as I can about this topic...and nothing seems to work. I have several new G4 emacs in a computer lab...they are all 256 mb RAM...actually, some are 512. We are getting the spinning lollipop/ball . I have emptied the recent items a

  • Ip address & subnet mask !

    I have recently encountered a problem with my system and the assigned IP Address and was not sure why. I have a wireless connection on the iMac with it setup to get the IP address automatically but the system gets the wrong subnet mask every time. It

  • "fixed" my G5, but can't calibrate

    I'll try and make this brief and appreciate any help I can get. I've had an original Dual 2.0Ghz G5 since late October 2003. It always gave me a little trouble with the odd kernel panic and the like, but it wasn't regular enough to send in, or replac

  • What is the best way to include external files in an application?

    I am developing a vocabulary-training program (Adobe AIR using Flex Builder 3). Asks you what an equivalent of a czech word is in english and the other way. I am storing the "dictionaries" in external XML files. I would like to include about twenty o