Your Ad Here

 Navigation

Home
Source code
Tutorials
RSS feeds
Articles
Books
Software
Downloads
Hosting
manuals
Forums
Script directory
Training
Our Links

 Sponsors
 Links
dropshippers
software directory
gambling sites
 Downloads
 Misc

Webmaster Resources
Only PHP
ScriptSearch.com
Scripts.com - Get the best scripts NOW!
AndreaPHP Programming



Stock ticker lookup


Stock ticker lookup

OK you have used the quote scripts on this site and they work well but they have one problem , you must know the ticker symbol in advance . We solve this problem with the following script which uses another of yahoo's useful services . In this example we enter a company name (this could come from a form with a bit of modification) and then we display the results on the page .

Here is the script

<?php
//this is the company you wish to lookup
$company = "ntl";
//this is the url from yahoo + the company
$url = "http://quote.yahoo.com/l?m=&s=" . $company . "&t=";
//open the url and store in $fp
$fp = fopen($url , "r");
//read 20000 bytes of the file
$readfile = fread($fp , 20000);
//search for the HTML below and store everything in between in $content
$readfile = ereg("<TABLE border=0 cellPadding=2 cellSpacing=0 width=100%>(.*)<small>Add</small>" , $readfile, $content);
//display the results in a table
echo "<table width = '100%'>";
echo "$content[1]";
echo "</table>";
//close the file handle
fclose($fp);
?>

And here is the output




Books
 Sponsors
 Random Code
word count example in php(string)

system uptime(functions)

World population(internet)

 Random Article
  Network

Programming resources
Tutorials directory
General bid directory
sell software, make money
Find me wholesalers
Find me dropshippers
Free recipes online/a>
UK products and price comparison
Anime videos
Free lyrics search
free stuff
UK stores
Gambling directory
Sexy free wallpapers
Hosting resources
ASP site
Golf resources
iPod resources
Coupons and deals
Baby names
Domain names
Dating site
Scripts directory
Maxi directory
bigarticle : free articles
dawgwitch search
List of directories






beginners PHP Copyright © 2004 onwards by beginnersPHP.