30.10.2014
http://sockettest.sourceforge.net/
It's a simple Java Tool for testing any TCP or UDP Client/Server applications or services, which are based on text-data-transfer.
31.10.2014
http://www.telerik.com/fiddler
Seems to be a quite useful tool for having a look on the web traffic.
1.11.2014
Let's have a look at this simple HTML code:
<html><body> <h3>Leave a comment:</h3> <form name="formExample1" action="http://localhost:8080/process.php" method="post"> Name: <br> <input type="text" name="name" value="Jon Doe"> <br> Rating: <br> <input type="radio" name="rating" value="1" > 1 <input type="radio" name="rating" value="2" checked="true"> 2 <input type="radio" name="rating" value="3"> 3 <br> Comment: <br> <textarea name="comment">enter comments here ...</textarea> <br><br> <input type="submit" value="Submit Comment"> </form> </body></html>
It looks like this in the browser:
I set up a local TCP-server with SocketTest on port 8080. I open the html-file above in my browser, and click submit. What the server receives is:
POST /process.php HTTP/1.1 Host: localhost:8080 User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Connection: keep-alive Content-Type: application/x-www-form-urlencoded Content-Length: 53 name=Jon+Doe&rating=2&comment=enter+comments+here+...
As we see, we get all the input-fields (name-value-pairs), which are defined in the form. The data is transmitted in the HTTP-message-body. This is, because we used the method=„post“.
When we use method=„get“, the server receives folloing message:
GET /process.php?name=Jon+Doe&rating=2&comment=enter+comments+here+... HTTP/1.1 Host: localhost:8080 User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Connection: keep-alive
As we can see now, all the name-value-pairs are transmitted in the HTTP-message-header, and the message has no body.
A HTTP request header ends with an empty line. The new line characters are <CR><LF>, as used in the Windows-world.
check accessible ports on a computer in the network or on the internet:
nmap -A zeilhofer.co.at
http://www.simplehtmlguide.com
Youtube: Learn HTML in 12 Minutes
Youtube: Learn more HTML in 12 Minuts
HTML, XHTML and HTML5 Cheat Sheet as a PDF
I have created a printable version of „PHP Programming“ on wikibooks.org
https://en.wikibooks.org/wiki/Wikibooks:Collections/PHP_Programming
Here are links to my first PHP files:
http://www.zeilhofer.co.at/php_learning/helloworld.php
<?php echo "Hello World!<br>"; ?>
http://www.zeilhofer.co.at/php_learning/myfirstphpfile.php?relay1=5&relay2=7
<?php echo "Hello World!<br>"; // print unix time stamp (in seconds) // append strings with dot echo "unix time = ".time()."s<br>"; // receive arguments form the url (webrequest): // declare variables: $relay1 = $_REQUEST['relay1']; $relay2 = $_REQUEST['relay2']; echo "relay1 = $relay1 and relay2 = $relay2"; ?>
diff /etc/php5/apache2/php.ini /usr/share/doc/php5-common/examples/php.ini-development
If this command returns nothing, then your PHP uses dev configuration.
diff /etc/php5/apache2/php.ini /usr/share/php5/php.ini-production
If this command returns nothing your PHP uses production configuration.
If you want to use dev configuration,
sudo cp /usr/share/doc/php5-common/examples/php.ini-development /etc/php5/apache2/php.ini
If you want to use production configuration,
sudo cp /usr/share/php5/php.ini-production /etc/php5/apache2/php.ini