|
|
Web Fetching
PHP » Tips and Tutorials » Web Fetching
A D V E R T I S E M E N T
Want free Oracle Magazine? Apply here now!
PHP and cURL example - FreeThis shows how to grab a page from either your own site or another using PHP and cURL. This in fact can be done with only 4 lines of code Data Mining Tools - Tutorial & PHP FunctionsData 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. grab yahoo stock quotesIn this example we allow a user to enter a ticker example (e.g SUN for sun , MSFT for Microsoft ) and then display the relevant stock info for them. This can be adapted to show only the shares you wish to show or even loop through an array of ticker symbols). yahoo stock quote (csv file) - freeThis 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. Using PHP to automate updating dynamic content. - FreeUsing the example of displaying the latest slashdot.org headlines on your website, this tutorial shows you how to use PHP to update dynamic content without the need for cron. Using Regular Expressions to get HTML tags - FreewareThis 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. How to create a web catching programThis 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! Leeching News from SitesEver 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.
|
A D V E R T I S E M E N T
|
Subscribe to SourceCodesWorld - Techies Talk |
| |
|