This article will show the SIMPLE use of regular expressions (Perl style/PCRE) to get the values of data delimited by HTML tags. Instead of building a parser that pushes start tags onto a stack and pulls them off once a stop tag is found (if one is found) I find it much easier to use regular expressions. This article is NOT a primer to regular expressions and only shows this particular example....
Ever wonder how those sites you visit have headlines from other sites appearing on their pages? An explanation of how to take Slashdot.org`s headlines explains the methods used. First it uses a small bash script to get the news, and then a perl script for inserting news into MySQL. Finally, Using PHP it makes a simple configurable table for news results.... Tags:
This tutorial walks you through on how to create "your own" content grabbing program in minutes. It`ll tell you how to create connections, parse unwanted data, smoothen it out and then display it customized to your needs, using a simple yet concrete example of grabbing news from yahoo!...
This example shows how to get the CSV file for a certain company . We can then get all of the entries and display them individually . This means you could display only the entries that interest you....
Data Mining Tutorial complete with Data Mining Tools (PHP Functions) to parse data and match based on regular expressions. Basic Data Mining Steps: Fetch the HMTL page(s) of Interest using the Snoopy PHP Class, Split the page HTML into a more managable portion, Remove un-wanted HTML tag attributes, Reformat HTML, adjust spacing and remove entities, Match content with regular expressions and Store content into a MySQL database for future use. Data mining services available for online resources such as Google, DMOZ, Yahoo, Yellow Pages and several others....
Overture Keyword Extractor is a php driven function which will help you to fetch the content of the Keyword Selector Page of the yahoo search engine queries archive. It is very simple to use and implement, and the result is a simple array which can be used in any keyword research application....
Using freely available php classes I show how it is possible to download the contact list from Gmail and/or the MSN messenger service (given a username and password) and return this to the user. The user can then select or deselect the contacts they wish to send an email to before submitting the form and sending emails to all their chosen contacts.
This is quite a nice method to `turbocharge` the basic `tell-a-friend` style script. Rather than contacting one friend it is quick and simple to contact fifty or a hundred contacts which means more likely visitors to your site....
Most scripts written for getting a google pagerank connect to the google servers everytime someone views a page where the script is called. Depending on how busy your site is this can mean that you connect to google thousands of times each day to get exactly the same information.
This script uses a cache to prevent this from happening. The first time someone visits your site the script connects to google and then after that the pagerank value is fetched from a cache. This is far faster (my tests suggested about 30 times faster) and requires less bandwidth.
Beyond the benefits in time it is also easy to use and can be used to either fetch a value for the pagerank or generate html code to display an image representing the pagerank...
For the most of the PHP scripter which are using preg_match or preg_replace frequently is the function preg_match_all a smaller advantage, but for all others its maybe hard to understand. The biggest difference between preg_match_all and the regular preg_match is that all matched values are stored inside a multi-dimensional array to store an unlimited number of matches....
In this tutorial I will show you how you can easy check META information of any website. It can be very useful in search engine optimization when you want to check your competitors settings....
This script first tries to find the meta tags including the description, title and keywords of a web page and if it does not get any, it will extract the content using the Curl library and the iconv function which takes into consideration the different charset.
There is a live demo....