PX : code

Company Symbol Lookup by Mukul Sabharwal
Download this code


<html>
<head>
<title>Stock Market : Symbol Lookup</title>
</head>
<body>
<form action="<?php echo basename($PHP_SELF); ?>" METHOD="POST">
<input type="text" name="company">
<input type="submit" NAME="action" value="Submit">
</form>
<?php
if ($action)
{
$cgi "http://www1696.cgi.l3.xodox.com/cgi-bin/quote.cgi";
$recieve str_replace("%20""+"$company);
$recieve str_replace("&""%26"$company);
$file fopen("http://quote.yahoo.com/l?s=$company""r");
$readfile fread($file20000);
eregi("returned:<p>(.*)<p>Select"$readfile$printing);
$printing[1] = str_replace("q?s=""$cgi?tickers="$printing[1]);
$printing[1] = eregi_replace("(<table border=1>)+""\\1<table border=0>"$printing[1]);
fclose($file);
if(
$printing[1] != "")
{
echo 
"<font face=arial>$printing[1]</font>";
}
else
echo 
"<font face=arial>No matches for the company name $company you entered. Try again</font>";
}
else
{
echo 
"<font face=arial>Enter a company name, and press the submit button and not enter key.</font>";
}
?>
</body>
</html>

Comments or questions?
PX is running PHP 5.2.17
Thanks to Miranda Productions for hosting and bandwidth.
Use of any code from PX is at your own risk.