Weird, I saw it, in fact I even played a round of dart using your link Maybe it could be a browser error? Please let me know if this continues. Hmm, well, if you say so. I wonder... if my transaction hadn't been confirmed, would it have waited to display the advertisement? EDIT: Heh, figured it out. You might want to rename your "advertisement" column... I'm not sure how, but AdBlock was blocking it in both Chrome 11 beta, and Firefox 4.
|
|
|
Very neat! I like the twist on the lottery from other existing systems.
EDIT: The advertisement functionality appears not to work. I tried to use my Bitcoin Darts affiliate address and the title "Bitcoin Darts". My ID is "QrwGD" and there is no advertisement.
Hi, glad you like it! It's not broken, it's just that you have been bursted. Check your mybitcoin/bitcoin wallet, you should have received your money back with profit Err, I have bursted now, but at the time it wasn't displaying my link.
|
|
|
Very neat! I like the twist on the lottery from other existing systems.
EDIT: The advertisement functionality appears not to work. I tried to use my Bitcoin Darts affiliate address and the title "Bitcoin Darts". My ID is "QrwGD" and there is no advertisement.
|
|
|
Yes, you should be able to use decimals in the ticket price. However, that piece of code is untested (I originally had it hardcoded to 1 BTC, and changed it when I uploaded it here,) so let me know how it goes.
Also: As for the MySQL RAND() it was just the easiest, quickest way to quickly grab a random entry from the table. If you would like to do it some other way, be my guest. However, I'm not sure how open you can really make it, since no matter how you do it, the code will still be on the server, out of user's eyes?
I don't know though.
|
|
|
Well, if you don't mind i'll give it a chance. Just need to find a nice domain for it and give it a warm fuzzy look Thanks a lot! No problem! You may want to do a bit of testing first to make sure entries are being counted, etc. I was unable to do much testing as I have only had a total of .11 BTC in my whole time with Bitcoin (.05 BTC right now.) I think it works, the logic is there, and when I use static variables it seems to input correctly, but I'm not 100% sure it'll detect payments correctly. Also, please check the initial post as I forgot one step in the installation instructions.
|
|
|
11/15/2015 - BitLuck is deprecated and I've removed the public source for both security and licensing reasons. If you'd really like it for some reason, email me at contact@johnmaguire.meWARNING: A vulnerability has been pointed out by PhilG in this script and it should not be used. This was an example script I made when I was 15. Additionally, I don't remember anything about this and don't plan to fix it. Feel free to fork it and work on it if you'd like. I'm not even sure it works anymore. I created a lottery script which automates the process of payments and payouts, and I thought I'd open-source it since I'm not using it anyway... if you like it, please think about donating to me, my donation address is in my signature. I am posting in this forum, as that's where I posted my initial thread about BitLuck. Mods: feel free to move it. Version 0.3 is hosted only on Github. BitLuck on GithubYou can download v0.2 here. If for some reason you still want v0.1, you can find it here. Changelog: Version 0.2 - Added cost setting to waiting.html (used to be static 1 BTC.) Version 0.1 - Initial Script Requirements: - PHP 5
- MySQLi for PHP
- cURL for PHP
- JSON for PHP
Installation instructions: 1. Create a database on your MySQL server and run lottery.sql on it. 2. Run "bitcoind" with either the -rpcuser and -rpcpass options, or with them specified in your bitcoin.conf 3. Type at the command prompt, to generate the lottery pool account (you don't need to do anything with the output): bitcoind getaccountaddress "Lottery Pool" 3. Edit config.inc.php, and update the $rpc_* variables to match your RCP server settings, the $sql_* variables to match your MySQL server settings, the owner's key, fee, draw time, and ticket cost. 4. Move give_prize.php outside of the webroot. 5. Setup cron, or a similar service to run give_prize.php at the time you wish the prize to be drawn. 6. 7. Profit! Let me know how it goes, and if there are any bugs, I'll attempt to fix them. As this isn't an ongoing project, I'm not using Git or another source versioning system as there shouldn't be too many changes, only bug fixes. DISCLAIMER: I offer no warranty, and if anything goes wrong, it's not my fault. Please also note that this is NOT an example of my best work, rather a quick thing I hacked together in an hour or two when learning about the Bitcoin API. I hope this helps someone. If you'd like to send a donation for my efforts, please use this address: 1B7aTxrcaEVopuqrqidTQMxE9mpDUZRwAb
|
|
|
Just by reading the batch file, it's valid and safe. I plan on using this soley in a few. I think it would be nice to post this on the main page as a Windows Portable edition. EDIT: You can remove license.txt, readme.txt, and src/ if you are short on space.
|
|
|
Welcome! No one may have entered because it's seems like an ALMOST copy of BitLotto. BitLotto though, pays 99% of the pot and is TOTALLY transparent in that it's impossible to trick, how many played, who won, and if payment was sent. The other advantage of BitLotto is that it doesn't need a website to run and manage the pot. It's all done within Bitcoin. (I'm a bit biased though!! ) Good luck! Ah okay, I'm sorry. It seems like there is no interest anyway, so I'll take mine down. At the very least, it was a good experience to get used to the JSON-RPC API for Bitcoin. If anyone is interested in the script, either to buy it or for me to open-source it, let me know. No worries. I would suggest open source! Can I suggest if you have the skills, perhaps look into creating open source software for websites to create bitcoin shopping services. Something that is easy to set up is needed and if it's popular I'm sure you could sell support. You mean like this? I have a couple other ideas however, and will start working on them... My only issue with open-sourcing it is I'm not 100% sure that it works perfectly, as I could only do limited testing without any BTC (however, thanks mike for lending me the 2 BTC for testing.)
|
|
|
Welcome! No one may have entered because it's seems like an ALMOST copy of BitLotto. BitLotto though, pays 99% of the pot and is TOTALLY transparent in that it's impossible to trick, how many played, who won, and if payment was sent. The other advantage of BitLotto is that it doesn't need a website to run and manage the pot. It's all done within Bitcoin. (I'm a bit biased though!! ) Good luck! Ah okay, I'm sorry. It seems like there is no interest anyway, so I'll take mine down. At the very least, it was a good experience to get used to the JSON-RPC API for Bitcoin. If anyone is interested in the script, either to buy it or for me to open-source it, let me know.
|
|
|
I changed the time to 12:00 AM GMT, and the payout to 95%.
Now as nobody has bought a ticket, I'm wondering if anyone is interested in this at all, what I could change, etc? If nobody is interested, I'll turn the server off to save energy, but would you be interested if there was a larger pot to begin with, etc?
|
|
|
I lack sufficient funds for real promotion. This would be the reason I'm looking for a job. ~lulzplzkthx
|
|
|
Hello, I am a web developer with 5 years experience. I can't do design or graphics, so if that's what you need, I'm not your guy. I can however create professional, maintainable, and efficient PHP 5 code. I have a strong understanding of OOP, and many best practices. I can add needed AJAX or JS to the site by request. I work best on small projects. For an example of a site I have created, please see my raffle site: BitLuckI would also like to work more with the Bitcoin API, so if you need any work there done, let me know. If you would like to see the code behind it, I will show you by request (please PM me or IM me in IRC - lulzplzkthx.) I am also picking up Python, and would be interested in Python- or Django-related projects as well. ~lulzplzkthx
|
|
|
I spent the last night working on an automated raffle system, which you can find here: BitLuckI'm currently only running it on my local server, so please don't kill it. If it goes down, let me know in IRC (lulzplzkthx) and I'll have it back up as soon as possible. It's beta, so there may still be some bugs to work out. Post here or let me know in IRC. Basis: You pay 1 BTC for each ticket. Anything after the decimal place is rounded down, so make sure you send the amount you mean to. At 7:30pm EDT, the raffle is run, and the winner will receive 95% of the pot. 5% goes towards getting some actual hosting, etc. If I could, I would kick-start the pot, but I am broke (0.03 BTC.) ~lulzplzkthx
|
|
|
I had this same issue, and I decided to switch over from fopen() to cURL. If your server supports it, feel free to use this library instead (the only difference is that it uses cURL. Using it is the same as always, and you shouldn't have intermittent bad requests.) Hope this helps someone. <?php /* COPYRIGHT
Copyright 2007 Sergio Vaccaro <sergio@inservibile.org> Modified 2011 John Maguire for cURL support <johnmaguire2013@gmail.com>
This file is part of JSON-RPC PHP.
JSON-RPC PHP is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
JSON-RPC PHP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with JSON-RPC PHP; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/** * The object of this class are generic jsonRPC 1.0 clients * http://json-rpc.org/wiki/specification * * @author sergio <jsonrpcphp@inservibile.org> */ class jsonRPCClient { /** * Debug state * * @var boolean */ private $debug; /** * The server URL * * @var string */ private $url; /** * The request id * * @var integer */ private $id; /** * If true, notifications are performed instead of requests * * @var boolean */ private $notification = false; /** * Takes the connection parameters * * @param string $url * @param boolean $debug */ public function __construct($url,$debug = false) { // server URL $this->url = $url; // proxy empty($proxy) ? $this->proxy = '' : $this->proxy = $proxy; // debug state empty($debug) ? $this->debug = false : $this->debug = true; // message id $this->id = 1; } /** * Sets the notification state of the object. In this state, notifications are performed, instead of requests. * * @param boolean $notification */ public function setRPCNotification($notification) { empty($notification) ? $this->notification = false : $this->notification = true; } /** * Performs a jsonRCP request and gets the results as an array * * @param string $method * @param array $params * @return array */ public function __call($method,$params) { // check if (!is_scalar($method)) { throw new Exception('Method name has no scalar value'); } // check if (is_array($params)) { // no keys $params = array_values($params); } else { throw new Exception('Params must be given as array'); } // sets notification or request task if ($this->notification) { $currentId = NULL; } else { $currentId = $this->id; } // prepares the request $request = array( 'method' => $method, 'params' => $params, 'id' => $currentId ); $request = json_encode($request); $this->debug && $this->debug.='***** Request *****'."\n".$request."\n".'***** End Of request *****'."\n\n"; // performs the HTTP POST $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $this->url, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $request, CURLOPT_HTTPHEADER => array('Content-type: application/json'), CURLOPT_RETURNTRANSFER => true, )); $response = curl_exec($ch); if($response === false) { throw new Exception('Unable to connect to '.$this->url); } $this->debug && $this->debug.='***** Server response *****'."\n".$response.'***** End of server response *****'."\n"; $response = json_decode($response,true); // debug output if ($this->debug) { echo nl2br($debug); } // final checks and return if (!$this->notification) { // check if ($response['id'] != $currentId) { throw new Exception('Incorrect response id (request id: '.$currentId.', response id: '.$response['id'].')'); } if (!is_null($response['error'])) { throw new Exception('Request error: '.$response['error']['message']); } return $response['result']; } else { return true; } } } ?>
|
|
|
I will be sure to try it out. If nothing else, it will at least be a graphics card for other uses. I'll let you know whether it's compatible and what kind of hashrates I get.
|
|
|
the new intel igp does support openCL just like nvidia and amd cards do please post your hash rates This card is in no way new. It's perhaps 4 years old?
|
|
|
So this is a silly question, but I'm running an i3 @ 2.27 GHz, and there is no dedicated graphics card... I have an old laptop however with this in it, and am thinking abou trying to put it in my new one: Intel Graphics Media Accelerator GMA 4500MI was wondering how I could figure out if it supports anything like OpenCL or CUDA, and whether it would really help with my speed of generating hashes at all. Even if it's minimal (1 extra Mhash/s)? I only have about 4.5-5.5 right now... EDIT: As a side note, I know my CPU mining is essentially worthless. I'm currently pool mining with deepbit.net, and while it hardly generates anything at all, it is some BTC, and I don't need to worry about electricity when I feed off my school's.
|
|
|
|