UDP Socket Programming in C

1 Comment

We will look at User Data-gram Protocol programming in this article. We will follow C-LINUX language specifications.

Our objective is to send a message from one host to another, through socket programming. We will create two programs, `Client.c` and `Server.c`.

 

Download the sample code from here.

The sample code sends a message ‘Hello World’ between the two host using UDP Socket Programming.

 

For any questions/suggestions, please comment.

Understanding Web Scraping

1 Comment

Since the evolution of world-wide-web, the world has become a small village and we refer it to ‘Global Village’. No doubt, the impact of web on personal and commercial life is very prominent and it has played a vital role in the rapid growth of information. The upbringing of web went through very innovative hands and minds. In today’s world, where we retrieve and share information with the world for several purposes, we prefer using web since it is fastest and easily accessible to more people.

 
 

Web-scraping is generally referred to scripts that surf web and collect information in certain format, for instance XML. A real life example of web-scraping is crawler. Web-scraping is another form of retrieval of data from web. It is a technique through which we can collect useful and meaningful information that we may require for any purpose.

For example, if we need to start a service to provide latest happenings in town, and we do not have interest in investing our time and money into news investigation. We can use web for retrieval of data that is required for our service. Simply we can scrap what information we require from web and use it, and run our own service.

 
 

For a business recording sales trend in a certain region, it might be easy to scrap information from web rather than generating data by them self. Similarly, developers who find other companies sharing same interest may would like to scrap some information from other web-sites and add them to their listing in order to make their system effective.

For example, a search engine, in addition to its crawler activity on world-wide-web, may have a dedicated crawler over popular search engines to gather more and effective information for its users.

 
 

Like scraping is as easy as piece of a cake for developers and maybe sometimes very unpleasant for company owners whoose sites are being scraped. Preventing scraping; anti-scraping techniques can be adapted to ensure your information is private. One of the technique used is ‘CAPTCHA: Telling Humans and Computers Apart Automatically‘. It helps preventing bots accessing private regions of your web-site.

 
 

I must not forget to mention in bold that web-scraping is ILLEGAL without permission, and it will might sometime get you in trouble. Similarly, if you own a service that provides original information, no other person can scrap your original data. To know more about your *rights*, *web-crawlers* and other terms read in this post, stay tuned. :-)