What's happening instead?
One thing I can see is that
$hole = strlen((strpos($temp_text,"}") - $start)); //get length between {}
Has a ) in the wrong place.
Also, remember that string character positions start from 0 in PHP, not 1 as they do in VBScript. So
while(!strpos($temp_text,"{",$e) == 0){
//and
$start = int(strpos($temp_text,"{",1));
Won't work if { is the first character in the string. You'll be wanting
while(strpos($temp_text,"{",$e)!==$false){
//and
$start = strpos($temp_text,"{"); // Why cast an int to an int?
Of course, if I was going to write a function that
I'd be more likely to do it in two lines:
$text = preg_replace("/{([^}]+@[^}]+)}/", "<a href=\"mailto:\\1\">\\1</a>", $text);
$text = preg_replace("/{([^}]+)}/", "<a href=\"http://\\1\">\\1</a>", $text);
(Not that I've tested them or anything.)