This repository was archived by the owner on Dec 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
PHP with Guzzle 6
TingHan Su edited this page Jun 5, 2019
·
2 revisions
- Install the Guzzle 6 with the PHP/Composer
$ composer require guzzlehttp/guzzle:~6.0
- To send the transaction, do the following:
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'http://node.deviceproof.org:5566',
'timeout' => 10.0,
]);
$parameters = [
'value' => 0,
'message' => 'ODGAJBRCCDBDHDTCLDHDGADBGAWCHDHDDDGDDBTATAKDXAXCSCSACDFDVCTASCXCSCTAJDVAGAQAGAXCSCGADBGASCXCSCDBTCLDPCADDD9DTCDBXCGDGDIDTCFDVAWAXAYAZA9BABBBCBPCQCRCSCTCUCVCWCXCGAQAGADDIDQC9DXCRCUBTCMDGADBJCODGAXCSCGADBGALASCXCSCDBTCLDPCADDD9DTCDBXCGDGDIDTCFDVAWAXAYAZA9BABBBCBPCQCRCSCTCUCVCWCXCHAZCTCMDGDRAVALAGAQAGAHDMDDDTCGADBGAACGDPCECTCFDXCUCXCRCPCHDXCCDBDUBTCMDVAUAWAYAGAQAGACDKDBDTCFDGADBGASCXCSCDBTCLDPCADDD9DTCDBXCGDGDIDTCFDVAWAXAYAZA9BABBBCBPCQCRCSCTCUCVCWCXCGAQAGADDIDQC9DXCRCUBTCMDZBTCADGADBGARARARARARALBOBQBSBXBEAZBDCLBVBSBMBEAUBOBHCRARARARARAKCFDKCBDWBSBQBUCWBKBUAQBMBBCEDQBBCSBQCXANB9COBLBKB9CDCKBKBYAQBXBKBNBMBLBXC9CUBLBVC9CMB9CYBDDPAWBUC9BOBADADFDTCMBXCGDBCQCZAWBVBFCRCVAMDBBKCFDKCBDTACBDDZBGCNBSBSCWBPBQCIDBCKDFCCBWADCADAC9CECXBXADCWAUCVAADQCADBCCCNDFDXAVCVA9DSBTCTALDUCYC9CXACBHCOBYBKBWAEDFDKDBD9BYBNDZCTBSCKBKCFDKCBDPCNDGDQCBCIDBBECHDMDEDPAYBUATB9DABPBQBDDACDDNBUAUCNDHCKDSBXBXBGDYCNBWAOBOBDDVBNDBBYBYAQCVCXBWCGCHCOBJDYBVCPCICZCCD9CQCNBRCWCZBXBKCFDKCBDEDVBZARBNBFDFCWCXAQCNDTCLBADTAEDQC9CSBNBKB9CKBLBKCFDKCBDRARARARARAOBXBNBEAZBDCLBVBSBMBEAUBOBHCRARARARARAKCFDKCBDGAQDLCQD',
'message_format' => 'trytes',
'tag' => 'POWEREDBYTANGLEACCELERATOR9',
'address' => 'POWEREDBYTANGLEACCELERATOR9999999999999999999999999999999999999999999999999999999',
];
$result = $client->post('transaction', [
'json' => $parameters,
]);
$data = $result->getBody()->getContents();
print_r($data);
Copyright (C) 2018-2020 BiiLabs Co., Ltd. and Contributors.
- Address
- Tag
- Transaction
- Tips (deprecated)