Bitcoin Forum
April 23, 2024, 10:21:16 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Warning: One or more bitcointalk.org users have reported that they strongly believe that the creator of this topic is a scammer. (Login to see the detailed trust ratings.) While the bitcointalk.org administration does not verify such claims, you should proceed with extreme caution.
Pages: « 1 2 3 4 [5] 6 7 8 »  All
  Print  
Author Topic: PHP martingale bot for satoshiDICE  (Read 32860 times)
chrcoe01
Full Member
***
Offline Offline

Activity: 147
Merit: 100


View Profile
October 10, 2012, 01:29:23 PM
 #81

I posted that and I KNEW someone would quote just that part

"You may delay, but time will not, and lost time is never found again." -Benjamin Franklin
1713910876
Hero Member
*
Offline Offline

Posts: 1713910876

View Profile Personal Message (Offline)

Ignore
1713910876
Reply with quote  #2

1713910876
Report to moderator
1713910876
Hero Member
*
Offline Offline

Posts: 1713910876

View Profile Personal Message (Offline)

Ignore
1713910876
Reply with quote  #2

1713910876
Report to moderator
Make sure you back up your wallet regularly! Unlike a bank account, nobody can help you if you lose access to your BTC.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
dooglus
Legendary
*
Offline Offline

Activity: 2940
Merit: 1330



View Profile
October 11, 2012, 04:12:12 AM
 #82

I posted that and I KNEW someone would quote just that part

I tried not to, but something compelled me to do it.

Just-Dice                 ██             
          ██████████         
      ██████████████████     
  ██████████████████████████ 
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
    ██████████████████████   
        ██████████████       
            ██████           
   Play or Invest                 ██             
          ██████████         
      ██████████████████     
  ██████████████████████████ 
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
    ██████████████████████   
        ██████████████       
            ██████           
   1% House Edge
dstruct2k
Newbie
*
Offline Offline

Activity: 48
Merit: 0


View Profile
January 19, 2013, 08:05:10 PM
 #83

A PowerShell Version:

Code:
--snipped--

If someone thinks this is worth a donation... 1J66vZHf1oFPHFhjFBtbEqxkJahdF3vetu

Thanks payb.tc for your nice PHP Script :0) Donation on the way
I've made a few changes to the PowerShell script just to make it a bit nicer on the end-user, all the configurable variables are in the first chunk of code. I also bet on a different payout rate, but that's configurable too.
http://pastebin.com/dS1FqjpA

1LFuotBujG44YeLskhivdy9MbpMyuCnCoA
and
1J66vZHf1oFPHFhjFBtbEqxkJahdF3vetu
if this helped you make some decent coin. Smiley
constitution
Newbie
*
Offline Offline

Activity: 28
Merit: 0



View Profile
January 26, 2013, 12:48:30 AM
 #84

Awesome!
Sovereign108
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
January 26, 2013, 01:55:29 PM
 #85

This is the best way to go bankrupt!

;(
frozenkai
Member
**
Offline Offline

Activity: 86
Merit: 10



View Profile
January 26, 2013, 08:12:06 PM
 #86

How would I set this up?

My hard drive died and I lost all my bitcoins, help me out? 19BsFvdjtVDPHhdcYqBUi1bZ9xRopzbRjC
fcmatt
Legendary
*
Offline Offline

Activity: 2072
Merit: 1001


View Profile
January 26, 2013, 08:56:16 PM
 #87

How would I set this up?

Download the script then burn your usd or send bitcoins to a bad address to be lost forever.
That is the end result if you play long enough with this system. Mathematically proven to lose over time due to a run of bad luck.
zvs
Legendary
*
Offline Offline

Activity: 1680
Merit: 1000


https://web.archive.org/web/*/nogleg.com


View Profile WWW
January 28, 2013, 12:45:31 AM
 #88

How would I set this up?

I guess that'd depend on your OS
frozenkai
Member
**
Offline Offline

Activity: 86
Merit: 10



View Profile
January 28, 2013, 09:24:20 PM
 #89

How would I set this up?

I guess that'd depend on your OS
Windows 7

My hard drive died and I lost all my bitcoins, help me out? 19BsFvdjtVDPHhdcYqBUi1bZ9xRopzbRjC
payb.tc (OP)
Hero Member
*****
Offline Offline

Activity: 812
Merit: 1000



View Profile
January 28, 2013, 09:49:09 PM
 #90


http://bitcoin.org -> install bitcoin
http://www.apachefriends.org/en/xampp.html -> install xampp (which includes php)

have a read of https://en.bitcoin.it/wiki/PHP_developer_intro

http://jsonrpcphp.org -> get jsonRPCClient.php


the OP was aimed at coders who already have the basic dev environment set up.
tribalmind
Newbie
*
Offline Offline

Activity: 9
Merit: 0



View Profile
February 02, 2013, 01:24:48 AM
 #91

I am no coder, but would like some advice in modding the phpbot to allow for a fraction of balance as MIN_BET and for it to recalculate after any win, same for MAX bet, also  if MAX_BET reached start over

i did try to modify the script by myself to allow this but received

Object of class jsonRPCClient could not be converted to int in XXXXX/bot2.php on line 14

Or

PHP Notice:  Object of class jsonRPCClient could not be converted to int in XXXXX/bot2.php on line 10

Or

PHP Fatal error:  Can't use method return value in write context in XXXXX/bot2.php on line 10

Any Advice would be appreciated
payb.tc (OP)
Hero Member
*****
Offline Offline

Activity: 812
Merit: 1000



View Profile
February 02, 2013, 01:49:57 AM
 #92

I am no coder, but would like some advice in modding the phpbot to allow for a fraction of balance as MIN_BET and for it to recalculate after any win, same for MAX bet, also  if MAX_BET reached start over

i did try to modify the script by myself to allow this but received

Object of class jsonRPCClient could not be converted to int in XXXXX/bot2.php on line 14

Or

PHP Notice:  Object of class jsonRPCClient could not be converted to int in XXXXX/bot2.php on line 10

Or

PHP Fatal error:  Can't use method return value in write context in XXXXX/bot2.php on line 10

Any Advice would be appreciated

maybe show us lines 10 & 14 in bot2.php, or paste the whole thing
tribalmind
Newbie
*
Offline Offline

Activity: 9
Merit: 0



View Profile
February 02, 2013, 02:13:16 AM
 #93

<?php
require_once('jsonRPCClient.php');
/** BITCOIN **/
$btcu = array("user" => "xxx",             // RPC Username
            "pass" =>   "xxx",               // RPC Password
            "host" =>   "localhost",      // RPC Hostname/IP
            "port" =>   8332);            // RPC Port
$b = new jsonRPCClient("http://{$btcu['user']}:{$btcu['pass']}@{$btcu['host']}:{$btcu['port']}");

define('MIN_BET', 0.0633399);
define('MAX_BET', 2);
define('ADDRESS', '1dicec9k7KpmQaA8Uc8aCCxfWnwEWzpXE');

$bet = MIN_BET;
$total_fees = 0;
$count = 0;
$count_won = 0;
while (($bet <= MAX_BET) && ($count_won < 300))
{
        $balance_a = $b->getbalance('*', 0);
        if (!isset($starting_balance)) $starting_balance = $balance_a;
        if($b->getbalance('*', 1) < $bet) { // If we don't have enough confirmed bitcoins to send to satoshi dice...
            echo "Waiting for confirmed balance";
            while($b->getbalance('*', 1) < $bet)
            {
                echo ".";
                sleep(60); // Wait a full minute before checking the balance again.
            }
            echo "\n";
        }
       try // Wrapped in a try catch block just incase we run out of cash.
        {
            $b->sendtoaddress(ADDRESS, (float) $bet);
       }
        catch(Exception $e)
        {
            echo "Have: " . $b->getbalance('*', 1) . " Needed: " . $bet . "\n";
          die("Ran out of money?\n");
       }
        $balance_b = $b->getbalance('*', 0);
        $count++;
        $fee = $balance_a - $balance_b - $bet;
        $total_fees += $fee;
        $total_fees = number_format($total_fees,8,'.','')+0


the errors came with 3 different attempts at modifieng the bet amount for it to be a fraction of the balance,
KJTetc
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
February 03, 2013, 03:58:21 AM
 #94

So I've got a good understanding of PHP but never heard of JSON. I've got everything you said. How do I make it work?  Roll Eyes



http://bitcoin.org -> install bitcoin
http://www.apachefriends.org/en/xampp.html -> install xampp (which includes php)

have a read of https://en.bitcoin.it/wiki/PHP_developer_intro

http://jsonrpcphp.org -> get jsonRPCClient.php


the OP was aimed at coders who already have the basic dev environment set up.
🏰 TradeFortress 🏰
Bitcoin Veteran
VIP
Legendary
*
Offline Offline

Activity: 1316
Merit: 1043

👻


View Profile
February 03, 2013, 04:13:03 AM
 #95

So I've got a good understanding of PHP but never heard of JSON. I've got everything you said. How do I make it work?  Roll Eyes



http://bitcoin.org -> install bitcoin
http://www.apachefriends.org/en/xampp.html -> install xampp (which includes php)

have a read of https://en.bitcoin.it/wiki/PHP_developer_intro

http://jsonrpcphp.org -> get jsonRPCClient.php


the OP was aimed at coders who already have the basic dev environment set up.
Download jsonRPCClient.php, place it in same directory.

But don't try martingale. I lost 100BTC  Embarrassed
KJTetc
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
February 03, 2013, 04:16:28 AM
 #96

What do I have near the top as the ip address? I get this error right now :

Warning: fopen(http://...@127.0.0.1:8332/): failed to open stream: No connection could be made because the target machine actively refused it. in C:\xampp\htdocs\jsonRPCClient.php on line 86
KJTetc
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
February 03, 2013, 04:19:13 AM
 #97

That website is down so I downloaded a different version off of github... Guessing that will mess it up..   (Check post above)
So I've got a good understanding of PHP but never heard of JSON. I've got everything you said. How do I make it work?  Roll Eyes



http://bitcoin.org -> install bitcoin
http://www.apachefriends.org/en/xampp.html -> install xampp (which includes php)

have a read of https://en.bitcoin.it/wiki/PHP_developer_intro

http://jsonrpcphp.org -> get jsonRPCClient.php


the OP was aimed at coders who already have the basic dev environment set up.
Download jsonRPCClient.php, place it in same directory.

But don't try martingale. I lost 100BTC  Embarrassed
tribalmind
Newbie
*
Offline Offline

Activity: 9
Merit: 0



View Profile
February 03, 2013, 09:28:47 PM
 #98

    BTC2 Bounty for Modding the php bot to:


    • Make the MIN_BET and MAX_BET a percentage/fraction of the current balance

    • If LOSE! use this same amount multiplied until WIN! OR MAX_BET reached

    • If WIN! send a fraction of win amount to "1XYZ1" address

    • If MAX_BET Reached, start over

    • Stop after X amount sent to "1XYZ1" address

      • OR count_won grater than XYZ2
        • OR after a WIN! and the ratio of win loses is grater than XYZ3 and a minimum of XYZ bets have been played

      Always wait for confirmed balance to avoid the larger fees.(no rush to lose everything)

    fcmatt
    Legendary
    *
    Offline Offline

    Activity: 2072
    Merit: 1001


    View Profile
    February 03, 2013, 09:43:35 PM
     #99

    What do I have near the top as the ip address? I get this error right now :

    Warning: fopen(http://...@127.0.0.1:8332/): failed to open stream: No connection could be made because the target machine actively refused it. in C:\xampp\htdocs\jsonRPCClient.php on line 86


    Your bitcoin client prob need to be in server mode and listening on 127.0.0.1 which is local loopback ip addy.
    KJTetc
    Newbie
    *
    Offline Offline

    Activity: 24
    Merit: 0


    View Profile
    February 03, 2013, 11:34:03 PM
     #100

    What do I have near the top as the ip address? I get this error right now :

    Warning: fopen(http://...@127.0.0.1:8332/): failed to open stream: No connection could be made because the target machine actively refused it. in C:\xampp\htdocs\jsonRPCClient.php on line 86


    Your bitcoin client prob need to be in server mode and listening on 127.0.0.1 which is local loopback ip addy.

    How do I start it in server mode? I think I saw a script a while ago on it but I can't remember...
    Pages: « 1 2 3 4 [5] 6 7 8 »  All
      Print  
     
    Jump to:  

    Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!