Bitcoin Forum
November 08, 2024, 05:41:00 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: LF> A very basic faucet coder  (Read 2468 times)
DiamondCardz (OP)
Legendary
*
Offline Offline

Activity: 1134
Merit: 1118



View Profile WWW
July 07, 2013, 08:39:28 PM
 #1

Your mission, should you choose to accept it:

Tell me how I can make an input box with a Submit button, then have the information from this put into a read-able .asp or .txt file (on a webserver/site). Literally. That's it. This will be for an inputs.io faucet, all the other design will be handled by me.

Your reward:

All CoinURL advertisement revenue for the first week. There will be 2 CoinURL banner slots - as this as a faucet, it will attract decent traffic and bring in decent revenue.

First to PM me with the code and tutorial gets it. I KNOW this is really simple - I've just forgotten the code needed.

BA Computer Science, University of Oxford
Dissertation was about threat modelling on distributed ledgers.
JamesIV
Full Member
***
Offline Offline

Activity: 238
Merit: 100


Live Stars - Adult Streaming Platform


View Profile
July 07, 2013, 09:02:27 PM
 #2

Something like this should work I am not at home so I have not tested it but this is the general idea.

Code:
<?php

if( isset($_POST['address']) )
{
/*
This is probably what you are looking for here
*/
$address htmlspecialchars($_POST["address"])
$file "readable.txt";
$f fopen($file'a');
fwrite($f$address PHP_EOL);
fclose($f);
/*
This is probably what you are looking for here
*/
echo 'address submitted';
} else {
echo 
'<form action="<?php echo htmlentities($_SERVER['PHP_SELF']);?>
" method="post">
 <p>Address <input type="text" name="address" /></p>
 <p><input type="submit" /></p>
</form>';
}

?>

DiamondCardz (OP)
Legendary
*
Offline Offline

Activity: 1134
Merit: 1118



View Profile WWW
July 07, 2013, 09:10:51 PM
 #3

Something like this should work I am not at home so I have not tested it but this is the general idea.

Code:
<?php

if( isset($_POST['address']) )
{
/*
This is probably what you are looking for here
*/
$address htmlspecialchars($_POST["address"])
$file "readable.txt";
$f fopen($file'a');
fwrite($f$address PHP_EOL);
fclose($f);
/*
This is probably what you are looking for here
*/
echo 'address submitted';
} else {
echo 
'<form action="<?php echo htmlentities($_SERVER['PHP_SELF']);?>
" method="post">
 <p>Address <input type="text" name="address" /></p>
 <p><input type="submit" /></p>
</form>';
}

?>

Looking more for PURE HTML/ASP.

BA Computer Science, University of Oxford
Dissertation was about threat modelling on distributed ledgers.
JamesIV
Full Member
***
Offline Offline

Activity: 238
Merit: 100


Live Stars - Adult Streaming Platform


View Profile
July 07, 2013, 09:17:54 PM
Last edit: July 07, 2013, 09:42:37 PM by JamesIV
 #4

Something like this should work I am not at home so I have not tested it but this is the general idea.


Looking more for PURE HTML/ASP.

Something along the lines of this should work. I am still not home so it is untested.

index.html
Code:
        <html>
<head>
<title>Form</title>
</head>
<body>

<form method="post" action="handler.asp">

<p>address</p>

<input type="text" name="address"></p>

<input type="submit" value="Submit" />

</form>

</body>
</html>
handler.asp
Code:
	<%

        dim address
address = Request.Form("address")

        Dim OpenFileobj
        Dim FSOobj
        Dim pathToAddressFile

        pathToAddressFile = Server.MapPath("allAddresses.txt")

        Set FSOobj = Server.CreateObject("Scripting.FileSystemObject")
        Set OpenFileobj = FSOobj.OpenTextFile(pathToAddressFile, Appending)

        OpenFileobj.WriteLine(address)
        OpenFileobj.Close

        %>
<html>
<head>
<title>Form</title>

</head>
<body>

<% Response.Write address %> has been submitted

</body>
</html>

Hope this helps

🏰 TradeFortress 🏰
Bitcoin Veteran
VIP
Legendary
*
Offline Offline

Activity: 1316
Merit: 1043

👻


View Profile
July 08, 2013, 01:31:22 AM
 #5

You probably should be using API sending functions (instead of getting carpal tunnel syndrome for repetitive data entry). Also require a reCAPTCHA and limit IPs.
DiamondCardz (OP)
Legendary
*
Offline Offline

Activity: 1134
Merit: 1118



View Profile WWW
July 08, 2013, 04:52:29 AM
 #6

You probably should be using API sending functions (instead of getting carpal tunnel syndrome for repetitive data entry).

There's going to be a cap + I can handle carpal tunnel syndrome anyway.

Also require a reCAPTCHA and limit IPs.

Nah, I don't need to.


BA Computer Science, University of Oxford
Dissertation was about threat modelling on distributed ledgers.
🏰 TradeFortress 🏰
Bitcoin Veteran
VIP
Legendary
*
Offline Offline

Activity: 1316
Merit: 1043

👻


View Profile
July 08, 2013, 06:45:13 AM
 #7

Here you go, full featured faucet program. Automated, configurable, referral program, built in ad rotator, IP logging, blah.

http://glados.cc/myfaucet/
JamesIV
Full Member
***
Offline Offline

Activity: 238
Merit: 100


Live Stars - Adult Streaming Platform


View Profile
July 08, 2013, 01:41:41 PM
 #8

Here you go, full featured faucet program. Automated, configurable, referral program, built in ad rotator, IP logging, blah.

http://glados.cc/myfaucet/

It's in PHP he has some aversion to PHP.

DiamondCardz (OP)
Legendary
*
Offline Offline

Activity: 1134
Merit: 1118



View Profile WWW
July 08, 2013, 04:15:57 PM
 #9

Here you go, full featured faucet program. Automated, configurable, referral program, built in ad rotator, IP logging, blah.

http://glados.cc/myfaucet/

Eh, it'll do. Thanks. Tongue

BA Computer Science, University of Oxford
Dissertation was about threat modelling on distributed ledgers.
DiamondCardz (OP)
Legendary
*
Offline Offline

Activity: 1134
Merit: 1118



View Profile WWW
July 08, 2013, 06:24:31 PM
 #10

Parse error: syntax error, unexpected '[' in /home/a2414827/public_html/config.php on line 21

Hmmm.

BA Computer Science, University of Oxford
Dissertation was about threat modelling on distributed ledgers.
JamesIV
Full Member
***
Offline Offline

Activity: 238
Merit: 100


Live Stars - Adult Streaming Platform


View Profile
July 08, 2013, 06:48:18 PM
 #11

Parse error: syntax error, unexpected '[' in /home/a2414827/public_html/config.php on line 21

Hmmm.

Do you need someone to set this up for you? I could do this for you.

DiamondCardz (OP)
Legendary
*
Offline Offline

Activity: 1134
Merit: 1118



View Profile WWW
July 08, 2013, 06:49:55 PM
 #12

Parse error: syntax error, unexpected '[' in /home/a2414827/public_html/config.php on line 21

Hmmm.

Do you need someone to set this up for you? I could do this for you.

Nope.

BA Computer Science, University of Oxford
Dissertation was about threat modelling on distributed ledgers.
r3wt
Hero Member
*****
Offline Offline

Activity: 686
Merit: 504


always the student, never the master.


View Profile
July 08, 2013, 06:51:48 PM
 #13

Parse error: syntax error, unexpected '[' in /home/a2414827/public_html/config.php on line 21

Hmmm.

haha, i can debug tradefortress' faucet script for you. propably something minor

My negative trust rating is reflective of a personal vendetta by someone on default trust.
r3wt
Hero Member
*****
Offline Offline

Activity: 686
Merit: 504


always the student, never the master.


View Profile
July 08, 2013, 06:53:20 PM
 #14

Here you go, full featured faucet program. Automated, configurable, referral program, built in ad rotator, IP logging, blah.

http://glados.cc/myfaucet/

code quality is not that bad. it definitely carries the TF signature though.

My negative trust rating is reflective of a personal vendetta by someone on default trust.
r3wt
Hero Member
*****
Offline Offline

Activity: 686
Merit: 504


always the student, never the master.


View Profile
July 08, 2013, 06:57:24 PM
 #15

ok diamond cards. open config.php with a text editor and replace line 21 with this

Code:
$rewards = ['1000, 1500, 2000, 2500, 3000, 3500, 4000, 5000'];

My negative trust rating is reflective of a personal vendetta by someone on default trust.
DiamondCardz (OP)
Legendary
*
Offline Offline

Activity: 1134
Merit: 1118



View Profile WWW
July 08, 2013, 07:15:12 PM
 #16

ok diamond cards. open config.php with a text editor and replace line 21 with this

Code:
$rewards = ['1000, 1500, 2000, 2500, 3000, 3500, 4000, 5000'];

Thanks.

BA Computer Science, University of Oxford
Dissertation was about threat modelling on distributed ledgers.
r3wt
Hero Member
*****
Offline Offline

Activity: 686
Merit: 504


always the student, never the master.


View Profile
July 08, 2013, 07:17:45 PM
 #17

ok diamond cards. open config.php with a text editor and replace line 21 with this

Code:
$rewards = ['1000, 1500, 2000, 2500, 3000, 3500, 4000, 5000'];

Thanks.

your welcome, if you encounter more errors let me know

My negative trust rating is reflective of a personal vendetta by someone on default trust.
DiamondCardz (OP)
Legendary
*
Offline Offline

Activity: 1134
Merit: 1118



View Profile WWW
July 08, 2013, 07:19:54 PM
 #18

ok diamond cards. open config.php with a text editor and replace line 21 with this

Code:
$rewards = ['1000, 1500, 2000, 2500, 3000, 3500, 4000, 5000'];

Same error pops up.

BTW, my personal code is

Code:
$rewards = ['1000, 1250, 1500, 1750, 2000'];

Which is the same as what you posted, but with different numbers :L

BA Computer Science, University of Oxford
Dissertation was about threat modelling on distributed ledgers.
r3wt
Hero Member
*****
Offline Offline

Activity: 686
Merit: 504


always the student, never the master.


View Profile
July 08, 2013, 07:20:40 PM
 #19

ok diamond cards. open config.php with a text editor and replace line 21 with this

Code:
$rewards = ['1000, 1500, 2000, 2500, 3000, 3500, 4000, 5000'];

Same error pops up.

BTW, my personal code is

Code:
$rewards = ['1000, 1250, 1500, 1750, 2000'];

Which is the same as what you posted, but with different numbers :L

ah, ok let me debug real quick.

My negative trust rating is reflective of a personal vendetta by someone on default trust.
r3wt
Hero Member
*****
Offline Offline

Activity: 686
Merit: 504


always the student, never the master.


View Profile
July 08, 2013, 07:28:00 PM
 #20

try replacing line 21 with:

Code:
$rewards = "[1000, 1250, 1500, 1750, 2000]";

My negative trust rating is reflective of a personal vendetta by someone on default trust.
Pages: [1] 2 »  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!