Bitcoin Forum

Bitcoin => Project Development => Topic started by: 2weiX on May 08, 2012, 09:11:14 AM



Title: PHP Request (smallish bounty!)
Post by: 2weiX on May 08, 2012, 09:11:14 AM
I hope this is the right place. If not, please direct me elsewhere.

If you should be interested in programming one little PHP-page for me, plz PM me and tell me what would be an acceptable donation for this.


I need you to:

Pull the BUY and SELL prices of the EURBTC from here https://mtgox.com/api/1/BTCEUR/public/ticker.
Provide me with an easy way / example to put the resulting number in a HTML text, rounded up/down to the 2nd decimal.
Provide me with a simple explanation on how to manipulate these numbers (ie 10/(BUY*0,95)) within the HTML.
Take a BTC adress I may specify (eg 1FnBjFWrg2rtPq1shkVXoj9odf4n3SNJCU) and subtract "Sent BTC" from "Received BTC" from the blockexplorer output (http://blockexplorer.com/address/1FnBjFWrg2rtPq1shkVXoj9odf4n3SNJCU) and put the difference in a variable.

This all needs to be in ONE php file so I can easily move it, enhance it, crop it, drop, turn it, pass it!

You can see I don't know jackshit about PHP.

The thing should always load the current data from the MTGOX API on load, I'll take care of the cronjob / F5ing.


I think for someone that is proficient in PHP this should take less than 15 minutes or so. But then again - what do I know, right?


Thanks anyways!

Dennis


Title: Re: PHP Request (smallish bounty!)
Post by: lulzplzkthx on May 08, 2012, 12:55:46 PM
Probably should have posted this in the Marketplace. :P

Either way, I've sent you a PM. :)


Title: Re: PHP Request (smallish bounty!)
Post by: 2weiX on May 08, 2012, 01:02:36 PM
Probably should have posted this in the Marketplace. :P

Either way, I've sent you a PM. :)

sent you a PM back.


Title: Re: PHP Request (smallish bounty!)
Post by: Kris on May 08, 2012, 02:57:22 PM
Send a PM first, I think :)


Title: Re: PHP Request (smallish bounty!)
Post by: 2weiX on May 08, 2012, 03:23:30 PM
Send a PM first, I think :)

youre still on,  kris


Title: Re: PHP Request (smallish bounty!)
Post by: Kris on May 08, 2012, 04:20:18 PM
Hi mate, I'm done.

http://throughads.com/2weiX.php

25 minutes.


Title: Re: PHP Request (smallish bounty!)
Post by: lulzplzkthx on May 08, 2012, 04:55:38 PM
Hi mate, I'm done.

http://throughads.com/2weiX.php

25 minutes.

Hehe, this is what I did but not quite what he wants. :)

He wants addresses to be hardcoded (probably in an array) on the backend, I believe. :)


Title: Re: PHP Request (smallish bounty!)
Post by: Kris on May 08, 2012, 05:26:43 PM
Hi mate, I'm done.

http://throughads.com/2weiX.php

25 minutes.

Hehe, this is what I did but not quite what he wants. :)

He wants addresses to be hardcoded (probably in an array) on the backend, I believe. :)

Interesting :)


Title: Re: PHP Request (smallish bounty!)
Post by: 2weiX on May 08, 2012, 06:25:21 PM
Oh man, I knew I shouldnt have been so secretive.

What I am trying to get is the following:

A website that says "I buy 1 BTC for $buy_price_1btc" and "I 1 BTC sell for $sell_price_1btc"
Then it displays how many BTC are currently available from an adress I put into the source code.
Then there should be a simple table to display how many BTC you can buy for 10, 20, 30, 50, 100€
And how many BTC you need to sell to me for 10, 20, 30, 50, 100€ etc etc.
I'd like to specify these others as variables


$buy_price_1btc = bid * 0,95
$sell_price_1btc = ask * 1.05

and

$buy_10euro = 10/$buy_price_1btc
$sell_10euro = 10/$sell_price_1btc
.
.
.
$buy_100euro = 100/$buy_price_1btc
$sell_100euro = 100/$sell_price_1btc


so I can easily make new ones, change the premiums (ie change the .95 to .975 etc) and display them in the text.
The numbers should be rounded to the 2nd decimal.

As far as I have that, I can hack the rest together myself.

So Kris, you're still first in line if you still want it.


Title: Re: PHP Request (smallish bounty!)
Post by: Kris on May 08, 2012, 07:07:30 PM
Sure I'll fix,


Title: Re: PHP Request (smallish bounty!)
Post by: Kris on May 08, 2012, 07:28:35 PM
Ok done.


Title: Re: PHP Request (smallish bounty!)
Post by: Kris on May 08, 2012, 07:35:44 PM
Since you don't have any chat client, can I get you to use:

http://laybit.com/irc

--
Kris


Title: Re: PHP Request (smallish bounty!)
Post by: 2weiX on May 08, 2012, 07:54:55 PM
Since you don't have any chat client, can I get you to use:

http://laybit.com/irc

--
Kris

no need, I guess.
You did an awesome job.


Title: Re: PHP Request (smallish bounty!)
Post by: Kris on May 08, 2012, 07:56:34 PM
Oh ok, very happy you could use it. always up for making people happy.