Bitcoin Forum
May 10, 2024, 10:05:10 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: LF> A very basic faucet coder  (Read 2434 times)
DiamondCardz (OP)
Legendary
*
Offline Offline

Activity: 1134
Merit: 1112



View Profile WWW
July 08, 2013, 07: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

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

Posts: 1715378710

View Profile Personal Message (Offline)

Ignore
1715378710
Reply with quote  #2

1715378710
Report to moderator
The forum strives to allow free discussion of any ideas. All policies are built around this principle. This doesn't mean you can post garbage, though: posts should actually contain ideas, and these ideas should be argued reasonably.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715378710
Hero Member
*
Offline Offline

Posts: 1715378710

View Profile Personal Message (Offline)

Ignore
1715378710
Reply with quote  #2

1715378710
Report to moderator
1715378710
Hero Member
*
Offline Offline

Posts: 1715378710

View Profile Personal Message (Offline)

Ignore
1715378710
Reply with quote  #2

1715378710
Report to moderator
1715378710
Hero Member
*
Offline Offline

Posts: 1715378710

View Profile Personal Message (Offline)

Ignore
1715378710
Reply with quote  #2

1715378710
Report to moderator
r3wt
Hero Member
*****
Offline Offline

Activity: 686
Merit: 504


always the student, never the master.


View Profile
July 08, 2013, 07: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 = "['<iframe scrolling='no' style='border: 0; width: 250px; height: 250px;' src='http://coinurl.com/get.php?id=14173'></iframe>']";

$textAds = "['<p><strong><a href='http://coinchat.org'>CoinChat</a></strong> - get free Bitcoins chatting!</p>', '<p><strong>Get your own faucet!</strong> <a href='http://glados.cc/myfaucet'>MyFaucet PHP script - free!</a></p>']";

$bannerAds = "['<iframe scrolling='no' style='border: 0; width: 468px; height: 60px;' src='http://coinurl.com/get.php?id=14179'></iframe>']";

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: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.

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

Activity: 1134
Merit: 1112



View Profile WWW
July 08, 2013, 07: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.

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:49:13 PM
 #25

 here you go replace line 55

Code:
$bannerAds = "[<iframe scrolling='no' style='border: 0; width: 468px; height: 60px;' src='http://coinurl.com/get.php?id=14179'></iframe>]";

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.

My negative trust rating is reflective of a personal vendetta by someone on default trust.
🏰 TradeFortress 🏰
Bitcoin Veteran
VIP
Legendary
*
Offline Offline

Activity: 1316
Merit: 1043

👻


View Profile
July 09, 2013, 12:37:40 AM
 #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 = ["<iframe scrolling='no' style='border: 0; width: 468px; height: 60px;' src='http://coinurl.com/get.php?id=14179'></iframe>"];

WTF again.
r3wt
Hero Member
*****
Offline Offline

Activity: 686
Merit: 504


always the student, never the master.


View Profile
July 09, 2013, 12:40:29 AM
 #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 = ["<iframe scrolling='no' style='border: 0; width: 468px; height: 60px;' src='http://coinurl.com/get.php?id=14179'></iframe>"];

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.

My negative trust rating is reflective of a personal vendetta by someone on default trust.
🏰 TradeFortress 🏰
Bitcoin Veteran
VIP
Legendary
*
Offline Offline

Activity: 1316
Merit: 1043

👻


View Profile
July 09, 2013, 12:42:32 AM
 #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.
🏰 TradeFortress 🏰
Bitcoin Veteran
VIP
Legendary
*
Offline Offline

Activity: 1316
Merit: 1043

👻


View Profile
July 09, 2013, 12:44:10 AM
 #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.
r3wt
Hero Member
*****
Offline Offline

Activity: 686
Merit: 504


always the student, never the master.


View Profile
July 09, 2013, 12:48:00 AM
 #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?

My negative trust rating is reflective of a personal vendetta by someone on default trust.
🏰 TradeFortress 🏰
Bitcoin Veteran
VIP
Legendary
*
Offline Offline

Activity: 1316
Merit: 1043

👻


View Profile
July 09, 2013, 12:53:33 AM
 #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.
r3wt
Hero Member
*****
Offline Offline

Activity: 686
Merit: 504


always the student, never the master.


View Profile
July 09, 2013, 12:54:37 AM
 #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?

My negative trust rating is reflective of a personal vendetta by someone on default trust.
🏰 TradeFortress 🏰
Bitcoin Veteran
VIP
Legendary
*
Offline Offline

Activity: 1316
Merit: 1043

👻


View Profile
July 09, 2013, 12:57:26 AM
 #33

PHP Version 5.4.4
r3wt
Hero Member
*****
Offline Offline

Activity: 686
Merit: 504


always the student, never the master.


View Profile
July 09, 2013, 01:25:50 AM
 #34

PHP Version 5.4.4

hmm.. i thought i was runing 4.4 to but upon inspection i'm running 5.3.4

My negative trust rating is reflective of a personal vendetta by someone on default trust.
super3
Legendary
*
Offline Offline

Activity: 1094
Merit: 1006


View Profile WWW
July 11, 2013, 02:26:08 AM
 #35

Seems you are having some trouble getting that stuff working. I could lease out my TRC Faucet code if you want.

Bitcoin Dev / Storj - Decentralized Cloud Storage. Winner of Texas Bitcoin Conference Hackathon 2014. / Peercoin Web Lead / Primecoin Web Lead / Armory Guide Author / "Am I the only one that trusts Dogecoin more than the Federal Reserve?"
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!