473,396 Members | 1,982 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Programming HTTP communication

I'm usually making my tennis reservations through a Web server
(http://t22-srtm-0171717070.paris.fr/...eb/index.jsp#). The drawback
is that you have to get up early in the morning in order to get your
preferred courts/timeslots...

I would like to have a short program which will:
- Connect to the Web server at a pre-defined time with my identification
data (user/pwd).
- Reserve my favorite tennis court at the preferred time.
- Disconnect from the Web server.

I don't really know what to use for building such "an application".

I looked to WinHttp API from MS Windows. The problem is to know what HTTP
request to make. For example during the identification phase, the Web server
is using Javascript with a form and a submit function. What is then sent as
HTTP commands ?

Is there a program that can "spy" the HTTP command sent by IE ? Would a
simple script program with TELNET commands be sufficient ?

Thanks in advance for your light!
Jul 24 '06 #1
3 1487
Jean Pierre MERX wrote:
I would like to have a short program which will:
- Connect to the Web server at a pre-defined time with my identification
data (user/pwd).
- Reserve my favorite tennis court at the preferred time.
- Disconnect from the Web server.
You want a 'bot' and in my opinion they are frowned upon without
consent of the webmaster.
I looked to WinHttp API from MS Windows. The problem is to know what HTTP
request to make. For example during the identification phase, the Web server
is using Javascript with a form and a submit function. What is then sent as
HTTP commands ?
Regardless, learning about this kind of stuff is interesting. Install
Firefox and the LiveHTTPHeaders extension. It will show you all the
data transferring between your computer and the server.

http://www.mozilla.com/
http://livehttpheaders.mozdev.org/installation.html#

Jul 24 '06 #2
Jean Pierre MERX wrote:
I'm usually making my tennis reservations through a Web server
(http://t22-srtm-0171717070.paris.fr/...eb/index.jsp#). The drawback
is that you have to get up early in the morning in order to get your
preferred courts/timeslots...

I would like to have a short program which will:
- Connect to the Web server at a pre-defined time with my identification
data (user/pwd).
- Reserve my favorite tennis court at the preferred time.
- Disconnect from the Web server.
As Bob said, webmasters often don't like this. Sort of the pot calling
the kettle black, if you ask me, since what is having a webserver
besides automation? Program it up properly, though, and they won't be
able to tell the difference.

There are two parts. The second part is to schedule whatever task you
come up with to happen on a regular basis. You can usually do this
from Control Panel in windows (or AT or Schtasks from the command
line), or as a chron job on linux systems.

The first part is the underlying task. I suggest doing this with a
scripting language of your choice. You could accomplish it with
vbscript or php, for example. My recommendation is to actually bring
up an instance of IE (assuming windows) and manipulate it directly, as
if you were using the browser yourself:

(starter vbscript code):
Set ie = CreateObject("InternetExplorer.Application")
ie.visible = true;
ie.Navigate2 "TennisSite.com"
While ie.ReadyState<>4: WScript.Sleep 10: Wend
'Start filling out form here:
ie.document.getElementById("userName") = "JeanPierre"
ie.document.getElementById("password") = "tennisFanatic"
ie.document.forms[1].submit
'... wait for next page
'determine court preference, etc.
If you've never done this before, you'll have some [a lot of] learning
to do. But in the end, you'll get to sleep in.

Csaba Gabor from Vienna

Jul 25 '06 #3
There are two parts. The second part is to schedule whatever task you
come up with to happen on a regular basis. You can usually do this
from Control Panel in windows (or AT or Schtasks from the command
line), or as a chron job on linux systems.

The first part is the underlying task. I suggest doing this with a
scripting language of your choice. You could accomplish it with
vbscript or php, for example. My recommendation is to actually bring
up an instance of IE (assuming windows) and manipulate it directly, as
if you were using the browser yourself:
I favor php as a personal preference. You can simulate a user's
browsing session using CURL (http://us2.php.net/manual/en/ref.curl.php)
though the initial setup may be more difficult. Then again if it was me
I'd use the socket functions
(http://us2.php.net/manual/en/ref.sockets.php).

Jul 25 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Quan Nguyen | last post by:
All examples @ MS website for serial port communication are specifically indicated for RS-232 interface, such as: ...
2
by: Hans Kamp | last post by:
I am programming an easy game (not with a commercial purpose, just with learning purpose), but I doubt whether the following way of programming is proper or advisable. The main form...
90
by: Bret Pehrson | last post by:
This message isn't spam or an advertisement or trolling. I'm considering farming some of my application development to offshore shops (I'm in the US). I have absolutely *no* experience w/ this,...
9
by: Michael Lindsey | last post by:
I need to write a server app to send images to client GUIs that are outside of the server's domain. The client will have the file system path to the image but can not access the file system. I am...
0
by: Hendra | last post by:
Hi All I need some help here, I'm now trying to communicate my Data Acquisition hardware with my PC and planning to use either VB.Net or VB ver 6.0, the problem is I dont have the appropriate...
20
by: Hugo | last post by:
Hi Y'All... I really need your help!! I've used this groups to learn and get me out of troubles but this is my first time writing a subject. My problem is that I need to make a C program...
9
by: Hao | last post by:
We are doing very intensive network communication. We collect data from thousands of electric devices every minutes. The devices understand both socket and web service. They are either embeded...
3
dmjpro
by: dmjpro | last post by:
plz send me a good link which can clearify me how the J2EE framework works i want the details information .... plz help thanx
13
by: 7stud | last post by:
I have the following two identical clients #test1.py:----------- import socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) host = 'localhost' port = 5052 #server port
0
by: Concepts Systems | last post by:
Hello All, Advance C and Linux System Programming are an intensive hands-on course designed by Concepts Systems to provide a detailed examination of each topic. These modules enable...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.