Skip to content

Instantly share code, notes, and snippets.

View i-tabu's full-sized avatar
😎

Tabu i-tabu

😎
View GitHub Profile
@i-tabu
i-tabu / Pepipost_sample_output_success.json
Created March 18, 2016 12:23
Pepipost - sample of successful output
{"message":"SUCCESS","errorcode": "0" ,"errormessage":""}
@i-tabu
i-tabu / Pepipost_sample_json_call.json.txt
Last active April 26, 2016 14:01
Pepipost Sample JSON Call
{
"api_key":"yourapikey",
"email_details":{
"fromname":"sender name",
"subject":"test email subject",
"from":"[email protected]",
"replytoid": "[email protected]",
"content":"<p>Hi [%NAME%], This is a test email sent using Pepipost JSON/Email API</p>"
},
"X-APIHEADER": ["ACC123","SE2532"],
https://api.pepipost.com/api/web.send.rest?
api_key=yourapikey
&subject=rawurlencodeWeekly statement dated 1st Jan 2013")
&fromname=rawurlencode("Info Stats")
&[email protected]
&[email protected]
&X-APIHEADER="ACC123,SE2532"
&tags="AccountDeactivation, Verification"
&content=rawurlencode(" Email content here")
&[email protected],[email protected]
@i-tabu
i-tabu / getopt.php
Last active March 9, 2016 15:59
getopt - get options from params - example
#!/usr/bin/php
<?php
print "\nscript started\n";
//banner
//Usage:
//php your_script.php <server> <host> <db>
$banner = "Usage:\n";
$banner .= "php {$argv[0]} -s <server> -h <host> -d <db>\n";
$banner .= "Example:\n";
$banner .= "php your_script.php -s myserver.tabrez.me -h localhost -d mydb \n";