Bitcoin Forum
November 09, 2024, 10:59:24 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Help a beginner create an inputs.io faucet from scratch  (Read 1540 times)
Mooshire (OP)
Sr. Member
****
Offline Offline

Activity: 322
Merit: 250



View Profile
September 30, 2013, 02:56:04 AM
 #1

Hello guys, I want to expand my learning, so i'm asking for your help. I want to create a bitcoin faucet to add to http://bitcoinmaniac.com , but I don't want to go the easy route and use the precreated myfaucet script. I want to create quality code and be proud of it. I'm a beginner with PHP and i've never even touched mysql, and I don't know where to start. I'd like to see a few things in my faucet:
Loads things from a config file that can be easily edited to change most aspects of the faucet. (API key, payout, etc)
Doesn't allow payouts to the same address or IP for a time set in the config file
Pretty basic things. Please help me, I don't want you to do the work for me, I want you to direct me where I can learn the neccessary skills to build such a thing. I appreciate any help or constructive feedback you might have.

dezza
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
September 30, 2013, 03:05:47 AM
Last edit: September 30, 2013, 03:52:35 AM by dezza
 #2

I'll give you some idea of how I think the application should be composed (although I've not made one myself, I make that clear).

You need a way to handle the transactions (inputs.io)
https://inputs.io/api
Here's the API to use^

Then you need to program some business logic, that is the glue and requests through the web language of your choice (PHP, Python, Ruby etc.).

You could make the web language frontend request a backend-service, written in another language, or the same language for handling the occassional processing (of scheduled payouts).

I know I keep saying this, but Golang is great for backend services (It's easy multi-threading and the nice minimalistic keyword set is perfect), although I think you should just get your proof of concept code working, and you'll make thoughts about your complete design in the process.

And hey; good idea to get someone to security audit it. You can ask some people kindly, but there is also http://codereview.stackexchange.com/ it's in beta, you might wanna try it.

There's also automated scanners like
http://wapiti.sourceforge.net/
(I think it's still a good one, but others might have come in to the game, this is the one I used last time).

 Smiley glhf
Mooshire (OP)
Sr. Member
****
Offline Offline

Activity: 322
Merit: 250



View Profile
September 30, 2013, 04:07:01 AM
 #3

I'll give you some idea of how I think the application should be composed (although I've not made one myself, I make that clear).

You need a way to handle the transactions (inputs.io)
https://inputs.io/api
Here's the API to use^

Then you need to program some business logic, that is the glue and requests through the web language of your choice (PHP, Python, Ruby etc.).

You could make the web language frontend request a backend-service, written in another language, or the same language for handling the occassional processing (of scheduled payouts).

I know I keep saying this, but Golang is great for backend services (It's easy multi-threading and the nice minimalistic keyword set is perfect), although I think you should just get your proof of concept code working, and you'll make thoughts about your complete design in the process.

And hey; good idea to get someone to security audit it. You can ask some people kindly, but there is also http://codereview.stackexchange.com/ it's in beta, you might wanna try it.

There's also automated scanners like
http://wapiti.sourceforge.net/
(I think it's still a good one, but others might have come in to the game, this is the one I used last time).

 Smiley glhf
Heading off now, but if i'm correct, backend services require a VPS, so since I only have shared web hosting i've been looking around. I've found koding (http://koding.com) and was wondering if that was good or bad. I also have absolutely no idea how I would even use anything other than PHP to output HTML or to do backend jobs.

dezza
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
September 30, 2013, 04:26:18 AM
 #4

I'll give you some idea of how I think the application should be composed (although I've not made one myself, I make that clear).

You need a way to handle the transactions (inputs.io)
https://inputs.io/api
Here's the API to use^

Then you need to program some business logic, that is the glue and requests through the web language of your choice (PHP, Python, Ruby etc.).

You could make the web language frontend request a backend-service, written in another language, or the same language for handling the occassional processing (of scheduled payouts).

I know I keep saying this, but Golang is great for backend services (It's easy multi-threading and the nice minimalistic keyword set is perfect), although I think you should just get your proof of concept code working, and you'll make thoughts about your complete design in the process.

And hey; good idea to get someone to security audit it. You can ask some people kindly, but there is also http://codereview.stackexchange.com/ it's in beta, you might wanna try it.

There's also automated scanners like
http://wapiti.sourceforge.net/
(I think it's still a good one, but others might have come in to the game, this is the one I used last time).

 Smiley glhf
Heading off now, but if i'm correct, backend services require a VPS, so since I only have shared web hosting i've been looking around. I've found koding (http://koding.com) and was wondering if that was good or bad. I also have absolutely no idea how I would even use anything other than PHP to output HTML or to do backend jobs.
You can always run both frontend and backend on the same servers as on a VPS locally.

Oh I remember you said that, well - The first thing is just getting to learn the inputs.io API, and practise till you feel confident in it. You can try the simple examples on the API page and try modding them.

PHP is fine, just take things one step at a time.
Mooshire (OP)
Sr. Member
****
Offline Offline

Activity: 322
Merit: 250



View Profile
September 30, 2013, 04:44:58 AM
 #5

This could probably be solved with google, but how do you make api calls in php?

dezza
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
September 30, 2013, 04:46:18 AM
 #6

This could probably be solved with google, but how do you make api calls in php?

The page I linked describes it for inputs.io.
Mooshire (OP)
Sr. Member
****
Offline Offline

Activity: 322
Merit: 250



View Profile
September 30, 2013, 05:05:59 AM
 #7

This could probably be solved with google, but how do you make api calls in php?

The page I linked describes it for inputs.io.
No, not how to create one for inputs.io, just how to do one in general. Something like $_call? I don't even know :/

ocwxc
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
September 30, 2013, 07:41:17 PM
 #8

I've just built mine on x10Hosting.com with success.
It takes some hours to clear the redirect, but after that, it worked quite fine!
http://stetchino.elementfx.com/
I've signed up, uploaded the files, created the database and changed config.php accordingly.
Mooshire (OP)
Sr. Member
****
Offline Offline

Activity: 322
Merit: 250



View Profile
October 01, 2013, 01:40:32 AM
 #9

I've just built mine on x10Hosting.com with success.
It takes some hours to clear the redirect, but after that, it worked quite fine!
http://stetchino.elementfx.com/
I've signed up, uploaded the files, created the database and changed config.php accordingly.

I'm talking about creating one from scratch WITHOUT the myfaucet script

Ditto
Sr. Member
****
Offline Offline

Activity: 330
Merit: 250


View Profile
October 01, 2013, 01:48:49 AM
Last edit: October 01, 2013, 01:59:17 AM by Ditto
 #10

It's easy enough. I'm kind of busy atm but I'll be glad to help you when I'm free. Shoot me a PM if you have any questions. For now, don't worry about the payments and the API. First make the HTML forms and have them submit to a PHP script.

Then, sanitize the data (GET/POST params).

Then, call the API.
Pages: [1]
  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!