Search content
Sort by

Showing 20 of 30 results by paraboul
Post
Topic
Board Project Development
Re: Need help about PHP and API
by
paraboul
on 29/09/2017, 08:53:54 UTC
Quote
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);

FWITW, doing this or just error_reporting(0) is the same. It takes a binary flag as arguments. It's like doing 0xFFFF & ~0xFFFF which obviously equals...0.
Post
Topic
Board Project Development
Re: Need help about PHP and API
by
paraboul
on 28/09/2017, 19:08:06 UTC
Quote
I do not understand your "add a @ in front of the call"

In PHP, adding a @ in front of a call disables any error related to this call. But you should globally disable error reporting in your php.ini.
Just read the doc Wink


I have put this:
Quote
ini_set('display_errors', 'off');
error_reporting(0);
But I do not see a difference.

about the @ I have not yet foud.

@ just tells PHP not to trigger an error for a particular call. (e.g. when you don't globally disable all the errors)
Post
Topic
Board Project Development
Re: Need help about PHP and API
by
paraboul
on 27/09/2017, 17:59:04 UTC
Quote
I do not understand your "add a @ in front of the call"

In PHP, adding a @ in front of a call disables any error related to this call. But you should globally disable error reporting in your php.ini.
Just read the doc Wink
Post
Topic
Board Project Development
Re: Need help about PHP and API
by
paraboul
on 27/09/2017, 15:40:06 UTC
Well, you just leaked your secret key from coin-hive because file_get_contents failed and disclosed the URL you're trying to call (with the secret key embedded).

1. Disable PHP errors on production!
2. We now know we shouldn't trust the thing you're calling 'U2cloudmining'

https://i.imgur.com/pKwxIK7.jpg

Thanks and how can I do this?
and test it?

http://php.net/manual/en/function.error-reporting.php

If it's just for file_get_contents, add a @ in front of the call.
Post
Topic
Board Web Wallets
Re: how to recover password? (blockchain.info)
by
paraboul
on 27/09/2017, 14:25:19 UTC
Hello everyone.

I have a wallet ID and I can access to my email.
How can I recover my password?
because blockchain.info ask me to fill up 12 words recovery passphrase but I couldn't remember passphrase.

thank you.


If you lost your password and the passphrase, you can't recover anything. IIRC blockchain info only stores an encrypted version of your wallet.
As stated on their website https://blockchain.info/fr/wallet/security :

Quote
In the event that you lose your Wallet ID (or worse your password), your Backup Phrase is the only way you’ll be able to regain access to your funds. Reminder: we’re a non-custodial wallet which means we can’t reset your password.
Post
Topic
Board Project Development
Re: Need help about PHP and API
by
paraboul
on 27/09/2017, 14:17:05 UTC
Quote

Well, you just leaked your secret key from coin-hive because file_get_contents failed and disclosed the URL you're trying to call (with the secret key embedded).

1. Disable PHP errors on production!
2. We now know we shouldn't trust the thing you're calling 'U2cloudmining'

https://i.imgur.com/pKwxIK7.jpg
Post
Topic
Board Project Development
Re: Need help about PHP and API
by
paraboul
on 27/09/2017, 13:31:19 UTC
Quote
Both codes work
but I am not able to replace :
$data = '{"success":true,"name":"winspiral","total":196864,"withdrawn":0,"balance":196864}';
by
 
$data='$file';
why?

Because :

1. If $file contains the JSON, it must be either just $file (no quote, or double quote instead of single) or just use $file as the data.
2. If you want to read the data from a file, use something like $data = file_get_contents($path_to_file) (or whatever is the API you get your JSON from)

Anyway, this is very basic programming. If you're planning to deal with other people money, you shouldn't do this yourself.
Post
Topic
Board Development & Technical Discussion
Re: Bitcoin Fork November. BTC and BCH
by
paraboul
on 27/09/2017, 12:52:50 UTC
Hello

I have a question about the next fork, that could probably come in November 2017.
When the first fork happened, I was holding 0.5 BTC and got the same in BCH (nice fork Grin)

So now I have 0.5 BTC and 0.5 BCH.
What happens on the next fork?
Will I get 0.5 BTC of that new third coin, or will I get 1 coin?
Basically, am I getting only new coins for the BTC I hodl or also for the BCH?
Sorry for my noob question, but I could not find any answer to this yet.
Thank you!

This is simple to understand. The only duplicated coins are the ones that share the same blockchain. It's exactly like copying a file and start working on both copy at some point. You share the same history but every new change is made on only one file, not both.
So if there is a fork from BTC, you'll only have this one duplicated, since BCH as nothing to do with the new fork and doesn't share the same history since it happened.
Post
Topic
Board Project Development
Re: Need help about PHP and API
by
paraboul
on 27/09/2017, 12:39:25 UTC
This is quite dumb, but if you really want to have the named variable exported to the global namespace, you can use extract()

e.g.

Code:
$data = '{"success":true,"name":"winspiral","total":196864,"withdrawn":0,"balance":196864}';
extract((array)json_decode($data), EXTR_SKIP);

echo "Hey $name, your balance is $balance";

Anyway, you shouldn't do this and avoid trashing the global namespace (or current scope), just use a regular object, like :

Code:
$obj = json_decode($data);
echo "Hey $obj->name, your balance is $obj->balance";
Post
Topic
Board Altcoin Discussion
Re: need help !!
by
paraboul
on 27/09/2017, 11:29:14 UTC
I guess you're refering to GetBlockSubsidy() function.

nSubsidy is the number of coin "mined".
nHeight is the block number.

Here you're just telling the function to reward "10000" coins for the first block (provided that you're returning this value).

Given what you asked, a more comprehensible way to achieve the same result would be :

Code:
  nSubsidy = (nHeight == 1) ?
                      10000 * COIN :
                      100 * COIN;

Also, not sure, but the first block is probably 0 (nHeight)

i want 10000coins  in the first block and he rest blocks should have 100 coins each  considering the simple liteocin source i guess mine is right but still need some expert advice


Since you only want 100000 coins total, you need to stop rewarding coin after 1000 blocks minus the first premined. So 900 blocks. (900*100 + 10000 = 100000).

Just add at the beginning :

Code:
if (nHeight > 900) return 0;

Not sure what your problem is? This is very simple
Post
Topic
Board Altcoin Discussion
Re: need help !!
by
paraboul
on 27/09/2017, 11:15:46 UTC
I guess you're refering to GetBlockSubsidy() function.

nSubsidy is the number of coin "mined".
nHeight is the block number.

Here you're just telling the function to reward "10000" coins for the first block (provided that you're returning this value).

Given what you asked, a more comprehensible way to achieve the same result would be :

Code:
  nSubsidy = (nHeight == 1) ?
                      10000 * COIN :
                      100 * COIN;

Also, not sure, but the first block is probably 0 (nHeight)
Post
Topic
Board Beginners & Help
Re: Avoid fees when buying coins
by
paraboul
on 27/09/2017, 07:46:33 UTC
I want to start buying some coins (btc, eth, altcoins...) but when looking at the exchanges like bitfinex, bitmex... they all charge some non neglectable fees to deposit USD or coins.
So my question is: is there a way to avoid all these fees ?

You can still buy coins "off exchanges" but you then lose the escrow service provided by it. (having a trusted third party handling the transaction for you).

Quote
Is it better to deposit cash on an exchange and buy coins directly on the exchange? Or buy coins and then transfer them to the exchange (I saw bitfinex charges had deposits but not btc deposits for example)
Also if I create an account on different exchanges, do I need to create a wallet for each one or can I use the same wallet on different places ?

It's ALWAYS better to keep your coins out of the exchange. "Not your private key, not your coin".
Obviously, you can manage all your coin on one wallet. Just transfer your coin to one of the addresses provided by your wallet.

Also, if your plan is to do some day trading, of course, keep what you need on the platform. Just keep in mind that any third party holding your money may shutdown without prior notice.
Post
Topic
Board Beginners & Help
Re: private Key ?
by
paraboul
on 25/09/2017, 13:50:05 UTC
what is private key and how this key work ?

This is the base concept behind asymmetrical cryptography (https://en.wikipedia.org/wiki/Public-key_cryptography).
You can share your public key with anyone, so that one can encrypt a message that only you can read (owner of the private key derived from the public key).

When it comes to bitcoin (or more generally to cryptocurrencies), your private key allows you to spend the coins you received on your public address (wallet address). (More info here : https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses)
Post
Topic
Board Currency exchange
Re: Buying BTC using Skrill
by
paraboul
on 25/09/2017, 13:42:56 UTC
There are various exchanges listed here: https://en.bitcoin.it/wiki/Skrill
Post
Topic
Board Project Development
Re: Is it possible to create a coinbase exchange? with lower fees?
by
paraboul
on 20/09/2017, 14:08:46 UTC
Quote
Now I do have a white paper and eveything ready to go but before I push the button. I want to know is this possible.

So, you have a white paper but don't know if it's possible?  Roll Eyes

Quote
But you wont be able to withdraw for the first 3 months of the grand opening of the site. This being that if people decide to just go to my site and withdraw I would go bankrupt in the matter of seconds

So you're going to play with people money?
This look a very good plan if your final goal is to end up in jail.
Post
Topic
Board Développement et technique
Re: Interaction fiat- cryptomonnaie
by
paraboul
on 19/09/2017, 17:14:22 UTC
Bonjour,

Il existe deux principe de fonctionnement pour les carte de paiement crypto <-> FIAT

Le pré-paiement
Il s'agit ici de service type CryptoPay
1) L'utilisateur doit envoyer des fonds Bitcoin vers son wallet CryptoPay
2) CryptoPay fait ensuite la conversion des Bitcoins vers une devise FIAT
3) Les fonds sont ensuite chargé sur la carte bancaire
4) Les paiements sont ensuite réalisé de manière classique

Le paiement a la volé
Il s'agit ici du mécanisme utilisé par TenX
1) La carte de paiement dispose d'un solde de 0€
2) Lorsque la carte est utilisé pour le paiement la transaction est envoyé aux serveurs Visa/Mastercard puis transmise à TenX (ou autre)
3) Le serveur va vérifier si le wallet de l'utilisateur dispose de suffisamment de Bitcoin
4) Les Bitcoins sont vendu "a la volé" pour le montant exact de la transaction
5) La devise FIAT est envoyé sur la carte de paiement
6) La transaction est approuvé, le solde de la carte retourne a 0€

Chaque service dispose de divers mécanisme pour la conversion/vente des cryptos a la volé mais le principe reste globalement le même. Dans le cas de TenX par exemple ils utilisent le réseau COMIT qui permet l'utilisation de plusieurs types de cryptocurency et des smart contrat off-chain sont utilisé pour réaliser les conversion. Si tu souhaite en savoir plus a ce sujet, tu peux lire le white-paper de COMIT ( http://www.comit.network/doc/COMIT%20white%20paper%20v1.0.2.pdf ) ou même celui de TenX ( https://www.tenx.tech/whitepaper/tenx_whitepaper_final.pdf )
Post
Topic
Board Development & Technical Discussion
Re: Bitcoin transaction help
by
paraboul
on 18/09/2017, 11:38:52 UTC
Quote
So I started thinking: Am I correct, that when sending a bitcoin transaction, all of the amount from a specific address gets placed in the input, a part of it (the part which I specify) gets sent to the address I wish to send, and the rest gets transferred to a newly created address on the same wallet, from which the send operation was initiated?

Not "all" of the amount. It uses a UTXO (Unspent Transaction Output) as input and send you back the change for it.
Basically, a UTXO is the output of a previous transaction you received. The way your wallet handle this is also called "coin control".
Post
Topic
Board Meta
Re: How to input Avatar?
by
paraboul
on 18/09/2017, 06:25:15 UTC
Post
Topic
Board Meta
Re: How to input Avatar?
by
paraboul
on 18/09/2017, 06:18:22 UTC
Post
Topic
Board Development & Technical Discussion
Re: How do you realistically start a blockchain?
by
paraboul
on 18/09/2017, 06:10:18 UTC
What's your question?

Do you mean, how does one aquire the skill to understand every aspect of the blockchain, from the economic perspective, to the technical aspect?
Probably start hacking into the existing and understand the state of the art.