<p>You can find your answer <a href="http://wiki.uniformserver.com/index.php/SSL_PHP_Server_Key_and_Certificate_generation" rel="noreferrer">here</a></p>

<p><a href="https://github.com/mikegogulski/bitcoin-php/blob/master/src/bitcoin.inc#L567" rel="noreferrer">Snippet of code</a></p>

<p>Example from <a href="https://bitcointalk.org/index.php?topic=81626.20" rel="noreferrer">bitcointalk</a></p>

<pre><code>    &lt;?php
  #Below is full list of available characters.
  #"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
  $fp=fopen("/dev/urandom","r") or die;
  $available_chars="23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz";
  do{
    $minikey='S';
    for($i=0;$i&lt;29;$i++){
      while(($c=ord(fgetc($fp)))&gt;=strlen($available_chars));
      $minikey.=substr($available_chars,$c,1);
    }
    $check=hash('sha256',$minikey . '?') . "\n";
  }while(substr($check,0,2)!='00');
  fclose($fp);
  $priv=hash('sha256',$minikey);
  print "Minikey: $minikey\n";
  print "Privkey: $priv\n";
?&gt;
</code></pre>

<p>You can find some useful information <a href="https://en.bitcoin.it/wiki/PHP_developer_intro" rel="noreferrer">here</a></p>

CC BY-SA 3.0
2014-02-02T07:45:44.677Z
2014-02-02T07:45:44.677Z
Marek
<p>.
<strong>You can use Bitcoin-PHP Payment library - <a href="https://github.com/cryptoapi/Payment-Gateway" rel="nofollow">https://github.com/cryptoapi/Payment-Gateway</a></strong></p>

<pre><code>    &lt;?
        require_once( "cryptobox.class.php" );

        $options = array( 
        "private_key" =&gt; "",        // private key from gourl.io
        "orderID"     =&gt; "your_product1_or_signuppage1_etc",
        "amountUSD"   =&gt; 2          // 2 USD
        );  

        // Initialise Payment Class
        $box1 = new Cryptobox ($options);

        // Display Payment Box or successful payment result   
        $paymentbox = $box1-&gt;display_cryptobox();

        // A. Process Received Payment
        if ($box1-&gt;is_paid()) 
        { 

            // Your code here to handle a successful cryptocoin payment
            // ...
        }  
        else $message .= "The payment has not been made yet";
    ?&gt;
    &lt;!DOCTYPE html&gt;
    &lt;html&gt;&lt;head&gt;&lt;/head&gt;
    &lt;body&gt;
    &lt;?= $paymentbox ?&gt;
    &lt;?= $message ?&gt;
    &lt;/body&gt;
    &lt;/html&gt;
</code></pre>

CC BY-SA 3.0
2014-10-30T15:06:01.920Z
2014-10-30T15:06:01.920Z
webdev1
<p>I would highly discourage writing your own PHP Wallet App, in which without proper security, your wallet and your clients wallets might be compromised in the future.</p>

<p>But if you insist on creating an online wallet, I would highly recommend Blockchain's Online Wallet. You can access the source code <a href="https://github.com/blockchain/My-Wallet" rel="nofollow noreferrer">here</a></p>

<p>The application is written in Javascript, which enables a second layer of security (all operations are done on the user's browser). I think you can use this through your PHP application, in which nearly all web apps use Javascript libraries.</p>

<p>Cheers,</p>

<p>-Besir</p>

CC BY-SA 3.0
2017-07-14T13:31:48.623Z
Great... but can you tell me how to implement this? And where is the HTML or PHP code in source code?
coDe murDerer
CC BY-SA 3.0
2014-02-02T08:56:49.917Z
2017-07-14T17:55:02.217Z
2017-07-14T17:55:02.217Z
Besir Kurtulmus
<p>I'm new to Bitcoin. I want to use PHP to create a bitcoin wallet on my own website. I came to here <a href="https://blockchain.info/api/create_wallet" rel="noreferrer">https://blockchain.info/api/create_wallet</a> but I don't know how to apply it.</p>

<p>Would like to have good tutorials from some websites or videos.</p>

<wallet><php>
How to create bitcoin wallet by PHP
GarlicBread
# How to create bitcoin wallet by PHP

(Asked by: username_0 on 2014-02-02)

I'm new to Bitcoin. I want to use PHP to create a bitcoin wallet on my own website. I came to here <https://blockchain.info/api/create_wallet> but I don't know how to apply it.

Would like to have good tutorials from some websites or videos.

**Tags:** wallet, php


---

## 3 answers

### Answer by username_3 on 2014-02-02. Score: 4 | Accepted answer

I would highly discourage writing your own PHP Wallet App, in which without proper security, your wallet and your clients wallets might be compromised in the future.

But if you insist on creating an online wallet, I would highly recommend Blockchain's Online Wallet. You can access the source code [here](https://github.com/blockchain/My-Wallet)

The application is written in Javascript, which enables a second layer of security (all operations are done on the user's browser). I think you can use this through your PHP application, in which nearly all web apps use Javascript libraries.

Cheers,

-username_3

> **Comments:**
> **username_4**: Great... but can you tell me how to implement this? And where is the HTML or PHP code in source code?  

---

### Answer by username_1 on 2014-02-02. Score: 5

You can find your answer [here](http://wiki.uniformserver.com/index.php/SSL_PHP_Server_Key_and_Certificate_generation)

[Snippet of code](https://github.com/mikegogulski/bitcoin-php/blob/master/src/bitcoin.inc#L567)

Example from [bitcointalk](https://bitcointalk.org/index.php?topic=81626.20)

```
    <?php
  #Below is full list of available characters.
  #"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
  $fp=fopen("/dev/urandom","r") or die;
  $available_chars="23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz";
  do{
    $minikey='S';
    for($i=0;$i<29;$i++){
      while(($c=ord(fgetc($fp)))>=strlen($available_chars));
      $minikey.=substr($available_chars,$c,1);
    }
    $check=hash('sha256',$minikey . '?') . "\n";
  }while(substr($check,0,2)!='00');
  fclose($fp);
  $priv=hash('sha256',$minikey);
  print "Minikey: $minikey\n";
  print "Privkey: $priv\n";
?>

```

You can find some useful information [here](https://en.bitcoin.it/wiki/PHP_developer_intro)


---

### Answer by username_2 on 2014-10-30. Score: 2

.
**You can use Bitcoin-PHP Payment library - <https://github.com/cryptoapi/Payment-Gateway>**

```
    <?
        require_once( "cryptobox.class.php" );

        $options = array( 
        "private_key" => "",        // private key from gourl.io
        "orderID"     => "your_product1_or_signuppage1_etc",
        "amountUSD"   => 2          // 2 USD
        );  

        // Initialise Payment Class
        $box1 = new Cryptobox ($options);

        // Display Payment Box or successful payment result   
        $paymentbox = $box1->display_cryptobox();

        // A. Process Received Payment
        if ($box1->is_paid()) 
        { 

            // Your code here to handle a successful cryptocoin payment
            // ...
        }  
        else $message .= "The payment has not been made yet";
    ?>
    <!DOCTYPE html>
    <html><head></head>
    <body>
    <?= $paymentbox ?>
    <?= $message ?>
    </body>
    </html>

```


---

