Ask Question Forum:
Model Library:2025-02-08:A.I. model is online auto reply
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by duncanb7
at 2024-07-09 02:16:55
Point:500 Replies:13 POST_ID:828565USER_ID:11059
Topic:
Java Programming Language;PHP Scripting Language;Apache Web Server
As we know we will use http protocol to browser comunication between Client and server and normally using port 80. I want to know where the protocol program is located on
the Linux server ? and what program language is using to write the protocol, Is C or PHP ?
Recently I study and run php program for socket communication
from the link at php.net ,http://php.net/manual/en/sockets.examples.php at using
port 10000 for my Linux server, it is successfully. Now I would like
to write PHP script to simulate http protocol program but want to use port 10000 instead of 80.
where the http protocol program is located on
the Linux server ? and what program language is using to write the protocol, Is C or
PHP ? So ,I can base on the program reference to start
Please advise
Duncan
the Linux server ? and what program language is using to write the protocol, Is C or PHP ?
Recently I study and run php program for socket communication
from the link at php.net ,http://php.net/manual/en/sockets.examples.php at using
port 10000 for my Linux server, it is successfully. Now I would like
to write PHP script to simulate http protocol program but want to use port 10000 instead of 80.
where the http protocol program is located on
the Linux server ? and what program language is using to write the protocol, Is C or
PHP ? So ,I can base on the program reference to start
Please advise
Duncan
Author: duncanb7 replied at 2024-07-10 09:13:20
Thanks for all of reply. Get more understood
Accepted Solution
Expert: Amitkumar Panchal replied at 2024-07-10 00:08:53
84 points GOOD
Yes, the base for every implementation for the RFC (ie, http, telnet, smtp) would be the socket programming. No matter which programming language you will use.
Assisted Solution
Expert: Amitkumar Panchal replied at 2024-07-10 00:07:21
83 points GOOD
duncanb7,
If you want to program for a particular protocol (ie. http), you will need to refer the RFC for the same. RFC is nothing but a specification that will explain what should be the input and what should be the output. Now, how to process input and generate output, it's up to the programmer who is implementing that RFC.
refer the below link for the RFC for http protocol.
http://www.w3.org/Protocols/rfc2616/rfc2616.html
Port is the different thing, the standard has defined port numbers for specific protocol (ie. 80 for http, 25 for smtp, 23 for telnet etc), but it's up to the programmer that will decide on which port your program will work. programmer can make it configurable. Examples are apache, tomcat (programmer for apache and tomcat made the port configurable so that user can configure it as per the requirement).
If you want to program for a particular protocol (ie. http), you will need to refer the RFC for the same. RFC is nothing but a specification that will explain what should be the input and what should be the output. Now, how to process input and generate output, it's up to the programmer who is implementing that RFC.
refer the below link for the RFC for http protocol.
http://www.w3.org/Protocols/rfc2616/rfc2616.html
Port is the different thing, the standard has defined port numbers for specific protocol (ie. 80 for http, 25 for smtp, 23 for telnet etc), but it's up to the programmer that will decide on which port your program will work. programmer can make it configurable. Examples are apache, tomcat (programmer for apache and tomcat made the port configurable so that user can configure it as per the requirement).
Expert: Slimshaneey replied at 2024-07-09 08:32:35
I would have a look at some examples here:
http://www.devshed.com/c/a/PHP/Socket-Programming-With-PHP/
I really dont think you need to go down the "rewriting apache" route to get your project working.
http://www.devshed.com/c/a/PHP/Socket-Programming-With-PHP/
I really dont think you need to go down the "rewriting apache" route to get your project working.
Author: duncanb7 replied at 2024-07-09 08:29:56
Just know the concept of communcation of http protocol.
Probaby we can write simple php script to socket for http protocol
and client send header request and server receive request and
send out response with the html/js file for client's expectation
Finall, just confirm what ever lanuguage, server is using
socket to bind, connect to make http protocal comunication with Client, Right,
If yes, probably, that clarify my understanding to socket communcation with http
Probaby we can write simple php script to socket for http protocol
and client send header request and server receive request and
send out response with the html/js file for client's expectation
Finall, just confirm what ever lanuguage, server is using
socket to bind, connect to make http protocal comunication with Client, Right,
If yes, probably, that clarify my understanding to socket communcation with http
Assisted Solution
Expert: Slimshaneey replied at 2024-07-09 03:16:26
83 points GOOD
Just know the concept of communcation of http protocol.
Probaby we can write simple php script to socket for http protocol
and client send header request and server receive request and
send out response with the html/js file for client's expectation
Finall, just confirm what ever lanuguage, server is using
socket to bind, connect to make http protocal comunication with Client, Right,
If yes, probably, that clarify my understanding to socket communcation with http
Probaby we can write simple php script to socket for http protocol
and client send header request and server receive request and
send out response with the html/js file for client's expectation
Finall, just confirm what ever lanuguage, server is using
socket to bind, connect to make http protocal comunication with Client, Right,
If yes, probably, that clarify my understanding to socket communcation with http
Assisted Solution
Expert: Slimshaneey replied at 2024-07-09 03:16:26
83 points GOOD
Just know the concept of communcation of http protocol.
Probaby we can write simple php script to socket for http protocol
and client send header request and server receive request and
send out response with the html/js file for client's expectation
Finall, just confirm what ever lanuguage, server is using
socket to bind, connect to make http protocal comunication with Client, Right,
If yes, probably, that clarify my understanding to socket communcation with http
Probaby we can write simple php script to socket for http protocol
and client send header request and server receive request and
send out response with the html/js file for client's expectation
Finall, just confirm what ever lanuguage, server is using
socket to bind, connect to make http protocal comunication with Client, Right,
If yes, probably, that clarify my understanding to socket communcation with http
Author: duncanb7 replied at 2024-07-09 03:13:34
So, it seems , we just only found the http setting or load module in httpd.conf or apache directory but we can't find out the source code and we don't know what script lanauge
to write such http protocol.
It seems it is C program to write protocol, I found there is a lot *.h header file in apache
directory. And normally it doesn't provide source code for users, Right ?
Duncan
to write such http protocol.
It seems it is C program to write protocol, I found there is a lot *.h header file in apache
directory. And normally it doesn't provide source code for users, Right ?
Duncan
Author: duncanb7 replied at 2024-07-09 02:54:39
Dear CEHJ,
it is not related to Java, but through tutorial pratise, know a lot of thing.
know fundumental concept will be easier to write or complier program
whatever langauge
it is not related to Java, but through tutorial pratise, know a lot of thing.
know fundumental concept will be easier to write or complier program
whatever langauge
Assisted Solution
Expert: CEHJ replied at 2024-07-09 02:42:07
83 points GOOD
I want to know where the protocol program is located on the Linux server ?
That would vary. The program is usually Apache. On my system, it's to be found at /usr/sbin/apache2
Assisted Solution
Expert: Amitkumar Panchal replied at 2024-07-09 02:37:11
83 points GOOD
Agree wirh Slimshaneey.
Any application can use any port and if the application is using the port number less than 1024 then it must be run by admin user. The application uses port number greater than 1024 does have such constraint.
Any application can use any port and if the application is using the port number less than 1024 then it must be run by admin user. The application uses port number greater than 1024 does have such constraint.
Expert: CEHJ replied at 2024-07-09 02:36:06
Not sure what this is to do with Java ..?
Assisted Solution
Expert: Slimshaneey replied at 2024-07-09 02:23:07
84 points GOOD
You can configure any language to use whatever port you want. If you want PHP to run on port 10000, thats fine, edit PHP.ini and your webserver config file (httpd.conf or apache.conf or whatever server you choose), there is a setting specifically for that.
For sockets, setting ports to use is simply part of the parameters when opening the socket. Be careful not to use a socket already is use by another process though!
For sockets, setting ports to use is simply part of the parameters when opening the socket. Be careful not to use a socket already is use by another process though!