Author

Topic: LF> A very basic faucet coder (Read 2484 times)

legendary
Activity: 1094
Merit: 1006
July 10, 2013, 09:26:08 PM
#35
Seems you are having some trouble getting that stuff working. I could lease out my TRC Faucet code if you want.
hero member
Activity: 686
Merit: 504
always the student, never the master.
July 08, 2013, 08:25:50 PM
#34
PHP Version 5.4.4

hmm.. i thought i was runing 4.4 to but upon inspection i'm running 5.3.4
vip
Activity: 1316
Merit: 1043
👻
July 08, 2013, 07:57:26 PM
#33
PHP Version 5.4.4
hero member
Activity: 686
Merit: 504
always the student, never the master.
July 08, 2013, 07:54:37 PM
#32
mad that his code didn't work on php 5.5 the arrays for the ads are completely unnecessary anyway. what does it accomplish?

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

This is a classic signature for an outdated PHP version that does not support the shorter array syntax format.

The ads are in an array so they can rotate.
oh. what version of php are you on?
vip
Activity: 1316
Merit: 1043
👻
July 08, 2013, 07:53:33 PM
#31
mad that his code didn't work on php 5.5 the arrays for the ads are completely unnecessary anyway. what does it accomplish?

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

This is a classic signature for an outdated PHP version that does not support the shorter array syntax format.

The ads are in an array so they can rotate.
hero member
Activity: 686
Merit: 504
always the student, never the master.
July 08, 2013, 07:48:00 PM
#30
mad that his code didn't work on php 5.5 the arrays for the ads are completely unnecessary anyway. what does it accomplish?
vip
Activity: 1316
Merit: 1043
👻
July 08, 2013, 07:44:10 PM
#29
Just stop wasting people's time if you have nothing to talk about.

@DiamondCardz: Update your PHP version. If you're on shared hosting, ask them to upgrade / move you to a server that has the updated PHP version. Download the original script and it'll work, don't listen to the suggestions that will break the script.
vip
Activity: 1316
Merit: 1043
👻
July 08, 2013, 07:42:32 PM
#28
The code did not work because DiamondCardz was running it on an outdated PHP version. Update to the latest PHP version and the original version will work.

Your suggestion does not throw an error, however it breaks the script and people will not get any rewards.

You do not quote NUMBERS with strings.
hero member
Activity: 686
Merit: 504
always the student, never the master.
July 08, 2013, 07:40:29 PM
#27
no r3wt wtf?

NOT like that. You do not put quotes around arrays. Have you written a single line of PHP code before?

Seriously, WTF?

It should be this:

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

$bannerAds = [""];

WTF again.

you still have to quote the variables inside of the array. way to go on a tangeant for no reason. as to your last point(lines 52-55) the array is completely useless and unnecessary for these lines. a simple print or echo would have been much simpler, and still just as functional.
vip
Activity: 1316
Merit: 1043
👻
July 08, 2013, 07:37:40 PM
#26
no r3wt wtf?

NOT like that. You do not put quotes around arrays. Have you written a single line of PHP code before?

Seriously, WTF?

It should be this:

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

$bannerAds = [""];

WTF again.
hero member
Activity: 686
Merit: 504
always the student, never the master.
July 08, 2013, 02:49:13 PM
#25
 here you go replace line 55

Code:
$bannerAds = "[]";

as for the second error you will need to setup a mySQLi database and input the necessary values in to the array(s) for username host and password and/or port.
legendary
Activity: 1134
Merit: 1118
July 08, 2013, 02:42:54 PM
#24
Oh god, there is more.

Code:
Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /home/a2414827/public_html/config.php on line 56

Hmmm.

Code:
Warning: mysqli::mysqli() [mysqli.mysqli]: (28000/1045): Access denied for user 'username'@'localhost' (using password: YES) in /home/a2414827/public_html/config.php on line 10

^ That one is probably because I'm being retarded and not starting a MySQL database. I'm tired atm, will probably do it tomorrow.

Code:
SQL error: Access denied for user 'username'@'localhost' (using password: YES)

Refer to the above.
hero member
Activity: 686
Merit: 504
always the student, never the master.
July 08, 2013, 02:39:39 PM
#23
for future reference php will require you to use
Code:
 ' 
instead of
Code:
"
for inner html/js inside of a php script 99% of the time.
hero member
Activity: 686
Merit: 504
always the student, never the master.
July 08, 2013, 02:36:52 PM
#22
That fixed it. Now we have what seems to be the final error:

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


replace lines 53-55 with this. just a minor syntax error

Code:
$squareAds = "['']";

$textAds = "['

CoinChat - get free Bitcoins chatting!

', '

Get your own faucet! MyFaucet PHP script - free!

']";

$bannerAds = "['']";
legendary
Activity: 1134
Merit: 1118
July 08, 2013, 02:31:50 PM
#21
That fixed it. Now we have what seems to be the final error:

Code:
Parse error: syntax error, unexpected '[' in /home/a2414827/public_html/config.php on line 51
hero member
Activity: 686
Merit: 504
always the student, never the master.
July 08, 2013, 02:28:00 PM
#20
try replacing line 21 with:

Code:
$rewards = "[1000, 1250, 1500, 1750, 2000]";
hero member
Activity: 686
Merit: 504
always the student, never the master.
July 08, 2013, 02: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.
legendary
Activity: 1134
Merit: 1118
July 08, 2013, 02: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
hero member
Activity: 686
Merit: 504
always the student, never the master.
July 08, 2013, 02: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
legendary
Activity: 1134
Merit: 1118
July 08, 2013, 02: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.
hero member
Activity: 686
Merit: 504
always the student, never the master.
July 08, 2013, 01: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'];
hero member
Activity: 686
Merit: 504
always the student, never the master.
July 08, 2013, 01: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.
hero member
Activity: 686
Merit: 504
always the student, never the master.
July 08, 2013, 01: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
legendary
Activity: 1134
Merit: 1118
July 08, 2013, 01: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.
full member
Activity: 238
Merit: 100
Live Stars - Adult Streaming Platform
July 08, 2013, 01: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.
legendary
Activity: 1134
Merit: 1118
July 08, 2013, 01:24:31 PM
#10
Parse error: syntax error, unexpected '[' in /home/a2414827/public_html/config.php on line 21

Hmmm.
legendary
Activity: 1134
Merit: 1118
July 08, 2013, 11:15:57 AM
#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
full member
Activity: 238
Merit: 100
Live Stars - Adult Streaming Platform
July 08, 2013, 08:41:41 AM
#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.
vip
Activity: 1316
Merit: 1043
👻
July 08, 2013, 01: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/
legendary
Activity: 1134
Merit: 1118
July 07, 2013, 11:52:29 PM
#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.

vip
Activity: 1316
Merit: 1043
👻
July 07, 2013, 08:31:22 PM
#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.
full member
Activity: 238
Merit: 100
Live Stars - Adult Streaming Platform
July 07, 2013, 04:17:54 PM
#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:
        

Form





address











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

        %>


Form




<% Response.Write address %> has been submitted




Hope this helps
legendary
Activity: 1134
Merit: 1118
July 07, 2013, 04: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:

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 
'PHP_SELF']);?>" method="post">
 

Address


 


';
}

?>

Looking more for PURE HTML/ASP.
full member
Activity: 238
Merit: 100
Live Stars - Adult Streaming Platform
July 07, 2013, 04: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:

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 
'PHP_SELF']);?>" method="post">
 

Address


 


';
}

?>
legendary
Activity: 1134
Merit: 1118
July 07, 2013, 03: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.
Jump to: