here is the end portion of the code
$login = $HTTP_SESSION_VARS['_amember_user']['login'];
$name = "/hsphere/local/home/name/name/m3/.$login."/".$d;
//get the size of the file
$size = filesize($name);
//get the server name and all that jazz.. i just found a better way to do this
//and will implement it in the next release
ereg( "(.*\/)([a-zA-z0-9])(.*\.)([a-zA-z0-9]{0,5})$", $PHP_SELF, $regs);
//set up the url
$url = "http://datadink.net/m3/.$login."/".$d;
$site_url = "http://".$SERVER_NAME . $regs[1];
//set upo the gcdurl
$gcdurl = "http://datadink.net".$regs[0] ."?".$QUERY_STRING;
//set the email to throw the bounce message in case it all breaks
$email="ringtones@datdaink.sytes.net";
$to = $HTTP_SESSION_VARS['_amember_user']['city'];
$to1 = $HTTP_SESSION_VARS['_amember_user']['zip'];
//$to=$email;
//test if this is a phone
if (is_phone()) {
//if it is a phone then start to build the GCD for the phone to use to download
$phone_sitename = truncate(ereg_replace(" ","_",$sitename),20);
if (preg_match("/image/",getMIMEtype($url))) $id = "$phone_sitename/image"; else $id = "$phone_sitename/audio";
//set header so phone can handle the GCD file
---------->header("Content-Type: text/x-pcs-gcd");
//Set the content type so the phone knows what to do withthe file once it is
//downloaded
echo "Content-Type: ".getMIMEtype($url)."\n".
//set the file name on the phone
"Content-Name: ".ereg_replace(" ","_",$d)."\n".
//set the contentID
"Content-ID: $id\n".
//Set the GCD version
"Content-Version: 1.0\n".
//Set the site url to be the storfront for the GCD
"Content-Storefront-URL: $site_url\n".
//set the info URL
"Content-Info-URL: $phone_sitename\n".
//set the folder that the files all go into
"Content-Folder: $shortname\n".
// set the vendor that the files are coming from
"Content-Vendor: $phone_sitename\n".
//set the URL that the file is located at
"Content-URL: $url\n".
//and set the size of the file
"Content-Size: $size\n"; <----------
}else {
//start the session to pull the cookie info(phone and email)
session_start();
//check if the cookie has the correct info in it
if ($to=="") header("Location: ".$PHP_SELF."?message=Please+login+or+edit+your+profile");else{
//send the mail to the phone
//set up the from
$menu = $HTTP_SESSION_VARS['_amember_user']['name_l'];
$menuitem = explode("&",$menu);
$new_w = $menuitem[0];
$new_h= $menuitem[1];
header("Content-type: image/jpeg");
$dst_img=ImageCreate($new_w,$new_h);
$src_img=ImageCreateFromJPEG("$d");
ImageCopyResized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,ImageSX($src_img),ImageSY($src_img));
ImageJPEG($dst_img,"/hsphere/local/home/????/?????/m3/$login/$d",85);
$from = "From: $shortname1 <".ereg_replace(" ","_",$shortname1)."@".$SERVER_NAME.">\r\n";
//send the mail
mail($to,$phonemsg, $gcdurl,"From: <$email1>");
//go back to the home page
header("Location: ". $PHP_SELF. "?message=$d+has+been+sent+to+$to1");
}
}
}
?>
The portion in between the arrows is what the phone reads, so i guess it cant read the cookis ($login = $HTTP_SESSION_VARS['_amember_user']['login']😉 since there are on the computer Is there a work around or am i screwed.