Author

Topic: Php script to display ASK price on a website (Read 2281 times)

full member
Activity: 140
Merit: 100
August 06, 2011, 01:51:40 AM
#11
You need PHP 5 >= 5.3.0 to use this function.

There are some workarounds here:
http://php.net/manual/en/function.str-getcsv.php
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
Take a look at the libraries I have created:

https://github.com/sourcewerks

How to fix this error please ?
Code:
Fatal error: Call to undefined function str_getcsv() in /home/user/public_html/bctest/bitcoinCharts.php on line 122



I dont use his software but it looks like you forgot to include() a file or require_once() a file either or should fix your prob
hero member
Activity: 860
Merit: 1004
BTC OG and designer of the BitcoinMarket.com logo
Take a look at the libraries I have created:

https://github.com/sourcewerks

How to fix this error please ?
Code:
Fatal error: Call to undefined function str_getcsv() in /home/user/public_html/bctest/bitcoinCharts.php on line 122

legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
Mining farm does some of the similar codes located in the blockUpdater.php file in side of the /req/cronjobs/ folder.
sr. member
Activity: 322
Merit: 251
how about this:
Code:
$mtg_url='http://mtgox.com/code/data/ticker.php';
$handle = fopen ($mtg_url, "r");
$output = fread($handle, 1024);
fclose($handle);
$obj = json_decode($output);
$bid = $obj->ticker->buy;
$ask = $obj->ticker->sell;

echo "bid: ".$bid." | ask: ".$ask;

If you're on an IIS server and opt to use the https protocol, the server will close the connection without sending close_notify, and PHP will report an error of "SSL: Fatal Protocol Error" ... for those of you on IIS Shocked please use file_get_contents or the cURL library.
member
Activity: 62
Merit: 10
Take a look at the libraries I have created:

https://github.com/sourcewerks
hero member
Activity: 560
Merit: 500
can someone tell me the hole working php script ? i not get it working ;(

thx pls private message me
Code:
$mtg_url='https://mtgox.com/code/data/ticker.php';
$handle fopen ($mtg_url"r");
$output fread($handle1024);
fclose($handle);
$obj json_decode($output);
$bid $obj->ticker{'buy'};
$ask $obj->ticker{'sell'};

echo 
"bid: ".$bid." | ask: ".$ask;
?>
Tongue
hero member
Activity: 1946
Merit: 867
Defend Bitcoin and its PoW: bitcoincleanup.com
can someone tell me the hole working php script ? i not get it working ;(

thx pls private message me
hero member
Activity: 860
Merit: 1004
BTC OG and designer of the BitcoinMarket.com logo
February 08, 2011, 06:12:36 PM
#3
how about this:
Code:
$mtg_url='http://mtgox.com/code/data/ticker.php';
$handle = fopen ($mtg_url, "r");
$output = fread($handle, 1024);
fclose($handle);
$obj = json_decode($output);
$bid = $obj->ticker->buy;
$ask = $obj->ticker->sell;

echo "bid: ".$bid." | ask: ".$ask;


Thanks a lot man, sent you 2.50bc for your time and effort.
Cheers  Cool
hero member
Activity: 532
Merit: 505
February 08, 2011, 02:25:12 PM
#2
how about this:
Code:
$mtg_url='http://mtgox.com/code/data/ticker.php';
$handle = fopen ($mtg_url, "r");
$output = fread($handle, 1024);
fclose($handle);
$obj = json_decode($output);
$bid = $obj->ticker->buy;
$ask = $obj->ticker->sell;

echo "bid: ".$bid." | ask: ".$ask;
hero member
Activity: 860
Merit: 1004
BTC OG and designer of the BitcoinMarket.com logo
February 08, 2011, 02:00:30 PM
#1
Anyone have a script to display ASK prices on my web site?
preferably in php.
Jump to: