Re: stock quotes
| From: | Richard Lynch | Date: | Tue, 12 Dec 2000 04:22:43 +0000 |
| Subject: | Re: stock quotes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-29806@lists.php.net to get a copy of this message | ||
> anyone know any resources that would let me include current stock
> quotes in my website, maybe linking to a more descriptive page after
> clicking it?
>
> PHP or other scripting languages too
Ethical or legal considerations aside, you can just do like this:
<?php
$html =
fopen("http://yourfaveonlinetocksite.com/quotes.xxx?symbol=LNUX",
'r') or
die("Could not open site");
while (!feof($html)){
$line = fgets($html);
echo htmlEntities($line), "<BR>\n";
}
?>
Of course, you probably want to tear that HTML apart and suck out the data
you want...
There *may* be sites with Open licenses to get delayed quotes -- There
probably aren't any who can legally give you truly up-to-date content for
free.
So, technical-wise, there's no real challenge -- It's the legal issue and
whether you need truly *current* quotes that will cost you money, or
slightly old ones.