Navigation :
HomeSource code
Tutorials
RSS feeds
Articles
Wordpress plugins
Blog
Books
Software
Downloads
Hosting
manuals
Script directory
Training
Our Links
Site Sponsors :
- Load Cells
- mothers day replica rolex watches today
- Free partition data recovery utilities
- cheap reseller hosting
- MySQL & Best PHP Web Hosting + save 50%
Bookmark :
Links :
finance productsprogrammershelp
software directory
Downloads :
Misc :
Webmaster ResourcesOnly PHP
ScriptSearch.com
Scripts.com - Get the best scripts NOW!
AndreaPHP Programming
User chooses stock quotes
Same as before but the user chooses the quotes they wish to see
2 parts , first part is our form
<form action="yahoocsv2.php" method ="post" target="_blank">
Input your ticker symbol below<br>
<input type = "text" name ="request"><br>
<input type = "submit" value = "display quotes">
</form>
second part is yahoo2csv.php
<?php
//stock quote script
//this is the url for Microsoft's stock quote , we are opening it for reading
$fp = fopen ("http://finance.yahoo.com/d/quotes.csv?s=$request&f=sl1d1t1c1ohgv&e=.csv","r");
//this uses the fgetcsv function to store the quote info in the array $data
$data = fgetcsv ($fp, 1000, ",")
?>
<!-- this is our table which displays the stock info -->
<!-- we access the individual items by using $data[0]-->
<html>
<head>
</head>
<body>
<table>
<tr><td>description</td><td>latest figure</td><tr>
<tr><td>symbol</td><td><?php echo $data[0] ?></td></tr>
<tr><td>last price</td><td><?php echo $data[1] ?></td></tr>
<tr><td>date</td><td><?php echo $data[2] ?></td></tr>
<tr><td>time</td><td><?php echo $data[3] ?></td></tr>
<tr><td>change</td><td><?php echo $data[4] ?></td></tr>
<tr><td>open</td><td><?php echo $data[5] ?></td></tr>
<tr><td>high</td><td><?php echo $data[6] ?></td></tr>
<tr><td>low</td><td><?php echo $data[7] ?></td></tr>
<tr><td>volume</td><td><?php echo $data[8] ?></td></tr>
</table>
<?php
//close the filehandle $fp
fclose ($fp);
?>
Books :
Sponsors :
Random Code :
read the contents of an ini file(beginner)PI value(math)
Get the connection time with PHP and cURL(internet)
Random Article :
MySQL Database Handling in PHPSerialize this Saving Objects in PHP
Network:
Programming resourcesTutorials directory
Hosting resources
ASP site
Domain names
Progged
Maxi directory
bigarticle : free articles
A Code
Code N Tutorials
Del.icio.us
Digg
Furl
Newsvine
Netscape
Reddit
StumbleUpon
Technorati
Squidoo
Windows Live
Yahoo MyWeb
Ask
Google