|
-
May 22nd, 2007, 03:26 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Networking with Winsock, webserver code return.
Ok here's what I'm doing it's not complicated if you know Winsock.
Im using a hosts file in my app to block the adverts, and as you know to do this I redirect ad servers to 127.0.0.1. This is not a problem and I can block the ads successfully.
I want to make a vb6 file to listen on port 80 of 127.0.0.1 (itself) and then when it gets a get request simply return the page BLOCK.HTM at C:\
Why?
The Hosts file redirects to loopback/localhost. At localhost I want to run a webpage (block.htm) so that when an ad is in the browser, it displays block.htm where I can write that an advert was blocked. .See?
I would use index.html but WebServer 2.0 (see above) does not have default starting pages.
I hope you can see now. I can already handle the popup blocking, I simply want to make a project with a winsock control so that I can respond to requests on 127.0.0.1 instead of HOSTS returning a page cannot be displayed. This will be an efficient way of showing the user an ad was blocked and I will be able to give them options to see page anyway.
Basically in WebServer 2.0, it returns the page depending on your query string. Any web server does, for example, If I sent www.blahblah.com/hey.asp to an IIS server it would respond with c:\inetpub\hey.asp (example), because I cannot specify urls in hosts file. I want it so that 127.0.0.1/ or 127.0.0.1/whateveriswrittenhere always returns the page Block.htm
So somethng like
(SECURITY IMPLEMENTATION) NO ACCESS TO OUT OF ROOT)
If rData like *get* blah, etc...
then *GET BLOCK.HTM
I just don't get this last bit.
Anyone please help?
Last edited by samtheman; May 22nd, 2007 at 04:15 PM.
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
|