Feherke,
Thank you for the contribution. I suppose the code is tested and I can just use it.
Below is the getstock($sym) code. I think make a call to get all stocks at once will create too much delay that looks stalled.
$d = date('j'); //day of month 1-31
$m = date('n'); //month 1-12
$y =...
The synchronize version works. See http://dbno.us/finance/ajindex2.php?index=dji
function loadXMLDoc(url,r)
{
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new...
The following code doesn't replace the ? with data when running using call back function. But works when not using call back function. I would prefer not to use synchronize mode to avoid looking stalled when waiting. Can you help?
URL: http://dbno.us/finance/ajindex.php?index=dji
<?php
function...
How do you get stock quote from the client side (javascript)?
Here is the PHP (server side) version
$file = fopen("http://finance.yahoo.com/d/quotes.csv?s=IBM&f=noc1&ex=.csv", "r");
$stocks = fgetcsv($file);
Thanks.
I am not sure you can include a remote php file. It would be a security issue if you can.
I just found the answer I was looking for.
$exurl ='http://ticketeddy.com/test/B.php';
if (!($contents = file_get_contents($exurl))) {
echo 'Could not open remote URL.';
}
else {
echo...
I have a simple question which I do not know the answer.
I have two programs: A.php and B.php.
From within A.php I call B.php.
B.php will return a random number.
A.php will then write that random number into a file.
My trouble is in passing the random number back into A.php.
Help!
I copied an example from the web, but I can't get it to work.
Here is the code.
function CheckForm ()
{
// ** START **
if (document.ClientInfo.x_terms_conditions != "agreed") {
alert( "Please read the Terms and Conditions and agree to it." );
return false;
}
else
return true ;
//...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.