Bitcoin Forum
May 04, 2024, 06:22:06 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 [17] 18 19 20 »
321  Bitcoin / Development & Technical Discussion / Re: Bitcoin Daemon Vagrant DataDir on: January 14, 2014, 11:07:42 PM
If vagrant is not really that important I wrote a tut on how to set this up
322  Bitcoin / Bitcoin Technical Support / What if I delete blk0001.dat files on: January 14, 2014, 03:14:59 PM
Yesterday I installed and ran butcoind on linux server and since yesterday it consumed around 10 or so GB of disk space so what I am thinking is what if I delete old files of block info like I have upto blk12345.dat can I delete upto blk5000.DAT will that create issues ?
323  Other / Off-topic / Re: The community is fucked up on: January 13, 2014, 07:48:37 PM
google

Seriously ? and from where google brings the answer if nobody is answering them ?
324  Economy / Service Discussion / Re: Any PHP programmer who can help integrate Bitcoins Payment with a script? on: January 13, 2014, 02:54:06 PM
Fullphp code is given in blockchain only

Code:
 
$real_secret = 'ZzsMLGKe162CfA5EcG6j'
$invoice_id = $_GET['invoice_id']; //invoice_id is past back to the callback URL
$transaction_hash = $_GET['transaction_hash'];
$input_transaction_hash = $_GET['input_transaction_hash'];
$input_address = $_GET['input_address'];
$value_in_satoshi = $_GET['value'];
$value_in_btc = $value_in_satoshi / 100000000;

//Commented out to test, uncomment when live
if ($_GET['test'] == true) {
    return;
}

try {
  //create or open the database
  $database = new SQLiteDatabase('db.sqlite', 0666, $error);
} catch(Exception $e) {
  die($error);
}

//Add the invoice to the database
$query = "insert INTO invoice_payments (invoice_id, transaction_hash, value) values($invoice_id, '$transaction_hash', $value_in_btc)";

if($database->queryExec($query, $error)) {
   echo "*ok*";
}

//Select the amount paid into an invoice with select SUM(value) as value from invoice_payments where invoice_id = $invoice_id

Lol please tell me where this script is live ;-) Looks like you can steal all BTC from them ;-)


Its just an example code you should have brains to work on the security level of your website
325  Other / Off-topic / Re: The community is fucked up on: January 12, 2014, 10:45:38 PM
http://bash.org/?152037

<dm> I discovered that you'd never get an answer to a problem from Linux Gurus by asking. You have to troll in order for someone to help you with a Linux problem.
<dm> For example, I didn't know how to find files by contents and the man pages were way too confusing. What did I do? I knew from experience that if I just asked, I'd be told to read the man pages even though it was too hard for me.
<dm> Instead, I did what works. Trolling. By stating that Linux sucked because it was so hard to find a file compared to Windows, I got every self-described Linux Guru around the world coming to my aid. They gave me examples after examples of different ways to do it. All this in order to prove to everyone that Linux was better.
* ion has quit IRC (Ping timeout)
<dm> brings a tear to my eye... :') so true..
<dm> So if you're starting out Linux, I advise you to use the same method as I did to get help. Start the sentence with "Linux is gay because it can't do XXX like Windows can". You will have PhDs running to tell you how to solve your problems.
<dm> this person must be a kindred spirit of mine



Damn! you are clever
326  Bitcoin / Bitcoin Technical Support / Running two daemons same time same machine ? on: January 12, 2014, 07:54:57 PM
I want to run two daemons i.e bitcoin and litecoin at the same time on the same server. As both of them may conflict with each other because of ports, what can I do to prevent that ?
327  Bitcoin / Development & Technical Discussion / Re: [Solved] Problem integrating daemon with PHP on: January 12, 2014, 07:33:54 PM
Issue has been fixed
328  Economy / Service Discussion / Re: Any PHP programmer who can help integrate Bitcoins Payment with a script? on: January 12, 2014, 07:13:58 PM
Fullphp code is given in blockchain only

Code:
 
$real_secret = 'ZzsMLGKe162CfA5EcG6j'
$invoice_id = $_GET['invoice_id']; //invoice_id is past back to the callback URL
$transaction_hash = $_GET['transaction_hash'];
$input_transaction_hash = $_GET['input_transaction_hash'];
$input_address = $_GET['input_address'];
$value_in_satoshi = $_GET['value'];
$value_in_btc = $value_in_satoshi / 100000000;

//Commented out to test, uncomment when live
if ($_GET['test'] == true) {
    return;
}

try {
  //create or open the database
  $database = new SQLiteDatabase('db.sqlite', 0666, $error);
} catch(Exception $e) {
  die($error);
}

//Add the invoice to the database
$query = "insert INTO invoice_payments (invoice_id, transaction_hash, value) values($invoice_id, '$transaction_hash', $value_in_btc)";

if($database->queryExec($query, $error)) {
   echo "*ok*";
}

//Select the amount paid into an invoice with select SUM(value) as value from invoice_payments where invoice_id = $invoice_id
329  Bitcoin / Development & Technical Discussion / [Step by step] Integrating Bitcoin Daemon with PHP on: January 12, 2014, 05:37:12 PM
Hey there ! Howdy?

Ok I was searching for tutorials all over internet on "how to integrate bitcoin daemon with php" I came up with many and none of them helped me to get it working flawlessly, some of them threw unexpected and strange errors after 90% completion and some of them good enough to throw error in starting only which saved my time and efforts. Now that I have done what I was looking for why not create a step by step tutorial to help fellow members. So let's get started.


Before we start you should install tmux which helps you save your work even if you are disconnected from the vps. To install tmux:

Code:
sudo apt-get install tmux

to start tmux simply type tmux and to get back on mai screen press ctrl b and then d to restore the session again type tmux attach.


I am expecting you have a Ubuntu 12.x or later because that is what i used for installation. Log in to your VPS or your computer's terminal and install python software properties by typing following command :

Code:
sudo apt-get install python-software-properties

then add repository ppa:bitcoin/bitcoin by typing following command

Code:
sudo add-apt-repository ppa:bitcoin/bitcoin

In my case this didn't work and threw an error stating that add-apt-repository command not found. In ubuntu later version versions this command is not found under python-software-properties package, like in previous versions, but available in software-properties-common. So I had installed it by running these commands :

Code:
sudo aptitude install software-properties-common

To find in which package the command we are looking for exists the following will be of help:

Code:
sudo apt-fille update


Unfortunately in my case this was also not installed so I had installed it by running following command :

Code:
apt-get install apt-file

Now I got the message "The file is up to date"

Now run
Code:
 sudo apt-file search add-apt-repository

You will be prompted to confirm this installation, press Enter key to confirm.

Now run

Code:
sudo aptitude update

and then
Code:
sudo aptitude install bitcoind

Make a new directory by typing :

Code:
mkdir ~/.bitcoin
cd ~/.bitcoin

Create a new file inside this directory named bitcoin.conf by typing:
Code:
nano bitcoin.conf

insert the following code in the text file:

Code:
server=1
daemon=1
rpcuser=any_username
rpcpassword=any_password

Exit by pressing ctrl+x to confirm the changes press Y and then press return key. Start the bitcoin daemon by typing:
Code:
bitcoind

Bitcoin daemon is now installed and runing you can check it by running the following command
Code:
bitcoind getinfo

Now we will install apache and php on our server

To install apache we will run th following code:

Code:
sudo apt-get install apache2

once apache is installed verify it by typing your ip address in the browser it will say It works!

now we will install php by following command:

Code:
sudo apt-get install php5 libapache2-mod-php5

now navigate to var/www folder and download jsonRPCClient.php with the following command:

Code:
wget http://pmtocoins.com/JSON-RPC_PHP_light.zip

once downloaded unzip it by typing:
Code:
unzip JSON*.zip

no move to the directory by:
Code:
cd json*/includes

and move jsonRPCClient.php into your www folder

now create a new index.php file in www folder with following code

Code:

<?php
include_once('jsonRPCClient.php');
$bitcoin = new jsonRPCClient('http://your_username:your_password@127.0.0.1:8332/');
print_r($bitcoin->getinfo());
?>



and you are done navigate to your ip address on the browser e.g http://123.123.123.123/index.php and hurray


You can have a look on API call list here : https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list

330  Bitcoin / Development & Technical Discussion / Re: Problem integrating daemon with PHP on: January 11, 2014, 10:46:27 PM
Have you set the rpcport, rpcuser and rpcpassword in the .conf file? Also listen=1?

yes I did that but did not do listen=1 will do it right away and update if that works
331  Other / Off-topic / Re: The community is fucked up on: January 11, 2014, 05:58:12 PM
I love open source because of its community which is always generous and helping; correct me if I am wrong bitcoin is also open source but the community is not generous, I don't know why.Even though the poeple into this community are same who were using other open source like Php and Linux etc
332  Other / Off-topic / Re: The community is fucked up on: January 11, 2014, 02:55:01 PM
LOL. You have posted the other thread  "Today at 02:16:32 PM"

Do you expect that everyone is waiting for issues to solve for free on a weekend?

At least you should give it some days before bashing the community.


It is not that, I have been researching on them since 15 days and I do not come up with any tutorial which describe things in good detail
333  Other / Off-topic / The community is fucked up on: January 11, 2014, 02:45:33 PM
This bitcoin community is so fucked up and selfish that no one helps others to learn. I posted a question on many different sites no one cares to fucking answer anything like they are so dumb for that. All the tutorials expect you to be genius installing shit and there is no detailed tutorial available on bitcoin development.
334  Bitcoin / Development & Technical Discussion / [Solved] Problem integrating daemon with PHP on: January 11, 2014, 02:16:32 PM
This is solved now, if you want you can have a look on https://bitcointalk.org/index.php?topic=412425.0


So I have installed daemon of bicoin litecoin and dogecoin on the same server all three of them are up and running but bitcoin daemon does not reply anything when I run bitcoind getinfo may be network issues or something like that. I have installed php on the same server and created a index.php file in /var/www/ folder


content of index.php file :
Code:
<?php
include_once('Bitcoin.php');
include_once(
'jsonRPCClient.php');
$dogecoin = new jsonRPCClient('http://user:pass@localhost:8332/');
print_r($dogecoin->getinfo());
?>


content of Bitcoin.php :
Code:
<?php
class Bitcoin (
// @var string
private $username;
// @var string
private @password;
// @var string
private $url;
// @var string
private $id;

public function 
__construct($url,$username,$password)
{
$this->url=$url;
$this->username $username;
$this->password $password;
$this->id 1;
}

public function 
__call($method,$params)
{
$params array_values($params);

$request json_encode(array(

'method' =>strtolower($method),
'params' => $params,
'id' => $this-> id));

$curl curl_init();
curl_setopt($curl,CURLOPT_RETURNTRANSFER1);
curl_setopt($curlCURLOPT_HTTPHEADER, Array("Content type:application/json"));
curl_setopt($curlCURLOPT_URL$this->url);
curl_setopt($curlCURLOPT_USERPWD$this->username.":".$this->password);
curl_setopt($curlCURLOPT_POSTTRUE);
curl_setopt($curlCURLOPT_POSTFIELDS$request);
$response curl_exec($curl);
curl_close($curl);

if(!
$resposne)
{
throw new 
Exception('Unable to connect to '.$this->url0);
}
$response json_decode($response,true);
}

then there are condition to throw different error upon different situation

}
335  Bitcoin / Project Development / Looking forward to start a free service on: January 10, 2014, 11:18:43 AM
Hello everyone I want to start a website like www.digitalocean.com where developers can get their cloud computers without paying any money. I am not sure how to start one such service but I am looking forward to give some love back to community. Please advice me.
336  Alternate cryptocurrencies / Altcoin Discussion / Re: Sell 2500000 DogeCoins on: December 25, 2013, 02:07:25 PM
Giving $1000 right away for those 2.5 million dogecoins
337  Alternate cryptocurrencies / Altcoin Discussion / Buying all your dogecoins on: December 24, 2013, 12:48:50 PM
I am buying dogecoins and paying through EgoPay/paypal/BTC/LTC or any other coin you want. Jst let me know how much you have and rates and payment method
338  Alternate cryptocurrencies / Altcoin Discussion / Dogecoin killing Litecoin Funny on: December 23, 2013, 08:04:20 PM
I just saw this video which makes me laugh http://www.youtube.com/watch?v=JHE2ORzJyEY  do watch it and share Smiley Post your review here
339  Alternate cryptocurrencies / Altcoin Discussion / Why coins became so stable ? on: December 22, 2013, 02:58:23 PM
I am having a close look on market since yesterday and seeing that there is no movement in the market specially dogecoins what could be the reason ? I like it when its volatile so that one can make good quick profit
340  Alternate cryptocurrencies / Altcoin Discussion / Re: 60k coins stucked :| on: December 22, 2013, 01:43:35 PM
I was transferring coins from my wallet to the online exchange 60k were deducted from my wallet bt did not credit on the exchange they are still visible in my wallet as negative 60k but there were no confirmations (0/3) since last 4 days will they ever reflect ?

What coin is it?
Did you send with a fee?

It cant be bitcoin for sure otherwise I would have been banging my head somewhere IRL or may had hung myself. They were dogecoins
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 [17] 18 19 20 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!