• Welcome to Valhalla Legends Archive.
 

VB with websites

Started by Anubis, July 28, 2003, 12:07 AM

Previous topic - Next topic

Anubis

Hi, I've been making a chat server/client (in VB6) and I've been having trouble getting it to work over networks (If I'm on a network and my friend is on a different network, it wont connect.) Is there a way to do something like WebBot (Where it connects and sends/recieves data on a website)? If anyone can give me any help on this that would be great. Also, if anyone could give me some sample code that would be nice too :) I'm new to using VB with websites... Thanks

Camel

You are probably way in over your head, but I'll give you the benefit of the doubt and try to answer your question anyways.

There are basicly two approaches you can take: one is to use HTTP Push and Pulls to immediately send data as it is updated, and the other is to store all of the information in a database that a script will read and create html for. You will need some program -- be it a custom server or custom bot -- to have access to the database and update the database with chat/the userlist as they change. One alternative to this would be to use BotNet; I wont get too detailed on this method.

If you are new to any of these concepts, I suggest you do some research on SQL databases, PHP, and possibly even ODBC (unless you are going to use MySQL).

Adron

Quote from: Camel on July 28, 2003, 01:12 PM
There are basicly two approaches you can take: one is to use HTTP Push and Pulls to immediately send data as it is updated,

Could you explain this method some more? What ways are there for pushing updates to a client? Like, know any better method for updating an image than pushing animated gif frames down to the client?

Camel

Quote from: Adron on July 28, 2003, 01:24 PM
Quote from: Camel on July 28, 2003, 01:12 PM
There are basicly two approaches you can take: one is to use HTTP Push and Pulls to immediately send data as it is updated,

Could you explain this method some more? What ways are there for pushing updates to a client? Like, know any better method for updating an image than pushing animated gif frames down to the client?

One can do that? Wouldn't the browser not draw the picture until it's finished downloading, which would never happen?

Well, to answer your question, no I don't know a better method, per say. I would probably have the picture just refresh itself automaticly. If the browser refuses to download the picture because it wants to cache the image, you might try adding a random unused number at the end of the url, ex: http://www.domain.com/images/picture.php?seed=<random>, and then using JavaScript to update the url of the picture with a new random seed on a timer.

Adron

Well, if you look at my avatar you'll see a gif that keeps sending down frames to the browser... The problem is that because of their slow computers, some people complain that it's using 100% of their CPU after 30 seconds.

Camel

#5
Quote from: Adron on July 28, 2003, 04:06 PM
Well, if you look at my avatar you'll see a gif that keeps sending down frames to the browser... The problem is that because of their slow computers, some people complain that it's using 100% of their CPU after 30 seconds.

Right, that was what I was concerned with. I havn't played around with HTTP Push at all, but perhaps it is possible to send some command that will cause the client's browser to refresh the image? Then you would be able to send that, for example, every 30 seconds or whever the song changed or something.

[edit] Oh yeah, and how did you draw the spectrum? Is it winamp, and if so is there an sendmessage command or something?

Adron

Hmm. I suppose I could actually send a Refresh header. I wonder if a browser will refresh an image though? I'm not sure if it only works for html pages...

I drew the spectrum "by hand" from raw spectrum data received from the Winamp plugin interface.

Camel

Quote from: Adron on July 28, 2003, 04:30 PM
Hmm. I suppose I could actually send a Refresh header. I wonder if a browser will refresh an image though? I'm not sure if it only works for html pages...

I drew the spectrum "by hand" from raw spectrum data received from the Winamp plugin interface.

Possibly -- if the browser isn't crap, I dont see why it wouldn't...
Could you perhaps just assemble as many frames of the gif as is required to get the title to cycle once, and then have it loop?

Ahh, that makes sense. You must have been really bored, though. ;)

Adron

Not all that bored, it was rather interesting. I learned:

How to write an ISAPI plugin

How to write a Winamp plugin

How to have a memory DC where I alternately write using GDI functions and touch the memory directly

How to compress data using the Lempel-Ziv algorithm (implemented compressor)

How to encode a GIF



I'd say 75-90% of the code was new and interesting things. A very good learning project. Very much more interesting than anything that has a GUI.

Adron

Hmmbtw, by "by hand" I mean that I write it pixel by pixel in a loop...

And it's displaying data live from my Winamp - I'm seeing it moving in sync with the music.

Camel

Quote from: Adron on July 28, 2003, 04:38 PM
Not all that bored, it was rather interesting. I learned:

How to write an ISAPI plugin

How to write a Winamp plugin

How to have a memory DC where I alternately write using GDI functions and touch the memory directly

How to compress data using the Lempel-Ziv algorithm (implemented compressor)

How to encode a GIF



I'd say 75-90% of the code was new and interesting things. A very good learning project. Very much more interesting than anything that has a GUI.

Ever used OpenGL? It's phuuuuuuuuun.
* Camel considers rendering a frame with OpenGL and then dumping it to a streaming online picture...
Hey Adron, you interested in doing that? PM me.

Adron

What nice thing could I do with OpenGL? I'm a little sceptical mostly because I associate OpenGL with producing 3D graphics - lots of graphics at high speed - which would totally kill bandwidth if put as a streaming gif...

Camel

I was thinking more along the lines of expanding the winamp thing -- it's easy to produce cool looking small images with OpenGL because of the effects it provides. One need not draw frames at high speeds.

Adron

Hmmm... I like to draw this one at "realtime" speed so I see it move to the music. Any example of what I could do with OpenGL?

Camel

Quote from: Adron on July 28, 2003, 05:01 PM
Hmmm... I like to draw this one at "realtime" speed so I see it move to the music. Any example of what I could do with OpenGL?

Meh, AIM me and I'll send you a screenshot or something.