mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-11-23 04:30:19 +01:00
added php example
This commit is contained in:
parent
98399c91dd
commit
a9b3c34305
1 changed files with 31 additions and 0 deletions
|
@ -281,6 +281,37 @@ include "includes/head.html"
|
|||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h3>Use it in your PHP/Composer project</h3>
|
||||
<div class="terminal-top">
|
||||
</div>
|
||||
<div class="terminal">
|
||||
<code>
|
||||
<span class="code-title">installation</span>
|
||||
<br/>composer require codebridge/transfersh
|
||||
<br/> <span class="code-title">usage</span>
|
||||
<br/><?php
|
||||
<br/>require('vendor/autoload.php');
|
||||
<br/>use CodeBridge\Transfer;
|
||||
<br/>
|
||||
<br/>$transfer_client = new Transfer();
|
||||
<br/>
|
||||
<br/>$file_path = realpath('./whatever.ext');
|
||||
<br/>$download_url = $transfer_client->send($file_path);
|
||||
</code>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h3>Transfer pound logs</h3>
|
||||
<div class="terminal-top">
|
||||
</div>
|
||||
<div class="terminal">
|
||||
<code>
|
||||
<span class="code-title"># grep syslog for pound and transfer</span>
|
||||
<br/>$ cat /var/log/syslog|grep pound|curl --upload-file - https://transfer.sh/pound.log
|
||||
</code>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h3>Send us your awesome example</h3>
|
||||
<div class="terminal-top">
|
||||
|
|
Loading…
Reference in a new issue