Jump to content

Search the Community

Showing results for tags 'bitcoin'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 3 results

  1. I'm using this bitcoin price ticker that is using Mt.Gox but they're no longer in service unfortunately. I'm trying to replace Mt.Gox with blockchain or something similar. Can anyone please help me fix this? I tried https://www.bitstamp.net/api/ticker/ and https://blockchain.info/ticker but neither are working. I'm doing this for my site http://www.bitcoinvalues.net. Thanks <?php //first fetch the current rate from MtGox $ch = curl_init('https://mtgox.com/api/0/data/ticker.php'); curl_setopt($ch, CURLOPT_REFERER, 'Mozilla/5.0 (compatible; MtGox PHP client; '.php_uname('s').'; PHP/'.phpversion().')'); curl_setopt($ch, CURLOPT_USERAGENT, "CakeScript/0.1"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $mtgoxjson = curl_exec($ch); curl_close($ch); //decode from an object to array $output_mtgox = json_decode($mtgoxjson); $output_mtgox_1 = get_object_vars($output_mtgox); $mtgox_array = get_object_vars($output_mtgox_1['ticker']); ?> <br/> <br/> Last: <?php echo $mtgox_array['last']; ?><br/> High: <?php echo $mtgox_array['high']; ?><br/> Low: <?php echo $mtgox_array['low']; ?><br/> Avg: <?php echo $mtgox_array['avg']; ?><br/> Vol: <?php echo $mtgox_array['vol']; ?><br/>
  2. if($balance >= $cashout){ $mysqli->query("UPDATE balances SET balance=balance-$balance WHERE email='$email'"); $balanceQ = $mysqli->query("SELECT balance FROM balances WHERE email='$email'"); //we check again to prevent race attacks if($balanceQ->fetch_row() >= 0){ $url = "https://inputs.io/api?key=$apiKey&action=send&address=&amount=&note=&pin=$apiPin" . urlencode($cashoutMessage . " | MyFaucet Powered") . "&address=" . urlencode($email) . "&amount=" . ($balance / 100000000); $response = file_get_contents($url); if($response[0] == "["){ //success echo "<div class='alert alert-success'>Successful cashout to $email - enjoy!</div>"; } else { echo "<div class='alert alert-error'>An error has occured - $response</div>"; if($response == "NO_BALANCE"){ echo "<div class='alert alert-error'>The site does not have enough coins to pay out!</div>"; $mysqli->query("UPDATE balances SET balance=balance+$balance WHERE email='$email'"); Im having problems when people go cashout and they get error page i think the problem is $url but i dont know if you want to find out the api go here https://inputs.io/api and head to send transactions so from there i dont know what else to do.
  3. Dont know what to do kinda new to php.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.