Click here to Skip to main content
15,892,005 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: It has to be a great movie. Pin
DaveAuld24-May-14 8:15
professionalDaveAuld24-May-14 8:15 
GeneralRe: It has to be a great movie. Pin
SoMad24-May-14 8:26
professionalSoMad24-May-14 8:26 
GeneralRe: It has to be a great movie. Pin
Mike Hankey24-May-14 9:36
mveMike Hankey24-May-14 9:36 
GeneralSPOILER ALERT! Pin
S u n s h i n e24-May-14 13:28
S u n s h i n e24-May-14 13:28 
GeneralHow to set about creating a Joomla extension. Pin
Brady Kelly24-May-14 5:23
Brady Kelly24-May-14 5:23 
GeneralRe: How to set about creating a Joomla extension. Pin
Marc Clifton24-May-14 7:25
mvaMarc Clifton24-May-14 7:25 
GeneralRe: How to set about creating a Joomla extension. Pin
Brady Kelly24-May-14 7:29
Brady Kelly24-May-14 7:29 
GeneralHelp with PHP API Code Pin
Jonas Chokun24-May-14 4:36
Jonas Chokun24-May-14 4:36 
I'm running this bitcoin API code retriving the data from MtGox but it's not working any longer because they site is not up anymore. Goal is to now pull the info from blockchain.info/ticker or bitstamp.net/api/ticker/ or both tickers APIs. If you want to see an example you can go to bitcoinvalues.net. It's supposed to show on top of the site but there is not data.

PHP
1.<?php
 2.          //first fetch the current rate from MtGox
 3.          $ch = curl_init('https://mtgox.com/api/0/data/ticker.php');
 4.                  curl_setopt($ch, CURLOPT_REFERER, 'Mozilla/5.0 (compatible; MtGox PHP client; '.php_uname('s').'; PHP/'.phpversion().')');
 5.                  curl_setopt($ch, CURLOPT_USERAGENT, "CakeScript/0.1");
 6.                  curl_setopt($ch, CURLOPT_HEADER, 0);
 7.                  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 8.                  curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
 9.                  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
 10.                  $mtgoxjson = curl_exec($ch);
 11.                  curl_close($ch);
 12. 
 13.          //decode from an object to array
 14.                  $output_mtgox = json_decode($mtgoxjson);
 15.                  $output_mtgox_1 = get_object_vars($output_mtgox);
 16.                  $mtgox_array = get_object_vars($output_mtgox_1['ticker']);
 17. 
 18.  ?>
 19.  <br/>
 20.  <br/>
 21.  Last: <?php echo $mtgox_array['last'];   ?><br/>
 22.  High: <?php echo $mtgox_array['high'];   ?><br/>
 23.  Low:  <?php echo $mtgox_array['low'];   ?><br/>
 24.  Avg:   <?php echo $mtgox_array['avg'];   ?><br/>
 25.  Vol:   <?php echo $mtgox_array['vol'];   ?><br/>

http://www.bitcoinvalues.net

GeneralRe: Help with PHP API Code PinPopular
OriginalGriff24-May-14 4:44
mveOriginalGriff24-May-14 4:44 
GeneralRe: Help with PHP API Code Pin
Jörgen Andersson24-May-14 5:05
professionalJörgen Andersson24-May-14 5:05 
GeneralRe: Help with PHP API Code Pin
OriginalGriff24-May-14 5:14
mveOriginalGriff24-May-14 5:14 
GeneralThe Clutch Saga Pin
Brady Kelly24-May-14 3:19
Brady Kelly24-May-14 3:19 
GeneralRe: The Clutch Saga Pin
OriginalGriff24-May-14 3:50
mveOriginalGriff24-May-14 3:50 
GeneralRe: The Clutch Saga Pin
Brady Kelly24-May-14 4:23
Brady Kelly24-May-14 4:23 
GeneralRe: The Clutch Saga Pin
Member 419459324-May-14 4:29
Member 419459324-May-14 4:29 
GeneralRe: The Clutch Saga Pin
Keith Barrow24-May-14 4:23
professionalKeith Barrow24-May-14 4:23 
GeneralRe: The Clutch Saga Pin
Brady Kelly24-May-14 5:49
Brady Kelly24-May-14 5:49 
GeneralRe: The Clutch Saga Pin
Keith Barrow25-May-14 2:08
professionalKeith Barrow25-May-14 2:08 
GeneralRe: The Clutch Saga Pin
Brady Kelly25-May-14 4:09
Brady Kelly25-May-14 4:09 
GeneralRe: The Clutch Saga Pin
DaveAuld24-May-14 7:43
professionalDaveAuld24-May-14 7:43 
GeneralRe: The Clutch Saga Pin
Brady Kelly24-May-14 9:13
Brady Kelly24-May-14 9:13 
GeneralRe: The Clutch Saga Pin
mngerhold27-May-14 1:50
mngerhold27-May-14 1:50 
GeneralRe: The Clutch Saga Pin
Brady Kelly27-May-14 2:13
Brady Kelly27-May-14 2:13 
GeneralNot mentioning the war Pin
Garth J Lancaster24-May-14 3:13
professionalGarth J Lancaster24-May-14 3:13 
GeneralRe: Not mentioning the war Pin
JimmyRopes24-May-14 3:56
professionalJimmyRopes24-May-14 3:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.