|
-
Nov 27th, 2002, 10:34 AM
#1
Thread Starter
New Member
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
-
Nov 27th, 2002, 11:12 AM
#2
Lively Member
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:
inetDC.Proxy = "your-proxy:8080"
inetDC.AccessType = icNamedProxy
strString = Replace(inetDC.OpenURL("http://...", icString), Chr(10), vbCrLf)
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 
-
Nov 27th, 2002, 11:30 AM
#3
Thread Starter
New Member
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
-
Nov 27th, 2002, 11:55 AM
#4
Lively Member
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:
inetDC.Proxy = "your-proxy:8080"
inetDC.AccessType = icNamedProxy
if you don't use/have a proxy, but direct connection to the internet, you use
VB Code:
inetDC.AccessType = icDirect
or
VB Code:
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:
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:
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 
-
Nov 27th, 2002, 02:57 PM
#5
Thread Starter
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|