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

    Updated: Oct 26, 2024
    Views: 1.0K
    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..
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • sookie

    MemberApr 28, 2010

    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 !
    Are you sure? This action cannot be undone.
    Cancel
  • hardtarget

    MemberMay 11, 2010

    Hi silverscorpion,
    Socket programming in php helps your need, you may find what you need in #-Link-Snipped-#, you can send data to port.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register