Skip to main content
GameDev.net gamedev.net
🔒 Locked

[web] accesing web content from java ..?

Started by RSC_x May 27, 2007 at 6:06 AM 5 replies 1.2k views
Original Post
RSC_x
RSC_x
when ewer i tryintg to acces to any web page ... it says "acces denied" or "page not found".. this happens also on my own pages. can i read pages with java. thanks.
© Loading...<font col
speciesUnknown
speciesUnknown
erm, i have no idea what the context of this question is.

So, your writing a web browser in java. I think. Or are you doing some kind of brute force scan of your website? Are you securtity testing your pages? Or somebody elses... are you being naughty?

Try this for a question structure:



I'm using the following software.... on the following hardware.... and im trying to do this.....


When i try to do this.... This happens....


this is my code......(inside SOURCE tags please) this is the output.....


I have already tried these things......


Can anybody help me?
Don't thank me, thank the moon's gravitation pull! Post in My Journal and help me to not procrastinate!
RSC_x
RSC_x
my code is something like this.

buffer buffer;
file="http://bublic web server/index.html";
readfile(buffer,...);
it can be a way for vbs or c++.

i is necessary this for automated web searchs.
thanks.
© Loading...<font col
speciesUnknown
speciesUnknown
Well, from what i know of java i cant tell you if thats supposed to work with the buffer object. also, im not sure "buffer buffer;" is going to compile. try copy-and-pasting your code into source tags.

in other words: yes there is a way to do it but i'm not an expert enough to tell you any more. you cant load a file from the internet using the buffer object, as far as i know.
Don't thank me, thank the moon's gravitation pull! Post in My Journal and help me to not procrastinate!
Jonny_S
Jonny_S
I still have no idea what your asking but you can't read webpages with standard file IO commands.
speciesUnknown
speciesUnknown
Quote:

i is necessary this for automated web searches


I don't mean to offend you, but I think you are trying to rip websites, which is a dubious practice.
Don't thank me, thank the moon's gravitation pull! Post in My Journal and help me to not procrastinate!
Stani R
Stani R
I don't really understand the question either but my guess is that you are trying to read in the content of a web page. If that is the case, you want to be using HttpURLConnection as that is the simplest way to do it. Set it up, connect it, then use the connections's getInputStream() and read the web page contents from that.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.