Congratulations to AcaCandy on her 100,000th post!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen blue screen boot bsod computer connection crash css dell driver drivers email error ethernet excel firefox firefox 3 game hard drive internet internet explorer itunes laptop linux malware monitor network networking nvidia outlook outlook 2003 outlook 2007 outlook express partition problem router slow software sound trojan usb video virus vista wifi windows windows vista windows xp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Help needed installing a php package


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
Rev Darkwing's Avatar
Senior Member with 120 posts.
 
Join Date: Aug 2003
Experience: Intermediate
21-May-2008, 12:12 PM #1
Help needed installing a php package
I have installed a few php features in the past but always with detailed instructions I could almost understand. This simple stock quote box has no instructions and I can't figure out how to place it in a table I have created for it.

http://www.booyahmedia.com/open-source/phpquote/

I have uploaded the folder to my root directory, but can't figure out what to do about inserting (embedding) the little quote box into the table.

I know this is noobish but this php can really confound me. Thanks
dudeking's Avatar
Computer Specs
Senior Member with 350 posts.
 
Join Date: Feb 2007
Location: UK, Midlands
Experience: I'm Pro...
21-May-2008, 05:12 PM #2
well just from looking at that page I would say you put the php onto the page you want it on and call up the veriables with echo $example;
Rev Darkwing's Avatar
Senior Member with 120 posts.
 
Join Date: Aug 2003
Experience: Intermediate
22-May-2008, 07:44 AM #3
I can get the little table into the designated cell, or more clearly, I am making progress getting it there but I can't seem to figure out how to make it actually work. Unfortunately, I don't understand what I need to do to "call up the variables with echo $example".
TroyTime's Avatar
Computer Specs
Junior Member with 12 posts.
 
Join Date: Apr 2008
Experience: programmer for 10 years, but new to vista
22-May-2008, 11:15 AM #4
As an example, here's the current (with 20 minute delay) RedHat Quote:
<br>
<TABLE BORDER=1 WIDTH=40%>
<?
include("phpquote.inc");

$my_quote=new php_quote;

$my_quote->get_single_quote("SBSE");
print("<tr><td align=right><b>Symbol:</b></td><td> $my_quote->Symbol</td></tr>\n");
print("<tr><td align=right><b>Last Trade:</b></td><td>$my_quote->Last </td></tr>\n");
print("<tr><td align=right><b>Change:</b></td><td>$my_quote->Change</td></tr>\n");
print("<tr><td align=right><b>Percentage Change:</b></td><td>$my_quote->PercChange</td></tr>\n");
print("<tr><td align=right><b>Volume:</b></td><td>$my_quote->Volume</td></tr>\n");
print("<tr><td align=right><b>Date:</b></td><td>$my_quote->Date</td></tr>\n");
print("<tr><td align=right><b>Time:</b></td><td>$my_quote->TStamp</td></tr>\n");
print("<tr><td align=right><b>Open:</b></td><td>$my_quote->Open</td></tr>\n");
print("<tr><td align=right><b>High:</b></td><td>$my_quote->High</td></tr>\n");
print("<tr><td align=right><b>Low:</b></td><td>$my_quote->Low</td></tr>\n");
print("<tr><td align=right><b>Previous Close:</b></td><td>$my_quote->PrevClose</td></tr>\n");
print("<tr><td align=right><b>Name:</b></td><td>$my_quote->Name</td></tr>\n");
print("<tr><td align=right><b>Bid:</b></td><td>$my_quote->Bid</td></tr>\n");
print("<tr><td align=right><b>Ask:</b></td><td>$my_quote->Ask</td></tr>\n");
print("<tr><td align=right><b>EPS:</b></td><td>$my_quote->EPS</td></tr>\n");
print("<tr><td align=right><b>Year Low:</b></td><td>$my_quote->YrLow</td></tr>\n");
print("<tr><td align=right><b>Year High:</b></td><td>$my_quote->YrHigh</td></tr>\n");
print("<tr><td align=right><b>PE Ratio:</b></td><td>$my_quote->PE</td></tr>\n");
?>
</TABLE>

<br> &nbsp; <br>
<?$my_quote->print_single_table();?>
Rev Darkwing's Avatar
Senior Member with 120 posts.
 
Join Date: Aug 2003
Experience: Intermediate
22-May-2008, 12:09 PM #5
Last night, since I couldn't get that one to work at all, I decided to go with another one. This one I have working perfectly when I go to the www.mydomain/phpfolder/index.php page. when I upload it and open it, it works just fine. What I can't seem to do is insert the code into a html page table in the www.mydomain/myquotepage.htm page. When I copy the entire code and insert it into the cell using code view, is visible but it isn't accessing the part that actually displays the quotes.

I am sure this is a basic skill I have not mastered and I really would appreciate it if you can tell me how to get this chart to display properly on my own html page. Here is the code for the index.php file. It really is a sweet little chart, if I can only get them to display on my pages. Thank you very much for your help!

<?php

require($_SERVER['DOCUMENT_ROOT']."/gcquotepro/includes/functions/func.gcquotepro.inc.php");

$quote = _gc_DoChart("GOOG", $_SERVER['DOCUMENT_ROOT']."/gcquotepro/stock_temp/", 120);

?>
<style type="text/css">
p.center{
text-align:center;
}
table#gtsqp_tbl{
font-family:Verdana;
border: 1px solid #3d56a6;
font-size: 12px;
margin: 5px auto;
color: #000000;
}
table#gtsqp_tbl a, table#gtsqp_tbl a:visited{
color: #FFFFFF;
font-size: 12px;
font-weight:bold;
text-decoration:none;
}
table#gtsqp_tbl a:hover{
color: #56668d;
}
table#gtsqp_tbl td{
border: 1px solid #56668d;
padding:2px;
}
table#gtsqp_tbl td.leftcol{
background-color: #3d56a6;
color: #FFFFFF;
}
table#gtsqp_tbl td.blank{
border:none;
}
table#gtsqp_tbl p{
padding:0;
margin:0;
}
table#gtsqp_tbl .tableheader{
background-color: #3d56a6;
border: 1px solid #56668d;
color: #FFFFFF;
}
table#gtsqp_tbl .tableheader p{
text-align:center;
}
table#gtsqp_tbl .tablefooter{
border: none;
}
table#gtsqp_tbl .tablefooter p{
text-align:center;
}
table#gtsqp_tbl .tablefooter img{
border: 1px solid #56668d;
}
</style>
<table id="gtsqp_tbl">
<tr>
<td colspan="5" class="tableheader"><p><?php echo ucwords(strtolower($quote[stock_name]))." (<a href='http://finance.yahoo.com/q?d=t&amp;s=".$quote[stock_symbol]."'>".$quote[stock_symbol]."</a>)"; ?></p></td>
</tr>
<tr>
<td class="leftcol"><p>Last Price:</p></td>
<td><p><?php echo $quote[stock_last]; ?></p></td>
<td rowspan="5" class="blank"></td>
<td class="leftcol"><p>Day's Range:</p></td>
<td><p><?php echo $quote[stock_low]." - ".$quote[stock_high]; ?></p></td>
</tr>
<tr>
<td class="leftcol"><p>Change:</p></td>
<td><p><img src="<?php if($quote[stock_change] > 0){ echo "images/up_arrow_g.gif"; } elseif($quote[stock_change] < 0){ echo "images/down_arrow_r.gif"; } else{ echo "images/blank.gif"; } ?>" alt="" /> <?php echo $quote[stock_change]." (".$quote[stock_percchange]."%)"; ?></p></td>
<td class="leftcol"><p>52wk Range:</p></td>
<td><p><?php echo $quote[stock_yrlow]." - ".$quote[stock_yrhigh]; ?></p></td>
</tr>
<tr>
<td class="leftcol"><p>Last Trade:</p></td>
<td><p><?php echo $quote[stock_date]." ".$quote[stock_tstamp]; ?></p></td>
<td class="leftcol"><p>Volume:</p></td>
<td><p><?php echo $quote[stock_volume]; ?></p></td>
</tr>
<tr>
<td class="leftcol"><p>Prev Close:</p></td>
<td><p><?php echo $quote[stock_prevclose]; ?></p></td>
<td class="leftcol"><p>P/E:</p></td>
<td><p><?php echo $quote[stock_pe]; ?></p></td>
</tr>
<tr>
<td class="leftcol"><p>Open:</p></td>
<td><p><?php echo $quote[stock_open]; ?></p></td>
<td class="leftcol"><p>EPS:</p></td>
<td><p><?php echo $quote[stock_eps]; ?></p></td>
</tr>
<tr>
<td colspan="5" class="tablefooter"><p><?php echo "<img src='http://ichart.yahoo.com/t?s=".$quote[stock_symbol]."' alt='' />"; ?></p></td>
</tr>
</table>
<p class="center"><?php _gc_About(); ?></p>
Closed Thread

Tags
php

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 12:42 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.