How to send data to a port from a webpage??

Hi guys,
I'm in need of something for a project.

I have a webpage. It has HTML and some php in it. Now, the page has a button. If the button is clicked,
I want to get the value of a particular textbox in the page and send it to a port in the server's computer.How to do that?

To elaborate, the server computer will be running a java program which will be listening on a particular port. Now, if the client
clicks a button, then the textbox value must come to the port which is being listened to in the server. How can I do this? Any ideas?

Edit : Assume port number to be anything other then ports which are used for specific things by default, say 80 or 21.
Assume it to be 8001 or 9000 etc..

Replies

  • sookie
    sookie
    Hi silverscorpion,

    I guess if you add a property of the same name as that of your "textbox" name in html.php page and make getter setter of that property then that value should be available in your java program. Still, can't say anything without looking at your both the programs because way of retrieving parameter value changes based on the way they are passed.

    If possible, please post your piece of code. Thanks !
  • hardtarget
    hardtarget
    Hi silverscorpion,
    Socket programming in php helps your need, you may find what you need in #-Link-Snipped-#, you can send data to port.

You are reading an archived discussion.

Related Posts

Hi! how do i have to set a joint between a cbeam and a rod to obtain a right behaviour of the system when under bending deformation? i'm trying with...
plz guide me friends...plz tell me i am new to php but i want to do mini project in php tell me some topics and tell me some books to...
guys i have so many doubts i will ask those in a regular manner.....I like crazyengineers so much .It will satisfy my all my technical starvation. My first doubt actually...
actually .gif animations are not working in linux as in windows.why is it so? what is the reason beyond that?And if possible how .gif works?
sir i need to know which colleges are good for MBA and MCA courses ie wrt placement activities in BANGALORE