Use unsecure url to get http://www.example.com in your static block:
{{config path='web/unsecure/base_url'}}
and secure url to get https://www.example.com in your static block:
{{config path='web/secure/base_url'}}
If you want to insert conditional logic within the static block, you have to call a template file within your static block and put the logic in there. Use:
<block type="core/template" name="block.name" template="path/to/template.phtml"/>
Check if current url is secure:
if (Mage::app()->getStore()->isCurrentlySecure()) {
// Your code logic
}
Getting unsecure base url within php:
Mage::getBaseUrl();
Getting secure base url within php:
Mage::getUrl('',array('_secure'=>true));