Jump to content

Recommended Posts

Posted

replace this line:

isr = new InputStreamReader(url.openStream());

 

with these:

URLConnection con = url.openConnection();
con.addRequestProperty("User-Agent", "Mozilla/4.76"); 
isr = new InputStreamReader(con.getInputStream());

1 error on URLConnection con = url.openConnection(); :S how i can replace this?

Posted

remove the sun.net.www.. line from the imports and import the java.net.URLConnection

 

It works perfectly now :D

Thanx!

Posted

Ive tried what all of you said.. but im still getting the 403 error, i even tried to add application settings and still the same

 

url = new URL(hz_http);
URLConnection con = url.openConnection();
con.setRequestProperty("CONTENT-TYPE", "application/x-www-form-urlencoded");
con.addRequestProperty("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 6.0; el; rv:1.9.2.18) Gecko/20110614 Firefox/3.6.18 ( .NET CLR 3.5.30729; .NET4.0C)"); 
con.setRequestProperty ("From", "Mozilla");
isr = new InputStreamReader(con.getInputStream());

 

PS: About the useragent, yes i tried adding Mozilla/4.76 and i still got a 403

 

EDIT: Nevermind fixed.

Posted

I can't open hopzone at all.

 

Website Currently Unavailable
The website you are trying to access is currently unavailable. Please try again at a later time.

 

I guess this is why it doesn't work

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



×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock