Skip to content

Instantly share code, notes, and snippets.

View mahfuzul's full-sized avatar

Mahfuzul Hasan mahfuzul

View GitHub Profile
@mahfuzul
mahfuzul / gist:5a8da362e03c5a82634b7fd9af753fa8
Created May 8, 2019 11:41 — forked from pedroagabreu/gist:1908892061fcb2b2f3c6
Salesforce web to lead via php-curl.
$sfurl = 'https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8';
$sffields = array(
'oid' => 'someoid',
'lead_source' => 'my website',
'last_name' => urlencode($_POST['name']),
'company' => urlencode($_POST['organization']),
'email' => urlencode($_POST['email']),
'phone' => urlencode($_POST['phone']),
);
foreach($sffields as $key=>$value) { $fieldstring .= $key.'='.$value.'&'; }
@mahfuzul
mahfuzul / virtualhost
Last active August 29, 2015 14:22 — forked from saniyat/virtualhost
# Make a file named virtualhost and place it in /usr/local/bin folder.
# Give +x permission to the file.
# use as
# virtualhost sitename.tld relative_path_to/var/www/
# i.e virtualhost d7.san d7
#!/bin/bash
### Set default parameters
action='create'
domain=$1