Skip to content

Commit

Permalink
urlencode what's passed to Yahoo stock quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
FastLizard4 committed Feb 21, 2013
1 parent e42ba01 commit cf5d2d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lizardbot.php
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ function dbQuery($mysql, $query, &$result) {
if($d[3] == "{$setTrigger}nyse" && hasPriv('nyse')) {
$cmdcount++;
$symbol = $d[4];
$url = sprintf('http://quote.yahoo.com/d/quotes.csv?s=%s&f=nl1c6k2t1vp', $symbol);
$url = sprintf('http://quote.yahoo.com/d/quotes.csv?s=%s&f=nl1c6k2t1vp', urlencode($symbol));
echo "-!- Getting quote for $symbol\r\n";
$quoteurl = @fopen($url, 'r') OR $data = "Error connecting to Yahoo!";
$read = fgetcsv($quoteurl);
Expand Down

0 comments on commit cf5d2d2

Please sign in to comment.