Skip to main content
GameDev.net gamedev.net
🔒 Locked

Submit info to a server

Started by Sagar_Indurkhya Jan 22, 2005 at 6:05 PM 1 replies 350+ views
Original Post
Sagar_Indurkhya
Sagar_Indurkhya
***NOTICE*** The contents of this post in no way talk about GDNET itself Ok. So lets say I have a server, with forums where they have a quick reply box at the bottom. I want to post in this reply box every hour, so I can update people about a program thing I am running. Basically, I looked through the source, and got down to these two lines: which is the posting box and which is the submit button. So basically I want to construct a program that will enter the text I choose into the box and submit to server. Is it possible to do it by just sending info to server?
benryves
benryves
I think the Web Development forum needs to have "blink" tags wrapped around the title on the forum index...

There are loads of ways of doing this. You could FTP the new file up to the server, for example. Another "easy" solution would be to create a script that takes "commands" like this:

http://path/to/webserver/script.php?title=(TITLE)&body=(BODY)

(Look in your address bar to see how GDNet does it!) and to get the program to "connect" to that address. Of course, this method isn't exactly secure, but this is the script that would do "the magic".

Are you updating a file? A database?

Then again, you could do something less hacky which would involve dealing with stuff that I'm not familiar with, so I run out of ideas.
[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]
golopart
golopart
You need to look at the beginning of the form that contains the submit button. In the form tag there may be a field named method, which takes a value of either "get" or "post" (ie method="post"). If the method field isn't present, the default posting method is via GET. This basically means that instead of sending a HTTP POST request with data contained in the HTTP packet that you can't see (unless you open up ethereal [packet capturer]), your browser will instead send a regular GET request for the URL to the location that the data is to be posted (the form's action="" field). (Your browser sends a GET request every time you click on a link [or in some cases numerous more (eg 15), if you increased firefox's number of requests; this does speed things up]). However, attached to the end of the URL, as benryves pointed out is a "?" delimiting the end of the location (be it a php file servlet or whathaveyou), and a list of properties and their respective values assigned to eachother with "="; the list elements seperated by "&". As an example click GameDev's Reply button, look up at the URL and you'll see "http://www.gamedev.net/community/forums/post.asp?method=reply&topic_id=296125". Gamedev uses the method=GET posting method because the values, namely method and topic_id aren't secure information, so they don't need to hide anything from the common user. If the above explanation doesn't help, a possible reason could be that the page uses &#106avascript (a function somewhere in the source that makes the reply (?), which I can't help you with (I'm clueless there). But, if you're grasping straws you could always just replicate what you see in Ethereal. Use a display filter like "http" or add too it if necessary and follow a few test posts on the website you're examining. Most of the garbage will be rudimentary, and only a few properties and data elements would need to be understood (assuming it's basic HTTP).

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.