ICMP ping flood code using sockets in C – Linux
ICMP Ping Flood Icmp ping flood is a kind of DOS attack that can be performed on remote machines connected via a network. It involves sending a large number of ping echo requests (packets) to the...
View ArticleICMP ping flood code using sockets in C – Winsock
In a previous article on we saw how to construct raw icmp echo packets and send them out in large quantities to remote hosts in an attempt to bomb them. Now we are going to construct the same program...
View ArticleCode a simple telnet client using sockets in python
The telnet client is a simple commandline utility that is used to connect to socket servers and exchange text messages. Here is an example of how to use telnet to connect to google.com and fetch the...
View ArticlePython socket – chat server and client with code example
Socket based chat application In our previous article on we learned about the basics of creating a socket server and client in python. In this post we are going to write a very simple chat application...
View ArticleOptimise your database design for speed and efficiency – Part 1
Database schemas Databases are present in almost all kinds of application that need to store information in some form or the other. Web applications like blogs, cms, social networking sites or business...
View ArticlePhp – Do not rely on set_time_limit too much
Php set_time_limit Php has a function called set_time_limit which can be used to dynamically adjust the maximum execution time permitted to a script. It allows specifying the time in seconds and limits...
View ArticleOutput buffering in php and apache
Output Buffering Output buffering is processing mechanism where the output being generated by a program is held in a place till its size reaches a limit or the generation is complete. Only after, will...
View ArticleCode a simple socket server in Python
Python sockets In a previous tutorial we learnt how to do basic . The tutorial explained how to code a socket server and client in python using low level socket api. Check out that tutorial if you are...
View ArticleHow to compile and install wxWidgets on Ubuntu/Debian/Linux Mint
wxWidgets wxWidgets is an application development framework/library that allows developer to make cross platform GUI applications for Windows, Mac and Linux using the same codebase. Its primarily...
View ArticleValidate domain name using filter_var function in php
The filter_var function of php is capable of validating many things like emails, urls, ip addresses etc. It does not have a direct option to validate a domain name however. So I coded up this little...
View ArticleParse the user agent with ua-parser in php – detect browser, os and device
In your web application you might need to parse the user's user-agent string to find out the browser/OS/device being used. This is necessary specially when your webapp tries to adapt to the user's...
View ArticleSocket Programming with Streams in Php – How to Code Client and Server
Socket Programming Socket programming involves connecting to remote machines on LAN or over the internet using ip addresses and port number. For example google.com has an ip "173.194.36.3" and runs...
View ArticlePhp – How to fetch gzipped content over HTTP with file_get_contents
The file_get_contents function is often used to quickly fetch a http url or resource. Usage is very simple and appears like this $content = file_get_contents('http://www.google.com/'); However the...
View ArticlePhp – Fix “Input is not proper UTF-8, indicate encoding” error when loading xml
When loading xml files in php through simplexml_load_string or domDocument class, sometimes an error like this might popup Warning: DOMDocument::loadXML(): Input is not proper UTF-8, indicate encoding...
View ArticleHow to modify a SoapClient request in PHP
SOAP and PHP SOAP is a protocol to exchange objects over http. It is used to implement apis and the data being exchanged is in xml format. Sometimes it might be required to modify the soap request to...
View ArticleHow to Code a simple Tcp Socket Server in Winsock
Communication over sockets involves 2 programs running on the same machine or on separate machines across a network. First is a socket server and the other is a socket client. Tcp stands for...
View ArticleHow to configure xdebug error messages to open file in Kate editor on Ubuntu
Xdebug is a powerful debugging and profiling tool for php that allows you to find and fix errors faster by showing the entire stack trace and source code file and line number. If you want your php...
View ArticleHow to Install PyOpenGL on Windows 10
PyOpenGL is an python module that implements OpenGL functions in python allowing you to write OpenGL applications using Python. With OpenGL you are able to write applications that use "GPU...
View ArticleHow to Setup MySQL Replication on Ubuntu/Debian – A Step-by-Step Guide for...
In production database setups, mysql replication is commonly used to duplicate a single database over many database servers. The primary database is referred to as the master database, while the other...
View ArticleHow to Get true pixel height and width of window in javascript
If you check the window outerwidth on a maximised browser window, you should get the resolution width of your screen or display in general. For example when I run the following code (in console) in...
View Article