Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: QwertyMonster on December 20, 2005, 07:00 PM

Title: Posting in a shoutbox on piczo?
Post by: QwertyMonster on December 20, 2005, 07:00 PM
Spht told me just to do:


Inet1.Execute "http://pic3.piczo.com/go/shoutbox?sb=158486&sbo=206585&shoutername=hmm&text=hmm"


That doesn't seem to be working. Anybody got ANY ideas how to post in a piczo shoutbox? I packetlogged it, but spht said that the Inet way was the easiest.

Thanks in advance!
Title: Re: Posting in a shoutbox on piczo?
Post by: dxoigmn on December 20, 2005, 07:03 PM
What is piczo?
Title: Re: Posting in a shoutbox on piczo?
Post by: QwertyMonster on December 20, 2005, 07:15 PM
http://www.piczo.com

Some shit website maker. I just want to make a bot so i can auto post in some (and spam some maybe?).
Title: Re: Posting in a shoutbox on piczo?
Post by: dxoigmn on December 20, 2005, 07:17 PM
Quote from: Saphire on December 20, 2005, 07:15 PM
http://www.piczo.com

Some shit website maker. I just want to make a bot so i can auto post in some (and spam some maybe?).

Any example piczo sites with a shoutbox?
Title: Re: Posting in a shoutbox on piczo?
Post by: QwertyMonster on December 20, 2005, 07:26 PM
http://wotyasay.piczo.com/?cr=3&rfm=y

(Warning: The SITE sucks cock.)
Title: Re: Posting in a shoutbox on piczo?
Post by: FrOzeN on December 20, 2005, 07:59 PM
The source code, in the form's method is 'POST'. Therefore it sends the data to the next page opposed to sending it in the title bar (something=value) which is 'GET'.

I don't exactly know the format browser's use to send the data. Though you'll have to look it up in order to post messages in that shoutbox.
Title: Re: Posting in a shoutbox on piczo?
Post by: QwertyMonster on December 20, 2005, 08:05 PM
Hmm i see. I think i'll do a little more research on it, if not i'll just leave it. Thanks for all help at the moment people!
Title: Re: Posting in a shoutbox on piczo?
Post by: dxoigmn on December 20, 2005, 09:11 PM
It's going to be something like:


Inet1.Execute "http://pic3.piczo.com/go/shoutbox", "POST", "sb=158486&sbo=206585&shoutername=hmm&text=hmm"
Title: Re: Posting in a shoutbox on piczo?
Post by: FrOzeN on December 20, 2005, 09:26 PM
IIRC, .OpenURL is used for returning information whereas .Execute just sends it (which is much more efficient/faster).
Title: Re: Posting in a shoutbox on piczo?
Post by: QwertyMonster on December 21, 2005, 07:11 AM
Quote from: dxoigmn on December 20, 2005, 09:11 PM
It's going to be something like:


Inet1.Execute "http://pic3.piczo.com/go/shoutbox", "POST", "sb=158486&sbo=206585&shoutername=hmm&text=hmm"


That didn't work? :-/ And i've tried other ways and none work. Hm :/
Title: Re: Posting in a shoutbox on piczo?
Post by: Adron on December 21, 2005, 07:39 AM
wget http://pic3.piczo.com/go/shout --post-data="sb=444952&sbo=558902&shoutername=Me&text=Cool!"

That worked, so the string format was OK, but the target url was wrong...
Title: Re: Posting in a shoutbox on piczo?
Post by: rabbit on December 21, 2005, 09:05 AM
You'll want to read up about the HTTP POST method (http://www.jmarshall.com/easy/http/#postmethod) and then use a socket.  The Inet control is possibly one of the worst controls ever made.
Title: Re: Posting in a shoutbox on piczo?
Post by: dxoigmn on December 21, 2005, 01:53 PM
Quote from: rabbit on December 21, 2005, 09:05 AM
The Inet control is possibly one of the worst controls ever made.

Why?
Title: Re: Posting in a shoutbox on piczo?
Post by: rabbit on December 21, 2005, 04:05 PM
You can tell it to halt (.Cancel, I think), but it actually doesn't, and if you try to use .Execute or .OpenURL while it's doing something it errors out, and if you don't handle the error, your program crashes.  A Socket is just so much easier to use for something like this.
Title: Re: Posting in a shoutbox on piczo?
Post by: effect on December 22, 2005, 12:22 AM
Usually in any program if you have an error and u dont handle it, the program crashes....
Title: Re: Posting in a shoutbox on piczo?
Post by: rabbit on December 22, 2005, 03:18 PM
But since it's a control, you can't go and change the code to fix the error.
Title: Re: Posting in a shoutbox on piczo?
Post by: Adron on December 22, 2005, 05:25 PM
Quote from: rabbit on December 22, 2005, 03:18 PM
But since it's a control, you can't go and change the code to fix the error.

It is meant to be handled...
Title: Re: Posting in a shoutbox on piczo?
Post by: rabbit on December 23, 2005, 09:34 AM
I prefer to fix my errors, not make them easier on the eyes.
Title: Re: Posting in a shoutbox on piczo?
Post by: Adron on December 23, 2005, 11:56 AM
Quote from: rabbit on December 23, 2005, 09:34 AM
I prefer to fix my errors, not make them easier on the eyes.

You are wrong in this case. There are many errors that can not be fixed by the programmer. You absolutely MUST handle errors in your program. How are you as a programmer going to fix the error of user not being connected to the internet? How are you as a programmer going to fix the error of user's hard drive being full? Error handling is vital.
Title: Re: Posting in a shoutbox on piczo?
Post by: rabbit on December 23, 2005, 08:17 PM
Yes, but in the case of a control crashing because it doesn't check its own connection state before attempting to connect (again, without disconnecting), well...that's just stupid.
Title: Re: Posting in a shoutbox on piczo?
Post by: Adron on December 23, 2005, 08:43 PM
Quote from: rabbit on December 23, 2005, 08:17 PM
Yes, but in the case of a control crashing because it doesn't check its own connection state before attempting to connect (again, without disconnecting), well...that's just stupid.

You need error handling for the control either way. And one might consider the programmer telling the control to connect again without disconnecting.. stupid! I find it quite reasonable of a control to raise an error if you tell it to do something that you should not.
Title: Re: Posting in a shoutbox on piczo?
Post by: Warrior on December 23, 2005, 09:41 PM
I agree with Adron, instead of making the Programmer not have to worry about them the control should enforce the good programming habbits he should already have.
Title: Re: Posting in a shoutbox on piczo?
Post by: topaz on December 23, 2005, 10:02 PM
Quote from: rabbit on December 23, 2005, 08:17 PM
Yes, but in the case of a control crashing because it doesn't check its own connection state before attempting to connect (again, without disconnecting), well...that's just stupid.

It does exactly what you told it to! Just build checks and error handling into your code (Like disconnecting right before connecting), and you shouldn't have problems.
Title: Re: Posting in a shoutbox on piczo?
Post by: rabbit on December 24, 2005, 09:10 AM
Do this:
Add an INet control.
Call .OpenURL or .Execute on some page.
Call .Cancel and/or .StopExecution (I think).
Call .OpenURL or .Execute on some page, again.
Hit the "OK" button when the control tells you it's errored and watch you're program close.
Title: Re: Posting in a shoutbox on piczo?
Post by: FrOzeN on December 24, 2005, 05:59 PM
Quote from: rabbit on December 24, 2005, 09:10 AM
Do this:
Add an INet control.
Call .OpenURL or .Execute on some page.
Call .Cancel and/or .StopExecution (I think).
Call .OpenURL or .Execute on some page, again.
Hit the "OK" button when the control tells you it's errored and watch you're program close.
That won't cause an error because each line doesn't get executed until the one above have finished.

By adding that code into a command _Click() event or something. Then clicking that object twice in a row will cause the error even if the last line is to .Cancel it's last request.
Title: Re: Posting in a shoutbox on piczo?
Post by: Adron on December 24, 2005, 11:57 PM
I see no documentation saying that the Cancel method is guaranteed to finish immediately. There are several states you can get:

icDisconnecting 9 The control is disconnecting from the host computer.

icDisconnected 10 The control successfully disconnected from the host computer.

Try waiting for the control to finish cancelling the request it was working on before you give it a new request to execute.
Title: Re: Posting in a shoutbox on piczo?
Post by: FrOzeN on December 25, 2005, 01:11 AM
Quote from: Adron on December 24, 2005, 11:57 PM
I see no documentation saying that the Cancel method is guaranteed to finish immediately. There are several states you can get:

icDisconnecting 9 The control is disconnecting from the host computer.

icDisconnected 10 The control successfully disconnected from the host computer.

Try waiting for the control to finish cancelling the request it was working on before you give it a new request to execute.
Thus the reason why it is such a crap control. It should have these simply preventative measures built into it to stop crashing upon error, rather than getting the coder to check if it's connected or not continuously.
Title: Re: Posting in a shoutbox on piczo?
Post by: topaz on December 25, 2005, 03:07 AM
Shouldn't be expecting Microsoft to do everything for you...
Title: Re: Posting in a shoutbox on piczo?
Post by: QwertyMonster on December 25, 2005, 09:51 AM
Wow went wayy off-topic here.



Thank-you for all your help. I will look into it. When i have time, having good time since its xmas at the moment.
Title: Re: Posting in a shoutbox on piczo?
Post by: Adron on December 25, 2005, 11:23 AM
Quote from: FrOzeN on December 25, 2005, 01:11 AM
Thus the reason why it is such a crap control. It should have these simply preventative measures built into it to stop crashing upon error, rather than getting the coder to check if it's connected or not continuously.

You are completely missing the point here. The control is *not* crashing upon error. The control is returning an error code to the application. Visual Basic has the built-in feature of crashing if the programmer fails to properly check for returned error codes. Blame Visual Basic if anything. Calling that control from C++ would not make it crash on an error.
Title: Re: Posting in a shoutbox on piczo?
Post by: UserLoser. on December 25, 2005, 11:23 AM
Quote from: FrOzeN on December 25, 2005, 01:11 AM
Quote from: Adron on December 24, 2005, 11:57 PM
I see no documentation saying that the Cancel method is guaranteed to finish immediately. There are several states you can get:

icDisconnecting 9 The control is disconnecting from the host computer.

icDisconnected 10 The control successfully disconnected from the host computer.

Try waiting for the control to finish cancelling the request it was working on before you give it a new request to execute.
Thus the reason why it is such a crap control. It should have these simply preventative measures built into it to stop crashing upon error, rather than getting the coder to check if it's connected or not continuously.

It's not a crap control.  Sorry, this isn't the CleanSlateBot of Internet web page transfer.  Doing a simple "If-Then-Else" isn't much trouble and it's better practice anyways instead of being so damn lazy.  Perhaps you can write a better control for us to use which has the same ability as msinet.ocx (the Inet control).
Title: Re: Posting in a shoutbox on piczo?
Post by: Joe[x86] on December 31, 2005, 03:38 AM
QuoteSorry, this isn't the CleanSlateBot of Internet web page transfer.

Ahh, that made me chuckle.