Seems like you have a syntax error in your code use this line to print url,
echo $btc_total = "https://blockchain.info/tobtc?currency=USD&value=$total_price";
You should use curl to get value from above url.
<?php
$total_price += $price;
$curl = curl_init('https://blockchain.info/tobtc?currency=USD&value='.$total_price);
curl_setopt($curl, CURLOPT_FAILONERROR, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$result = curl_exec($curl);
echo $result;
?>