HOW TO UPGRADE API ON PHP SCRIPT

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rvpvj665
Forum Newbie
Posts: 2
Joined: Wed Jan 20, 2016 10:20 am

HOW TO UPGRADE API ON PHP SCRIPT

Post by rvpvj665 »

Code: Select all

<?php 
if ($_POST['enter'] and $_POST['wallet'] and !$_SESSION['LOGIN_IN'] != 1 and $_COOKIE['UNIQID']) {
AntiBot();
$_POST['wallet'] = Form($_POST['wallet']);
ValidateBTC($_POST['wallet']);
$Row = mysqli_fetch_assoc(mysqli_query($CONNECT, "SELECT `uid` FROM `users` WHERE `wallet` = '$_POST[wallet]'"));
if ($Row['uid']) Message(1, 'Account <b>'.$_POST['wallet'].'</b> already exists.'); 
$Row = mysqli_fetch_assoc(mysqli_query($CONNECT, "SELECT `wallet` FROM `users` WHERE `uid` = '$_COOKIE[UNIQID]'"));
if ($Row['wallet']) Message(1, 'Account <b>'.$_COOKIE['UNIQID'].'</b> already exists.'); 
if ($_COOKIE['REF']) {
$REF = $_COOKIE['REF'];
$Row = mysqli_fetch_assoc(mysqli_query($CONNECT, "SELECT `uid` FROM `users` WHERE `uid` = '$REF'"));
if (!$Row['uid']) $REF = 0;
} else $REF = 0;
$Pay = json_decode(file_get_contents('https://blockchain.info/api/receive?method=create&address='.WALLET.'&callback='.urlencode(URL.'/deposit?u='.$_POST['wallet'].'&secret='.Secret($_POST['wallet']).'&ref='.$REF)));
$Pay = $Pay->input_address;
mysqli_query($CONNECT, "INSERT INTO `users`  VALUES ('', '$_COOKIE[UNIQID]', '$_POST[wallet]', '$REF', '$Pay', NOW())");
$_SESSION['WALLET'] = $_POST['wallet'];
$_SESSION['PAY'] = $Pay;
$_SESSION['LOGIN_IN'] = 1;
Message(2,'Account has been successfully created. Address for payment generated.');
}


how to change, tutorials on : https://blockchain.info/api/api_receive

https://api.blockchain.info/v2/receive? ... l&key=$key
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: HOW TO UPGRADE API ON PHP SCRIPT

Post by Celauran »

Do you have a specific question? It's not clear what you're asking.
rvpvj665
Forum Newbie
Posts: 2
Joined: Wed Jan 20, 2016 10:20 am

Re: HOW TO UPGRADE API ON PHP SCRIPT

Post by rvpvj665 »

Post Reply