• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Tricking Websites with cookies, etc.

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey all,

I'm currently writing an application that reads and parses web pages from a site. I am a member of this site, however, the server doesn't know this when my application talks to it. I've checked my cookies for all of the cookies set by the site, and used:


URL myURL = new URL("http://www.blahblah.com");
URLConnection myConn;

myConn = myURL.openConnection();
myConn.setRequestProperty("Cookie", "A=foo; B=bar");
myConn.connect();


When I print out the inputstream, however, it get the page that says I'm not a member.
 
William Fretts-Saxton
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I also added these entries, and still nothing:

myConn.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461)");
myConn.setRequestProperty("Referer", "http://www.blahblah.com");
 
Are we home yet? Wait, did we forget the tiny ad?
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic