<?php $_SERVER['REQUEST_METHOD'] = 'POST' AND !empty($_SERVER['CONTENT_TYPE']) AND $_SERVER['CONTENT_TYPE'] = 'application/json' ?> This is, of course, wrong. Corrected condition: $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_SERVER['CONTENT_TYPE']) && $_SERVER['CONTENT_TYPE'] == 'application/json'
AND == && in php lol its even the first example on the logical operators page in the php manual http://www.php.net/manual/en/language.operators.logical.php
|
|
|
Very nice Not sure how to decode the scriptsig, but I dont use sender for now anyway. The scriptSigs seem to be split up into 2 parts by a space I'm not 100% sure but i think the first part is the actual sig and the 2nd part is the senders pubkey anyway this should be done soon im just adding the block posting part now for my needs and adding in the code to make this usable by the config file im gna make it like this monitortx(true|false) monitortxurl=http://example.com/foo.php monitorblock(true|false) monitorblockurl=http://example.com/foo.php
|
|
|
sorry it took so long i had some bugs to work out.... How does this look? { "method":"monitortx", "params":[ { "hash":"e0065cfb99b2479cbd7479fbe7c70864b5de5ba67c8f3bf58eb460ea2ef094b3", "ver":1, "vin_sz":4, "vout_sz":2, "lock_time":0, "in":[ { "prev_out":"12e1a620f7e90c3f877c8f6369aaf71100ab15be17de0d3c2802c26790f5a3c9", "n":1, "scriptSig":"30450221009572ef611ba5940e3842bcbf255a4b1e79c32c39549cc412655c39f0ad727413022022c07128a0cf3b111ce7faf7a7283fa48dd8563adaadd26a477d7e41e09dfbaf01 047fac59c7a28fd6069a00307ab853d0915cb6fec4df84df422b79e0ad3049be0e87cfaf9ca823a06ebee5fb04bc267b3bd0f782579a501397a35d49ada02075dc" }, { "prev_out":"d037bfa871865f5020e3a9edb0ad8e3bfeee25bbc6115476c3fb1cd105361c8f", "n":0, "scriptSig":"30460221008945b51f2616e4197f60bdec7c2b79cf9cb597faa631accf4b0d00081c525e26022100820c3e1cd2c9d0aec02fccc73dd22baef1a5746b78d3bc4c8df92f21abcf606601 047f094b909687bb621d9ecb02a3f5f7938a0dc71917beec1d21055a69094f030bf210d059b2ad6f872d717826e9dee0348aef7716c8c93911e911a067103c0b69" }, { "prev_out":"c8356c7f33245c77a31f75c4534b31993a5d4f47985208d7bf4e708b6e6cb9ad", "n":0, "scriptSig":"304502202c30da244b961e570d964cb9d6998e17b0a0349131d8cf0cfa36d214534ecf0b022100b65775ff34b27ed5b0688f5dd4f2b2a1d0c623dd0340891f7845b72757e8ed4701 04ce18444917f2dd3c8f5a4f262556ab9dd04ad482799ee8e92c92735c66957bd42a9e55f894a408ca3ce42d96f6efa221f81e914b49422ff8cfc1b8a950fc91f0" }, { "prev_out":"8302ab4b9b5fb426bc8a41e343d2006bafbab95883622cd954e068f2787a3e97", "n":0, "scriptSig":"3046022100e2b880f9cfbfeecbd8bb76629ecbff654ed915f8ff8557937f376cffedd8b98f022100ef63e5cd8af0531e2e53d4be8ee73690eb4537ac19663ed054c1c05235eaa12701 04c78a58082241cb3c8c09ef57f9104fc4c28d4ff13252f8bbce0c0eedbbafd92b66639bd48c850016b2442db22474e333cdf2ae3ef6f237eb4be22e582fcf0563" } ],
"out":[ { "value":505.96647463, "scriptPubKey":"OP_DUP OP_HASH160 609c3e000d66225caf5ad27245978d33ed761ee6 OP_EQUALVERIFY OP_CHECKSIG" }, { "value":173.16000000, "scriptPubKey":"OP_DUP OP_HASH160 c56d7f3e011ce6f40d7399667fb2bc116e643b38 OP_EQUALVERIFY OP_CHECKSIG" } ] ], "id":null }
I just used a simple php script to catch the data <?php
if ( $_SERVER['REQUEST_METHOD'] = 'POST' AND !empty($_SERVER['CONTENT_TYPE']) AND $_SERVER['CONTENT_TYPE'] = 'application/json' ) { $stringData = file_get_contents('php://input'); $myFile = "test.txt"; $fh = fopen($myFile, 'w') or die("can't open file"); fwrite($fh, $stringData); fclose($fh); }
?>
|
|
|
I've had a little bit of time to work on this today. I made a new thread just to handle posts like Gavins blockmonitor does. When a new transaction is received and gets accepted to the memory pool it will put a new post in the query to be sent out.
Very nice, that is exactly what I wanted, a post per tx, and since its localhost it should be fast enough to keep. You can use it like getmemorypool("transactions") and it will dump out all unconfirmed transactions
Also useable, but then you would need to poll it every so often and check if theres new transactions. Did you get a POST system working in your test? If so could you show what data the post script would receive ? Havn't tested it yet... I should be ready to test in about 15 mins I'll let you now what happens
|
|
|
I've had a little bit of time to work on this today. I made a new thread just to handle posts like Gavins blockmonitor does. When a new transaction is received and gets accepted to the memory pool it will put a new post in the query to be sent out.
Is this what you wanted? or do you want a whole dump of the transactions in the memory pool? I just ran across some code in the new source it's a new RPC command: getmemorypool
You can use it like getmemorypool("transactions") and it will dump out all unconfirmed transactions
anyway lemme know what you think
|
|
|
if your already getting the blocks why not just pull the transaction data from the blocks?
edit: err nevermind just thought about what i said lol if its in a block then it has atleast 1 confirm
|
|
|
me too i finally got it to build but it wont run.... i was told nobody has built it in windows that even the windows exe was built in linux using gitian so im working on building with gitian now
|
|
|
Can someone help me please? I have a feeling its just a configuration somewhere?
the file it makes after compiling is named bitcoin-qt but its actually bitcoind also the file wont run
|
|
|
maybe we should make a daemon that flushes IO less often, and keep more stuff in ram :p
I thought about it, I see no problem to implement this. Ok interesting....
I don't think you should dismiss the mistake the Polish exchange made. He was running on an EC2 which apparently is just for computing or CPU time. When those boxes go down, they wipe the data. That's how he lost his coins. Amazon has another cloud service for redundant distributed storage.
How do you propose to have a fault tolerant backup of your private key's if it's on an EC2?
For example, once a minute/hour/day ... cronjob making an secure wallet.dat archive and coping it into safer place(s). <3 cron jobs
|
|
|
oh i see.... any estimated date for 6.0?
|
|
|
just wondering why arn't some of the new RPC functions that are in the source built into this build? like getblockbyhash?
|
|
|
ok so i followed the directions on this page for building in windows https://github.com/bitcoin/bitcoin/blob/master/doc/readme-qt.rstthe boost dependencies was missing the assign folder in the includes so i got it from boost now im getting this error ./build\init.o: In function `Z23SetStartOnSystemStartupb': C:\Users\Stcupp\Downloads\bitcoin-bitcoin-v0.5.1-126-g43cda5f\bitcoin-qt-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug/../bitcoin-bitcoin-43cda5f/src/init.cpp:578: undefined reference to `CoInitialize@4' C:\Users\Stcupp\Downloads\bitcoin-bitcoin-v0.5.1-126-g43cda5f\bitcoin-qt-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug/../bitcoin-bitcoin-43cda5f/src/init.cpp:584: undefined reference to `CoCreateInstance@20' C:\Users\Stcupp\Downloads\bitcoin-bitcoin-v0.5.1-126-g43cda5f\bitcoin-qt-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug/../bitcoin-bitcoin-43cda5f/src/init.cpp:605: undefined reference to `IID_IPersistFile' C:\Users\Stcupp\Downloads\bitcoin-bitcoin-v0.5.1-126-g43cda5f\bitcoin-qt-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug/../bitcoin-bitcoin-43cda5f/src/init.cpp:615: undefined reference to `CoUninitialize@0' C:\Users\Stcupp\Downloads\bitcoin-bitcoin-v0.5.1-126-g43cda5f\bitcoin-qt-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug/../bitcoin-bitcoin-43cda5f/src/init.cpp:620: undefined reference to `CoUninitialize@0' collect2: ld returned 1 exit status mingw32-make.exe[1]: *** [debug\bitcoin-qt.exe] Error 1 mingw32-make.exe: *** [debug] Error 2 19:28:32: The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2. Error while building project bitcoin-qt (target: Desktop) When executing build step 'Make' does anyone know whats going wrong here?
|
|
|
I dunno, $20 an hour doesn't seem terribly unreasonable.
I don't think id do it for anything under $20 a hour lol not worth my time i was just sayin there are lots of people that will do it a lot cheaper. tax season is almost here il be seeing a lot of people dressed up in statue of liberty suits
|
|
|
lol probably a skid from http://hackforums.net/most of them don't know how to code or anything they just buy scanners and trojans from other people heck most of the time they dont even know how to set them up lmao
|
|
|
im actually working on something like this for myself just haven't had the time to work on it hopefully today i will have the time to get and compile all the dependencies and start coding... i have another project i need to finish up first though check this patch out: https://bitcointalk.org/index.php?topic=1319.msg15065#msg15065monitorblocks <url> [monitor=true] [startblockcount=0] POST block information to <url> as blocks are added to the block chain. [monitor] true will start monitoring, false will stop. Pass [startblockcount] to start monitoring at/after block with given blockcount.
|
|
|
Lol thats still like $20 a hour
hell i live in the US and some of my friends have dressed up in costumes and waved banners for companies around where i live before they only pay like $8-$10/hr max
|
|
|
"Safety measures" is what you wanted to use. http://translate.google.com/ doesn't hurt. For example somebody want to sell his coins for 10.1234 USD per Coin and accidently misses one key and is selling the coins for 0.1234 USD instead.
Answer that: how is MtGox supposed to know that you ACCIDENTALLY missed a key as opposed to using a very low rate rate ON PURPOSE? People do crazy trades eg. when trying to manipulate the btc/usd rate. Is the purpose of a bitcoin exchange to interfere with their users' trading? Does your bank tell you what they think about a bank transfer you are sending? No, because it's none of their business. The same goes for exchanges. Don't trade when you're in a hurry, sick, tired, or intoxicated Wake up please. It just need to pop up a warning if the price you entered is like 120% or 150% different from current prices. There is such a thing in the game EVE Online, if something cost 1000 and you type a sell order for 100 it warn you. For example, http://wiki.eveonline.com/wikiEN/images/a/ab/Market3.jpg it tell you the % difference from regional average. So please take back things like Don't trade when you're in a hurry, sick, tired, or intoxicated how is MtGox supposed to know that you ACCIDENTALLY missed a key as opposed to using a very low rate rate ON PURPOSE? And other hurr durr +1
|
|
|
|