Skip to content

Instantly share code, notes, and snippets.

View sclaeys's full-sized avatar
🎯
Focusing

Scott Claeys sclaeys

🎯
Focusing
View GitHub Profile
@sclaeys
sclaeys / free-backend-hosting.md
Created June 1, 2023 08:30 — forked from bmaupin/free-backend-hosting.md
Free backend hosting
@sclaeys
sclaeys / virtualizor-welcome-email.txt
Created September 1, 2022 15:42
Text file containing html source of a VPS welcome email template (for WHMCS)
<p>Dear {$client_name},</p>
<p><strong>PLEASE PRINT THIS MESSAGE FOR YOUR RECORDS – PLEASE READ THIS EMAIL IN FULL.</strong></p>
<p>We are pleased to inform you that the VPS you ordered has been set up.</p>
<p><strong>Server Details<br /></strong>=============================</p>
<p>{$service_product_name} - <a title="Manage {$service_product_name}" href="{$whmcs_url}clientarea.php?action=productdetails&amp;id={$service_id}" target="_blank" rel="noopener">Click to Manage</a></p>
<p>ServerName: {$service_domain}<br />Main IP: {$service_dedicated_ip}<br />Root pass: {$service_password}<br />{if $service_assigned_ips} IP Address Allotted: {$service_assigned_ips} {/if}</p>
<p><strong>Client Area<br /></strong>=============================</p>
<p>Manage Service from Client Area: <a href="{$whmcs_url}clientarea.php?action=productdetails&id={$service_id}">Click Here</a></p>
<p><strong>Manager Details<br /></strong>=============================</p>
<p>URL: <a>https://{$service_server_hostname}:4083</a><br />Username:
@sclaeys
sclaeys / response.json
Last active February 12, 2019 04:09
WEBZ.CC URL Shortener API response
// No errors
{
"error":0,
"short":"http:\/\/webz.cc\/DkZOb"
}
// An error has occurred
{
"error":1,
"msg":"Please enter a valid URL"
}
@sclaeys
sclaeys / api.php.php
Last active February 12, 2019 04:08
WEBZ.CC URL Shortener API PHP Request
<?php
// Using JSON Response
$api_url="http://webz.cc/api?key=APIKEY&url=THELONGURLTOBESHORTENED&custom=CUSTOMALIAS";
$res= @json_decode(file_get_contents($api_url),TRUE);
if($res["error"]){
echo $res["msg"];
}else{
echo $res["short"];
}
@sclaeys
sclaeys / Shortener.API.Function.php
Created July 13, 2018 00:03
Sample shortener API Function
<?php
define("SHORTENER_URL", "http://webz.cc");
define("SHORTENER_KEY", "123456789");
/**** Sample PHP Function ***/
function shorten($url, $custom = "", $format = "json") {
$api_url = SHORTENER_KEY."/api/?key=".SHORTENER_KEY;
$api_url .= "&url=".urlencode(filter_var($url, FILTER_SANITIZE_URL));
if(!empty($custom)){
@sclaeys
sclaeys / request.txt
Created July 12, 2018 23:45
Premium URL Shortener API Request
GET http://webz.cc/api?key=APIKEY&url=THELONGURLTOBESHORTENED&custom=CUSTOMALIAS