This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//testing php curl | |
$authURL = 'https://someapi.com/rest/Authentication'; | |
$userName = 'userName'; | |
$apiKey = 'passwords'; | |
$proxyHost = 'host'; | |
$proxyPort = 1111; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'); | |
function postRequest(post_data,responseObject) | |
{ | |
var url = 'http://www.example.com'; | |
var proxy_opt = 'http://domain:port'; | |
var post_options = { | |
uri:url, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function formatCurrency(amount) | |
{ | |
//truncate the amount to 0 decimals | |
//for every digit that is followed by 3 digits and a word boundary | |
//add a comma | |
amount = amount.toFixed(0).replace(/(\d)(?=(\d{3})+\b)/g, "$1,"); | |
return amount; | |
} |
NewerOlder