networking
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
networking [2014/10/31 21:14] – karl | networking [2018/03/26 00:44] (aktuell) – [php.ini] karl | ||
---|---|---|---|
Zeile 10: | Zeile 10: | ||
{{: | {{: | ||
- | ==== Fiddler Web Debugger ==== | + | ===== Fiddler Web Debugger ===== |
+ | 31.10.2014\\ | ||
http:// | http:// | ||
Seems to be a quite useful tool for having a look on the web traffic. | Seems to be a quite useful tool for having a look on the web traffic. | ||
+ | |||
+ | ===== HTTP GET vs. POST ===== | ||
+ | 1.11.2014\\ | ||
+ | Let's have a look at this simple HTML code: | ||
+ | < | ||
+ | < | ||
+ | <form name=" | ||
+ | Name: <br> <input type=" | ||
+ | Rating: <br> | ||
+ | <input type=" | ||
+ | <input type=" | ||
+ | <input type=" | ||
+ | Comment: <br> < | ||
+ | <input type=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | It looks like this in the browser: \\ | ||
+ | {{networking: | ||
+ | |||
+ | I set up a local TCP-server with [[# | ||
+ | POST / | ||
+ | Host: localhost: | ||
+ | User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/ | ||
+ | Accept: text/ | ||
+ | Accept-Language: | ||
+ | Accept-Encoding: | ||
+ | Connection: keep-alive | ||
+ | Content-Type: | ||
+ | Content-Length: | ||
+ | | ||
+ | name=Jon+Doe& | ||
+ | |||
+ | As we see, we get all the input-fields (name-value-pairs), | ||
+ | When we use **method=" | ||
+ | GET / | ||
+ | Host: localhost: | ||
+ | User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/ | ||
+ | Accept: text/ | ||
+ | Accept-Language: | ||
+ | Accept-Encoding: | ||
+ | Connection: keep-alive | ||
+ | | ||
+ | |||
+ | As we can see now, all the name-value-pairs are transmitted in the HTTP-message-header, | ||
+ | |||
+ | A HTTP request header ends with an empty line. The new line characters are < | ||
+ | |||
+ | ===== nmap ===== | ||
+ | check accessible ports on a computer in the network or on the internet: | ||
+ | nmap -A zeilhofer.co.at | ||
+ | |||
+ | ===== Learning HTML ===== | ||
+ | http:// | ||
+ | [[https:// | ||
+ | [[https:// | ||
+ | [[http:// | ||
+ | |||
+ | ===== Learning PHP ===== | ||
+ | I have created a printable version of "PHP Programming" | ||
+ | https:// | ||
+ | |||
+ | Here are links to my first PHP files:\\ | ||
+ | http:// | ||
+ | <file php helloworld.php> | ||
+ | <?php | ||
+ | |||
+ | echo "Hello World!< | ||
+ | |||
+ | ?> | ||
+ | </ | ||
+ | |||
+ | http:// | ||
+ | <file php myfirstphpfile.php> | ||
+ | <?php | ||
+ | |||
+ | echo "Hello World!< | ||
+ | |||
+ | // print unix time stamp (in seconds) | ||
+ | // append strings with dot | ||
+ | echo "unix time = " | ||
+ | |||
+ | // receive arguments form the url (webrequest): | ||
+ | |||
+ | // declare variables: | ||
+ | $relay1 = $_REQUEST[' | ||
+ | $relay2 = $_REQUEST[' | ||
+ | |||
+ | echo " | ||
+ | ?> | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== php.ini ===== | ||
+ | |||
+ | diff / | ||
+ | |||
+ | If this command returns nothing, then your PHP uses dev configuration. | ||
+ | |||
+ | diff / | ||
+ | |||
+ | If this command returns nothing your PHP uses production configuration. | ||
+ | |||
+ | If you want to use dev configuration, | ||
+ | |||
+ | sudo cp / | ||
+ | |||
+ | If you want to use production configuration, | ||
+ | |||
+ | sudo cp / | ||
+ | | ||
+ | | ||
+ | {{tag> | ||
+ |
networking.1414786485.txt.gz · Zuletzt geändert: 2014/10/31 21:14 von karl