Featured Posts

Writing Website Scrapers in PHPWriting Website Scrapers in PHP This article discusses about how to write a website scraper using PHP for web site data extraction. The concepts taught can be applied and programmed in Java, C#, etc. Basically any language that has a...

Readmore

12 common programming mistakes to avoid12 common programming mistakes to avoid Programming is an art and science and like all art and science the only way to learn is from mistakes. I have made many... and I would like to share with you the mistakes that I have made over my journey...

Readmore

7 habits of highly effective freelance programmers7 habits of highly effective freelance programmers I have developed these based on my freelancing experience. Though I have discontinued freelancing, but would like to share my practices with you. These are basic practices and have been developed over...

Readmore

  • Prev
  • Next

Writing Website Scrapers in PHP

Posted on : 26-02-2008 | By : admin | In : PHP, PHP Code Examples, Programming

16

If you're new here, you may want to subscribe to my Newsletter. Thanks for visiting!

This article discusses about how to write a website scraper using PHP for web site data extraction. The concepts taught can be applied and programmed in Java, C#, etc. Basically any language that has a powerful string processing capability. This article will teach you the basics of website scraping. The article will further cover a tutorial to find web ranking from Yahoo.com search engine.

PHP 5 Tutorial - Handling Exceptions in PHP5

Posted on : 14-02-2008 | By : admin | In : PHP, PHP Class Examples, PHP Code Examples, PHP Tutorials, PHP5 OOPS Tutorials

2

In this tutorial we will cover the following:

  • What is an exception?
  • The use of a try…catch block
  • Anatomy of PHP5 Exception class
  • Extending the Exception class
  • A note on unhanded exceptions

PHP Script to print nested array

Posted on : 16-11-2007 | By : admin | In : PHP, PHP Code Examples

5

Here is a script that will allow you to print a nested array upto any level. Can I request you to please review this and let me know how this can be further optimized.

PHP Script to Extract Email Address from any text

Posted on : 14-11-2007 | By : admin | In : PHP, PHP Code Examples, Programming

4

I have developed a function that you can embed in your PHP applications that will help you extract email addresses from a given piece of text.

I have tested this on a string of (actually 4 - 5 paragraphs) text and this has performed very well.

Please feel free to use this code in your applications and let me know if you face any issues.