Results 1 to 5 of 5

Thread: Advert Blocker...

  1. #1

    Thread Starter
    New Member Miles_rich's Avatar
    Join Date
    Nov 2002
    Location
    England
    Posts
    9

    Question Advert Blocker...

    You know when you load a web page and you get adverts that are displayed at the sides or at the top like a banner, how would you parse the html before it loads into IE 6 and change images to txt saying something like [AD BLOCKED] ???

    does anyone have any ides becuase i have been trying to work out how programs like outpost firewall and other firewalls do it.
    - T N E

    - Tony

  2. #2
    Lively Member
    Join Date
    Dec 2001
    Location
    vienna, austria
    Posts
    118
    dear,

    if you use the microsoft internet transfer control, you can open an internet url and parse the data into a string, then search the string for e.g. adrotator

    VB Code:
    1. inetDC.Proxy = "your-proxy:8080"
    2.   inetDC.AccessType = icNamedProxy
    3.   strString = Replace(inetDC.OpenURL("http://...", icString), Chr(10), vbCrLf)
    4.   strString = Replace(strString, ...

    but the problem is, that banners are often simple images, and you cannot distinguish them from "normal" page images

    hope this helps a little,
    big nell
    visit me on www.big-nell.com to find out the truth

  3. #3

    Thread Starter
    New Member Miles_rich's Avatar
    Join Date
    Nov 2002
    Location
    England
    Posts
    9

    Please explain...

    so i would have to create a proxy aswell? i dont fully understand your code, could you please explain a bit more in detail, or maybe you could email and we could discuss this further.

    email : [email protected]

    Thank you
    - T N E

    - Tony

  4. #4
    Lively Member
    Join Date
    Dec 2001
    Location
    vienna, austria
    Posts
    118
    dear,

    a short explanation on the code:

    if you use the microsoft internet transfer control (attach it to your project components, then you receive a control called Inet, put that on a form - in my example i have called it inetDC)

    in the form_load event you define which proxy server should be used for internet communication by:
    VB Code:
    1. inetDC.Proxy = "your-proxy:8080"
    2. inetDC.AccessType = icNamedProxy

    if you don't use/have a proxy, but direct connection to the internet, you use
    VB Code:
    1. inetDC.AccessType = icDirect
    or
    VB Code:
    1. inetDC.AccessType = icUseDefault
    (then the registry settings will be used)

    then you may access a web site, e.g. my homepage www.big-nell.com by:
    VB Code:
    1. strString = inetDC.OpenURL("http://www.big-nell.com", icString)
    the content of the page will be passed to the variable strString
    after that you can search for html-tags you want to be replaced
    VB Code:
    1. strString = Replace(strString, ...

    but as i mentioned, the problem is, that banners are often simple images, and you cannot distinguish them from "normal" page images

    if you have questions, send a mail ([email protected])

    kind regards,
    big nell
    visit me on www.big-nell.com to find out the truth

  5. #5

    Thread Starter
    New Member Miles_rich's Avatar
    Join Date
    Nov 2002
    Location
    England
    Posts
    9

    Cool Thankyou

    Thankyou very much for your help.
    - T N E

    - Tony

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width