Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
iCalendar code works online but not when emailed.
Old 05-01-2009, 06:55 PM iCalendar code works online but not when emailed.
Truly's Avatar
Ultra Talker

Posts: 322
Trades: 0
Hey all,

I am trying to send an iCalendar invite to Outlook users from my website and I am running into problems.

The code works fine if I create a stand-alone page and then if I go there a popup box opens and it downloads the code but I cant get it show up once emailed.

This is the code that works when I have it on the site:
<?php
$Filename = "SWEvent.vcs";
header("Content-Type: text/x-vCalendar");
header("Content-Disposition: inline; filename=$Filename");

?>
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
BEGIN:VEVENT
DTSTART:19970714T170000Z
DTEND:19970715T035959Z
SUMMARY:Bastille Day Party
DESCRIPTION: Testing 123
END:VEVENT
END:VCALENDAR

I tried getting rid of the PHP and just sending it but it just shows up as code. Any advice?

Thanks
__________________
DVD Movie Release Database:
Please login or register to view this content. Registration is FREE
Truly is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-01-2009, 07:49 PM Re: iCalendar code works online but not when emailed.
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
I don't get what you are trying to accomplish. You can't email either PHP or JavaScript. Am I missing something?
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is online now
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 05-01-2009, 11:29 PM Re: iCalendar code works online but not when emailed.
nayes84's Avatar
Extreme Talker

Latest Blog Post:
Difference between ASP And JSP
Posts: 232
Name: John
Location: Tokyo
Trades: 0
you can't also post header data when emailed. why don't you make up the html code and just send it as an email?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

if(I'm("Helpful")) Add_Talkupation("nayes84");
nayes84 is offline
Reply With Quote
View Public Profile
 
Old 05-02-2009, 12:38 PM Re: iCalendar code works online but not when emailed.
Truly's Avatar
Ultra Talker

Posts: 322
Trades: 0
I know you cant send headers and php in email. That was just the code that I used when it worked on the internet. I tried just emailing the iCalendar code and it didnt show up. I am wondering how to send iCalendar code and have it read.
__________________
DVD Movie Release Database:
Please login or register to view this content. Registration is FREE
Truly is offline
Reply With Quote
View Public Profile
 
Old 05-02-2009, 01:21 PM Re: iCalendar code works online but not when emailed.
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
So you need it to be downloadable? If so, you can just post the code as a normal text file, with the extension .vcs, then in your .htaccess file, add this:
Code:
AddType  application/octet-stream .vcs
Or, in your php headers you could:
PHP Code:
header("Content-Type: application/octet-stream"); 
Personally, I find the .htaccess method easier.

****EDIT***
I think I'm missing what you need here. Sorry.
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.

Last edited by wayfarer07; 05-02-2009 at 01:24 PM..
wayfarer07 is online now
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 05-02-2009, 01:52 PM Re: iCalendar code works online but not when emailed.
Truly's Avatar
Ultra Talker

Posts: 322
Trades: 0
Ideally I would like to be able to email it from the server. But when I try and email it the iCalendar code isnt recognized correctly.

Theres barely any documentation on this crap.
__________________
DVD Movie Release Database:
Please login or register to view this content. Registration is FREE
Truly is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to iCalendar code works online but not when emailed.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.32581 seconds with 12 queries