Bitcoin Forum
May 13, 2024, 09:29:29 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: PHP script to validate a bech32 wallet ?  (Read 153 times)
boxtoshi.com (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 6


View Profile
December 17, 2019, 12:10:46 AM
 #1

Hi,

This is my first post.

I looked on several website but I can't find the good information.

Does anyone can help me out or point me where I can find how to validate a bech32 wallet in php ?

Thank you very much.
1715635769
Hero Member
*
Offline Offline

Posts: 1715635769

View Profile Personal Message (Offline)

Ignore
1715635769
Reply with quote  #2

1715635769
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.
1715635769
Hero Member
*
Offline Offline

Posts: 1715635769

View Profile Personal Message (Offline)

Ignore
1715635769
Reply with quote  #2

1715635769
Report to moderator
1715635769
Hero Member
*
Offline Offline

Posts: 1715635769

View Profile Personal Message (Offline)

Ignore
1715635769
Reply with quote  #2

1715635769
Report to moderator
1715635769
Hero Member
*
Offline Offline

Posts: 1715635769

View Profile Personal Message (Offline)

Ignore
1715635769
Reply with quote  #2

1715635769
Report to moderator
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
December 17, 2019, 03:17:27 AM
 #2

I assume you actually want to validate a bech32 address, not a "wallet" (a wallet is a collection of private keys).

The BIP173 wiki page has links to some reference implementations of encoders/decoders here: https://en.bitcoin.it/wiki/BIP_0173#Reference_implementations

Unfortunately, none of them are PHP... but perhaps they might give you some hints as to how to implement in PHP? Huh

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10560



View Profile
December 17, 2019, 04:30:58 AM
 #3

Unfortunately, none of them are PHP... but perhaps they might give you some hints as to how to implement in PHP? Huh

reference implementations in BIPs aren't always the best anyways.
you can always go on GitHub and search for whatever you want and add the "language:FOO" at the end like this: https://github.com/search?q=bech32+language%3APHP&type=Repositories to find what you need. in this case there is only one repository in PHP that has this: https://github.com/Bit-Wasp/bech32
you can also switch to "Code" tab to find the code in other bigger projects, although that search is a bit harder. https://github.com/search?q=bech32+language%3APHP&type=Code

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
TryNinja
Legendary
*
Offline Offline

Activity: 2828
Merit: 6989



View Profile WWW
December 17, 2019, 07:12:05 AM
 #4

500 erros happen when your PHP code is wrong or throwing errors. You must fix them.

You can post it in a pastebin and link it here if you don’t mind.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
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!