<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>iphone-2x &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/iphone-2x/</link>
	<description>Feed of posts on WordPress.com tagged "iphone-2x"</description>
	<pubDate>Tue, 05 Jan 2010 03:48:47 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[ Sincronizzare l’iPhone 2.x su Linux usando Amarok ]]></title>
<link>http://gianmichele.wordpress.com/2009/01/30/sincronizzare-l%e2%80%99iphone-2x-su-linux-usando-amarok/</link>
<pubDate>Fri, 30 Jan 2009 07:40:25 +0000</pubDate>
<dc:creator>gianmichele</dc:creator>
<guid>http://gianmichele.wordpress.com/2009/01/30/sincronizzare-l%e2%80%99iphone-2x-su-linux-usando-amarok/</guid>
<description><![CDATA[Con questa guida, inviataci dal nostro utente evilsocket, vediamo come sincronizzare un iPhone con f]]></description>
<content:encoded><![CDATA[Con questa guida, inviataci dal nostro utente evilsocket, vediamo come sincronizzare un iPhone con f]]></content:encoded>
</item>
<item>
<title><![CDATA[Some notes on Nullriver's NetShare application]]></title>
<link>http://jphone.wordpress.com/2008/08/01/some-notes-on-nullrivers-netshare-application/</link>
<pubDate>Sat, 02 Aug 2008 03:30:35 +0000</pubDate>
<dc:creator>jphone</dc:creator>
<guid>http://jphone.wordpress.com/2008/08/01/some-notes-on-nullrivers-netshare-application/</guid>
<description><![CDATA[Nullriver released an app called &#8216;Netshare&#8217; Thursday night. Apple pulled it from the App]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Nullriver released an app called &#8216;Netshare&#8217; Thursday night.</p>
<p>Apple pulled it from the AppStore 20 minutes later.</p>
<p>Today it showed up again on the AppStore. I grabbed it and tried it out, and had a few usage notes that might help some people:</p>
<p><strong>Making the Initial Connection</strong></p>
<p>So you&#8217;ve followed the instructions in the app, and it&#8217;s still not working. Let me give you a few tips.</p>
<p>Setting the IP addresses up as they suggest is good, but ensure you also setup your subnet masks. Set them (on both the phone and computer) to 255.255.255.0</p>
<p>If you&#8217;ve made your ad-hoc network on your machine, you&#8217;ve connected your iPhone to it, you have your SOCKS proxy set and it still doesn&#8217;t work, try this:</p>
<p>If you have connected to your computer with the iPhone, and you have the WiFi bars in the toolbar at the top on the iPhone and not a 3G or Edge icon &#8211; your phone is trying to use the WiFi for incoming and outgoing data. To ensure your iPhone stays connected to the WiFi, but uses your cellular data network for outbound, connect to your computer as instructed in the NetShare app. Once connected, fire up Mobile Safari and connect to a webpage &#8211; any webpage. You&#8217;ll see that the WiFi icon reverts to a 3G or Edge icon after a few second and connects. Don&#8217;t worry &#8211; the WiFi is still on, but now the phone has realized outbound is via the cellular data connection. Fire up NetShare.</p>
<p><strong>Applications</strong></p>
<p>Safari should use your system settings to get online. Applications like Adium and Firefox do not. In adium, for each individual connection, you can edit them and configure proxies to &#8216;use system SOCKS5&#8242; settings. Set your connections to this and they will work whether you&#8217;re on your normal connection, or you&#8217;re on the tethering.</p>
<p>For Firefox, under Preferences/Advanced/Network/Settings select a manual setting and setup a SOCKS5 proxy with the same settings as nullriver instructed for the system.</p>
<p><strong>VPN</strong></p>
<p>While I can connect to my VPN (Cisco IPSec) I still cannot get it to work quite right. We have internal DNS running on our VPN with non-routable (10.23.xx.xx) IP&#8217;s that get served up differently on the VPN vs. through the regular internet. Once I figure out how to access these, I&#8217;ll post more. I&#8217;m guessing if I add a custom DNS setting when tethering this will work, but I haven&#8217;t tried it yet. Trying to use the Cisco VPN client on the computer while tethered via the SOCKS proxy has not worked so far either.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Lotus Notes to iPhone Push Synchronization]]></title>
<link>http://jphone.wordpress.com/?p=3</link>
<pubDate>Thu, 24 Jul 2008 18:41:25 +0000</pubDate>
<dc:creator>jphone</dc:creator>
<guid>http://jphone.wordpress.com/?p=3</guid>
<description><![CDATA[Edit: The over-the-air part is bunk. NuevaSync will not sync public calendars (the very very first s]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>Edit:</strong> The over-the-air part is bunk. NuevaSync will not sync public calendars (the very very first sync from NuevaSync did, then subsequent syncs my public calendars all disappeared). They say it&#8217;s &#8216;high on the priority list&#8217; but for now this method will only allow you to sync your Lotus Notes into iCal on your machine, then use iTunes to sync to your iPhone.</p>
<h2>To Start</h2>
<p>I&#8217;ve been looking for the &#8220;holy grail&#8221; of synchronization between our Notes server and my iPhone. I&#8217;ve managed to use some Jailbreak apps to sync my google calendar with my phone, and even found a couple SyncML clients that will sync (although, none of them worked with the Intellisync server that my company runs for Push e-mail/calendar to things like Treos).</p>
<p>The way this basically works is:</p>
<ul>
<li> Export a range your Lotus Notes calendar to a CSV file (one week back to 2 months forward)</li>
<li>Convert the CSV file to an iCal format</li>
<li>Subscribe to that iCal calendar in Google Calendar</li>
<li>Use NuevaSync to expose our Google Calendar to our iPhone like an MS Exchange server</li>
</ul>
<p>This achieves a true Over The Air sync with no user intervention required other than managing their calendar as they normally would through Lotus Notes. Did I also mention it&#8217;s entirely free?</p>
<p>Disclaimer: This is <strong>not</strong> a 2-way sync solution. Right now, this only downloads and updates calendar items from your Lotus Notes account. To make changes, modify appointments, etc. you&#8217;ll need to still do this from a real Lotus Notes client.</p>
<h2>Two solutions (and eventually, a third)</h2>
<p>So, there&#8217;s really two (or three, eventually) solutions to this problem currently. One is the way I present below, which is true push, over the air one-way syncing.</p>
<p>The second way would be to use iCal to do this. You could subscribe to this calendar in iCal once it&#8217;s expos.ed from the server. This, however, requires tethering to my computer to sync iCal. If you want to do it this way, by all means, feel free. I need over the air syncing. When we get to this point, I&#8217;ll explain how you would do this alternate solution.</p>
<p>The last solution Is related to the iCal sync &#8211; and that would be to use MobileMe to push this content to your phone. This eliminates the Google Calendar and the need for NuevaSync, but it also eliminates $99+ per year from your wallet. Unfortunately right now, MobileMe does not support syncing of calendar subscriptions from your computer (or online). It only supports real, actual calendars you create in iCal (or on MobileMe). Oh well, if it had supported them I wouldn&#8217;t have been pushed to find a free solution to the problem.</p>
<h2>What you&#8217;ll need</h2>
<p>To do this you will need a couple things:</p>
<ul>
<li>Lotus Notes (I believe my agent works in 4.6 and above)
<ul>
<li>It must also have webmail enabled and webmail must be accessible via the Internet</li>
</ul>
</li>
<li>A <a href="http://www.gmail.com">GMail Account</a> (for Google Calendar)</li>
<li>A <a href="http://www.nuevasync.com">NuevaSync Account</a> (for MS Exchange Push of Google Calendar)</li>
<li>An iPhone running the 2.0 software</li>
<li>A server capable of running PHP</li>
<li>The code below</li>
</ul>
<h2>Setting Up Lotus Notes</h2>
<p>First thing&#8217;s first &#8211; we need to get this calendar data out of Lotus Notes. Follow these instructions with the code below:</p>
<ol>
<li>Open your calendar in Lotus Notes</li>
<li>Go to View/Agents</li>
<li>Click on &#8216;New Agent&#8217;</li>
<li>Make sure Target is set to &#8216;None&#8217; and give your agent a friendly name (Mine is &#8216;Cal2CSV&#8217;)</li>
<li>Copy the code below and paste it over anything in the &#8216;Options&#8217; node (i.e. delete all content and then paste)</li>
<li>Close the agent and tell it you would like to save</li>
<li>Access the agent at this URL to test:  http://SERVER.URL.COM/mail/DATABASE.NSF/Cal2CSV?OpenAgent&#38;rangeStart=STARTDATE&#38;rangeEnd=ENDDATE
<ul>
<li>STARTDATE and ENDDATE should be in the format mm/dd/yyyy</li>
</ul>
</li>
</ol>
<blockquote><p>Option Public<br />
Option Explicit</p>
<p>Sub Initialize<br />
&#8216;Code starts here ======================<br />
On Error Goto ErrorThrower</p>
<p>Dim session As New NotesSession<br />
Dim db As NotesDatabase<br />
Dim doc As NotesDocument<br />
Dim col As NotesViewEntryCollection<br />
Dim outputFile As Integer<br />
Dim startDate As NotesDateTime, endDate As NotesDateTime<br />
Dim startDate2 As NotesDateTime, endDate2 As NotesDateTime<br />
Dim RTdescription As NotesRichTextItem<br />
Dim rtitem As Variant<br />
Dim plainText As String<br />
Dim invitelist As String<br />
Dim AllDayEventFlag As String<br />
Dim count As Integer<br />
Static view As NotesView<br />
Dim dateRange As NotesDateRange<br />
Dim ve As NotesViewEntry<br />
Set db = session.CurrentDatabase<br />
Set view = db.GetView(&#8220;Calendar&#8221;)<br />
Set dateRange = session.CreateDateRange()<br />
Dim queryString As String<br />
Dim requestDoc As NotesDocument<br />
Set requestDoc = session.DocumentContext<br />
Dim x As Integer</p>
<p>If Not (requestDoc Is Nothing) Then<br />
queryString = requestDoc.Query_String_Decoded(0)<br />
End If</p>
<p>Dim RangeStart As String, RangeEnd As String<br />
Dim RangeStartDate As NotesDateTime, RangeEndDate As NotesDateTime, RealRangeEnd As NotesDateTime</p>
<p>RangeStart = GetQueryElement(queryString, &#8220;rangeStart&#8221;)<br />
RangeEnd = GetQueryElement(queryString, &#8220;rangeEnd&#8221;)</p>
<p>Print  &#124;&#8221;&#124; &#38; &#8220;Subject&#8221; &#38; &#124;&#8221;,&#8221;&#124; &#38; &#8220;Start Date&#8221; &#38; &#124;&#8221;,&#8221;&#124; &#38; _<br />
&#8220;Start Time&#8221; &#38; &#124;&#8221;,&#8221;&#124; &#38; &#8220;End Date&#8221; &#38; &#124;&#8221;,&#8221;&#124; &#38; &#8220;End Time&#8221; &#38; &#124;&#8221;,&#8221;&#124; &#38; _<br />
&#8220;All day event&#8221; &#38; &#124;&#8221;,&#8221;&#124; &#38;  &#8220;Location&#8221; &#38; &#124;&#8221;,&#8221;&#124; &#38; &#8220;Description&#8221; &#38; &#124;&#8221;&#124;</p>
<p>Set RangeStartDate = New NotesDateTime(RangeStart &#38; &#8221; 12:00:00 AM&#8221;)<br />
Set RangeEndDate = New NotesDateTime(RangeStart &#38; &#8221; 11:59:59 PM&#8221;)<br />
Set RealRangeEnd = New NotesDateTime(RangeEnd &#38; &#8221; 12:00:00 PM&#8221;)</p>
<p>x = 0<br />
While (RangeStartDate.DateOnly &#60;&#62; RealRangeEnd.DateOnly)<br />
&#8216;Print &#124;&#60;br&#62;X= &#124; &#38; x &#38; &#124;  &#124; &#38; RangeStartDate.DateOnly &#38; &#124;&#60;br&#62;&#124;<br />
&#8216;Print &#124;&#60;br&#62;&#124; &#38; RangeEnd &#38; &#124;&#60;br&#62;&#124;<br />
&#8216;For x = 0 To 8<br />
Call RangeStartDate.AdjustDay(1)<br />
Call RangeEndDate.AdjustDay(1)</p>
<p>dateRange.Text = RangeStartDate.DateOnly &#38; &#8221; 12:00:00 AM &#8211; &#8221; &#38; RangeEndDate.DateOnly &#38; &#8221; 11:59:59 PM&#8221;</p>
<p>Set col = view.GetAllEntriesByKey(dateRange)<br />
&#8216;**Set col = db.UnprocessedDocuments<br />
&#8216;**Print col.Count<br />
&#8216;**Exit Sub<br />
count = col.Count</p>
<p>Set ve = col.GetFirstEntry</p>
<p>While Not (ve Is Nothing)<br />
Set doc = ve.Document<br />
&#8216;**Print &#8220;Left to process: &#8221; + Str(count) + &#8221; &#8211; &#8221; + doc.Subject(0)</p>
<p>If (doc.form(0) &#60;&#62; &#8220;Reply&#8221;  And  doc.form(0) &#60;&#62; &#8220;Notice&#8221;) Then<br />
AllDayEventFlag = Not (doc.AppointmentType(0) &#60;&#62; &#8220;2&#8243;)</p>
<p>Set rtitem = doc.GetFirstItem(&#8220;Body&#8221;)<br />
invitelist = &#8220;Chair: &#8220;&#38; doc.CHAIR(0) &#38; &#8221; /  &#8220;<br />
invitelist = invitelist &#38; &#8220;Participants: &#8220;&#38; doc.RequiredAttendees(0) &#38; &#8221; /  &#8220;<br />
On Error Goto noBody<br />
plainText = rtitem.Abstract(5000,False,False)<br />
On Error Goto ErrorThrower</p>
<p>If doc.Repeats(0) = &#8220;1&#8243; Then<br />
Else<br />
Set startDate = New NotesDateTime(doc.StartDateTime(0))<br />
Set endDate = New NotesDateTime(doc.EndDateTime(0))<br />
Print &#124;&#8221;&#124; + doc.Subject(0) + &#124;&#8221;,&#8221;&#124; + _<br />
startDate.DateOnly + &#124;&#8221;,&#8221;&#124; + startDate.TimeOnly + _<br />
&#124;&#8221;,&#8221;&#124; + endDate.DateOnly + &#124;&#8221;,&#8221;&#124; + endDate.TimeOnly + _<br />
&#124;&#8221;,&#8221;&#124; +AllDayEventFlag+  &#124;&#8221;,&#8221;&#124; + doc.location(0) + _<br />
&#8221; &#8221; + doc.ROOM(0) +&#124;&#8221;,&#8221;&#124; + invitelist + plainText + &#124;&#8221;&#124;<br />
End If</p>
<p>End If</p>
<p>Set ve = col.GetNextEntry(ve)<br />
count = count &#8211; 1<br />
Wend</p>
<p>Set ve = col.GetFirstEntry</p>
<p>While Not (ve Is Nothing)<br />
Set doc = ve.Document<br />
&#8216;**Print &#8220;Left to process: &#8221; + Str(count) + &#8221; &#8211; &#8221; + doc.Subject(0)</p>
<p>If (doc.form(0) &#60;&#62; &#8220;Reply&#8221;  And  doc.form(0) &#60;&#62; &#8220;Notice&#8221;) Then<br />
AllDayEventFlag = Not (doc.AppointmentType(0) &#60;&#62; &#8220;2&#8243;)</p>
<p>Set rtitem = doc.GetFirstItem(&#8220;Body&#8221;)<br />
invitelist = &#8220;Chair: &#8220;&#38; doc.CHAIR(0) &#38; &#8221; /  &#8220;<br />
invitelist = invitelist &#38; &#8220;Participants: &#8220;&#38; doc.RequiredAttendees(0) &#38; &#8221; /  &#8220;<br />
On Error Goto noBody<br />
plainText = rtitem.Abstract(5000,False,False)<br />
On Error Goto ErrorThrower</p>
<p>If doc.Repeats(0) = &#8220;1&#8243; Then<br />
Dim i As Integer<br />
For i = 0 To Ubound(doc.RepeatInstanceDates)<br />
Set startDate = New NotesDateTime(doc.RepeatInstanceDates(i))<br />
Set endDate = startDate<br />
On Error Resume Next<br />
Set endDate = New NotesDateTime(doc.EndDateTime(i))<br />
On Error Goto ErrorThrower<br />
If (startDate.TimeDifference(dateRange.StartDateTime) &#62; 0 And endDate.TimeDifference(dateRange.EndDateTime) &#60; 0) Then<br />
Print &#124;&#8221;&#124; + doc.Subject(0) +  &#124;&#8221;,&#8221;&#124; + _<br />
startDate.DateOnly + &#124;&#8221;,&#8221;&#124; + startDate.TimeOnly + _<br />
&#124;&#8221;,&#8221;&#124; + endDate.DateOnly + &#124;&#8221;,&#8221;&#124; + endDate.TimeOnly + _<br />
&#124;&#8221;,&#8221;&#124; +AllDayEventFlag+  &#124;&#8221;,&#8221;&#124; + doc.location(0) + _<br />
&#8221; &#8221; + doc.ROOM(0) +&#124;&#8221;,&#8221;&#124; + invitelist + plainText + &#124;&#8221;&#124;<br />
End If<br />
Next<br />
End If</p>
<p>End If</p>
<p>Set ve = col.GetNextEntry(ve)<br />
count = count &#8211; 1<br />
Wend<br />
&#8216;Next<br />
x = x + 1<br />
Wend<br />
Exit Sub</p>
<p>errorThrower:<br />
Error Err, Error &#38; Chr(13) + &#8220;Module: &#8221; &#38;_<br />
Cstr( Getthreadinfo(1) ) &#38; &#8220;, Line: &#8221; &#38; Cstr( Erl )<br />
Exit Sub</p>
<p>noBody:<br />
plainText = &#8220;No description&#8221;<br />
Resume Next</p>
<p>noEndDate:<br />
Resume Next<br />
&#8216;Code ends here =============================</p>
<p>End Sub</p>
<p>Sub Terminate</p>
<p>End Sub</p>
<p>Function GetQueryElement (queryString As String, elementName As String) As String<br />
&#8216;** get the value of a particular element in the query string<br />
Dim qe As String<br />
Dim pos As Integer</p>
<p>pos = Instr(1, queryString, elementName, 5)<br />
If (pos &#62; 0) Then<br />
qe = Mid$(queryString, pos + Len(elementName) + 1)<br />
Else<br />
Exit Function<br />
End If</p>
<p>pos = Instr(1, qe, &#8220;&#38;&#8221;, 5)<br />
If (pos &#62; 0) Then<br />
qe = Left$(qe, pos &#8211; 1)<br />
End If</p>
<p>GetQueryElement = Trim(Ucase(qe))<br />
End Function</p></blockquote>
<h2>Setup your iCal converter</h2>
<p>Now that you have your calendar data successfully exporting from Notes, you need to turn that data into iCal format.</p>
<p>Now, you may have found an Agent for Notes on IBM&#8217;s site that claims to import and export iCal formats. I was never able to get this to work to export to a file iCal (or any subscription service like Google Calendar) could read. In addition, the one they supply exports to a file, and not to the web directly. I modified it to do this, and it still doesn&#8217;t work. I wouldn&#8217;t worry about trying.</p>
<p>First, you will need the iCal Creator PHP class found <a href="http://www.kigkonsult.se/iCalcreator/index.php">here</a>. Put this in a folder on your webserver.</p>
<p>In the same folder, make a file called ical.php and paste the following code:</p>
<blockquote><p>&#60;?<br />
/**<br />
* CSV to iCal convertor<br />
* Used primarily with the simple CSV generated by the Cal2CSV Notes Agent Script<br />
* copyright (c) 2008-2009 Jimmy Mooney<br />
* www.jimmymooney.com<br />
* ia@jimmymooney.com<br />
*<br />
* This library is free software; you can redistribute it and/or<br />
* modify it under the terms of the GNU Lesser General Public<br />
* License as published by the Free Software Foundation; either<br />
* version 2.1 of the License, or (at your option) any later version.<br />
*<br />
* This library is distributed in the hope that it will be useful,<br />
* but WITHOUT ANY WARRANTY; without even the implied warranty of<br />
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU<br />
* Lesser General Public License for more details.<br />
*<br />
* You should have received a copy of the GNU Lesser General Public<br />
* License along with this library; if not, write to the Free Software<br />
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA<br />
*/</p>
<p>require_once( &#8216;iCalcreator.class.php&#8217; );</p>
<p>// PLEASE SET THESE THREE VARIABLES<br />
$server_url = &#8220;YOUR.SERVER.URL.COM&#8221;;<br />
$database_name = &#8220;DATABASE.NAME.nsf&#8221;;<br />
$agent_name = &#8220;Cal2CSV&#8221;;</p>
<p>// DO NOT EDIT BELOW THIS LINE<br />
$ch = curl_init();<br />
$timeout = 10;<br />
// set to zero for no timeout&#60;br /&#62;<br />
$user = $_GET["username"];<br />
$password = $_GET["password"];</p>
<p>curl_setopt($ch,CURLOPT_USERPWD,$user . &#8220;:&#8221; . $password);</p>
<p>curl_setopt ($ch, CURLOPT_URL, &#8216;http://&#8217;.$server_url.&#8217;/mail/&#8217;.$database_name.&#8217;/&#8217;.$agent_name.&#8217;?OpenAgent&#38;rangeStart=&#8217;.date(&#8220;m/d/Y&#8221;, mktime(0, 0, 0, date(&#8220;m&#8221;), date(&#8220;d&#8221;) &#8211; 7, date(&#8220;Y&#8221;))).&#8217;&#38;rangeEnd=&#8217;. date(&#8220;m/d/Y&#8221;, mktime(0, 0, 0, date(&#8220;m&#8221;)+2, date(&#8220;d&#8221;), date(&#8220;Y&#8221;))));<br />
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);<br />
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);<br />
$file_contents = curl_exec($ch);<br />
$error = curl_error($ch);</p>
<p>curl_close($ch);</p>
<p>$file_contents = strip_tags($file_contents);<br />
$file_contents = trim($file_contents);</p>
<p>//echo $file_contents . &#8220;&#60;br&#62;&#60;BR&#62;&#60;BR&#62;&#8221;;</p>
<p>$data = parse($file_contents);</p>
<p>$v = new vcalendar(); // create a new calendar instance<br />
$v-&#62;setConfig( &#8216;unique_id&#8217;, $server_url ); // set Your unique id<br />
$v-&#62;setProperty( &#8216;method&#8217;, &#8216;PUBLISH&#8217; ); // required of some calendar software<br />
/*<br />
[0] = Subject<br />
[1] = Start Date<br />
[2] = Start Time<br />
[3] = End Date<br />
[4] = End Time<br />
[5] = All Day (&#8216;True&#8217; or &#8216;False&#8217;)<br />
[6] = Location<br />
[7] = Description<br />
*/<br />
//echo $data[1][1];<br />
for($x = 1; $x &#60; sizeof($data); $x++)<br />
{<br />
if($data[$x][1] == &#8220;&#8221;)<br />
{<br />
}<br />
else<br />
{<br />
$vevent = new vevent(); // create an event calendar component</p>
<p>$startMonth = split(&#8220;/&#8221;, $data[$x][1]);<br />
$startMonth = $startMonth[0];<br />
$startDay = split(&#8220;/&#8221;, $data[$x][1]);<br />
$startDay = $startDay[1];<br />
$startYear = split(&#8220;/&#8221;, $data[$x][1]);<br />
$startYear = $startYear[2];<br />
$endMonth = split(&#8220;/&#8221;, $data[$x][1]);<br />
$endMonth = $endMonth[0];<br />
$endDay = split(&#8220;/&#8221;, $data[$x][1]);<br />
$endDay = $endDay[1];<br />
$endYear = split(&#8220;/&#8221;, $data[$x][1]);<br />
$endYear = $endYear[2];</p>
<p>if($data[$x][5] == &#8220;False&#8221;)<br />
{<br />
$startTime = split(&#8220;:&#8221;, $data[$x][2]);<br />
$startHour = &#8220;&#8221;;<br />
$startMin = &#8220;&#8221;;<br />
$endHour = &#8220;&#8221;;<br />
$endMin = &#8220;&#8221;;<br />
$endTime = split(&#8220;:&#8221;,$data[$x][4]);<br />
if(stristr($startTime[2], &#8220;PM&#8221;))<br />
{<br />
if($startTime[0] != 12)<br />
{<br />
$startHour = $startTime[0] + 12;<br />
}<br />
else<br />
{<br />
$startHour = 12;<br />
}<br />
}<br />
else<br />
{<br />
$startHour = $startTime[0];<br />
}<br />
if(stristr($endTime[2], &#8220;PM&#8221;))<br />
{<br />
if($endTime[0] != 12)<br />
{<br />
$endHour = $endTime[0] + 12;<br />
}<br />
else<br />
{<br />
$endHour = 12;<br />
}<br />
}<br />
else<br />
{<br />
$endHour = $endTime[0];<br />
}<br />
$startMin = split(&#8221; &#8220;,$startTime[2]);<br />
$startMin = $startMin[0];<br />
$endMin = split(&#8221; &#8220;,$endTime[2]);<br />
$endMin = $endMin[0];<br />
$vevent-&#62;setProperty( &#8216;dtstart&#8217;, array( &#8216;year&#8217;=&#62;$startYear, &#8216;month&#8217;=&#62;$startMonth, &#8216;day&#8217;=&#62;$startDay, &#8216;hour&#8217;=&#62;$startHour, &#8216;min&#8217;=&#62;$startMin,  &#8217;sec&#8217;=&#62;0 ));<br />
$vevent-&#62;setProperty( &#8216;dtend&#8217;,  array( &#8216;year&#8217;=&#62;$endYear, &#8216;month&#8217;=&#62;$endMonth, &#8216;day&#8217;=&#62;$endDay, &#8216;hour&#8217;=&#62;$endHour, &#8216;min&#8217;=&#62;$endMin, &#8217;sec&#8217;=&#62;0 ));<br />
}<br />
else<br />
{<br />
$vevent-&#62;setProperty( &#8216;dtstart&#8217;, $startYear . $startMonth . $startDay, array(&#8216;VALUE&#8217; =&#62; &#8216;DATE&#8217;));// alt. date format, now for an all-day event<br />
}</p>
<p>$vevent-&#62;setProperty( &#8217;summary&#8217;, $data[$x][0] );<br />
$vevent-&#62;setProperty( &#8216;description&#8217;, $data[$x][7] );<br />
$vevent-&#62;setProperty( &#8216;comment&#8217;, &#8221; );<br />
$vevent-&#62;setProperty( &#8216;attendee&#8217;, &#8221; );<br />
$v-&#62;setComponent ( $vevent ); // add event to calendar<br />
}<br />
}<br />
//echo $file_contents;<br />
$v-&#62;returnCalendar(); // redirect calendar file to browser*/<br />
function parse($data, $delimiter = &#8216;,&#8217;, $enclosure = &#8216;&#8221;&#8216;, $newline = &#8220;\n&#8221;){<br />
$pos = $last_pos = -1;<br />
$end = strlen($data);<br />
$row = 0;<br />
$quote_open = false;<br />
$trim_quote = false;</p>
<p>$return = array();</p>
<p>// Create a continuous loop<br />
for ($i = -1;; ++$i){<br />
++$pos;<br />
// Get the positions<br />
$comma_pos = strpos($data, $delimiter, $pos);<br />
$quote_pos = strpos($data, $enclosure, $pos);<br />
$newline_pos = strpos($data, $newline, $pos);</p>
<p>// Which one comes first?<br />
$pos = min(($comma_pos === false) ? $end : $comma_pos, ($quote_pos === false) ? $end : $quote_pos, ($newline_pos === false) ? $end : $newline_pos);</p>
<p>// Cache it<br />
$char = (isset($data[$pos])) ? $data[$pos] : null;<br />
$done = ($pos == $end);</p>
<p>// It it a special character?<br />
if ($done &#124;&#124; $char == $delimiter &#124;&#124; $char == $newline){</p>
<p>// Ignore it as we&#8217;re still in a quote<br />
if ($quote_open &#38;&#38; !$done){<br />
continue;<br />
}</p>
<p>$length = $pos &#8211; ++$last_pos;</p>
<p>// Is the last thing a quote?<br />
if ($trim_quote){<br />
// Well then get rid of it<br />
&#8211;$length;<br />
}</p>
<p>// Get all the contents of this column<br />
$return[$row][] = ($length &#62; 0) ? str_replace($enclosure . $enclosure, $enclosure, substr($data, $last_pos, $length)) : &#8221;;</p>
<p>// And we&#8217;re done<br />
if ($done){<br />
break;<br />
}</p>
<p>// Save the last position<br />
$last_pos = $pos;</p>
<p>// Next row?<br />
if ($char == $newline){<br />
++$row;<br />
}</p>
<p>$trim_quote = false;<br />
}<br />
// Our quote?<br />
else if ($char == $enclosure){</p>
<p>// Toggle it<br />
if ($quote_open == false){<br />
// It&#8217;s an opening quote<br />
$quote_open = true;<br />
$trim_quote = false;</p>
<p>// Trim this opening quote?<br />
if ($last_pos + 1 == $pos){<br />
++$last_pos;<br />
}</p>
<p>}<br />
else {<br />
// It&#8217;s a closing quote<br />
$quote_open = false;</p>
<p>// Trim the last quote?<br />
$trim_quote = true;<br />
}</p>
<p>}</p>
<p>}</p>
<p>return $return;<br />
}</p>
<p>?&#62;</p></blockquote>
<p>Modify the three variables at the top for your server information.</p>
<h2>This is where you have options</h2>
<p>At this point, your data is still securely nestled on whichever servers you have placed it. From this point on, you&#8217;ll be farming our your personal calendar data (albeit, in a read-only fashion) to Google and another 3rd party. If you don&#8217;t want to do this, I&#8217;ve presented a couple options way at the top on how to go through iCal (and eventually I hope, MobileMe) to sync this data with your iPhone. It&#8217;s not quite as glamorous, but it&#8217;s an option.</p>
<p>Proceed if you dare!</p>
<h2>Setup your Google Calendar</h2>
<p>Once you have created yourself a GMail account, fire up <a href="http://www.google.com/calendar">Google Calendar</a>.</p>
<p>On the left, under your calendar is your list of calendars. At the top of that box is a button that says &#8216;Add&#8217; with an arrow next to it. Click that arrow and click &#8216;Add by URL&#8217;.</p>
<p>Use the following URL format for your new calendar:</p>
<p>http://servername.domainname.com/ical.php?username=NOTESUSERNAME&#38;password=NOTESPASSWORD</p>
<p>Make sure to point this to the proper server where you placed the iCalCreator class and ical.php from above and also supply your Lotus Notes username and password.</p>
<p>Once you add this calendar, it will show up on your Google Calendar in a few minutes, but while you&#8217;re waiting&#8230;.</p>
<h2>Setup NuevaSync</h2>
<p>Visit <a href="http://www.nuevasync.com">http://www.nuevasync.com</a> and setup a new NuevaSync account. Follow the instructions there for linking your NuevaSync account with your Google Calendar, and also for setting up your iPhone to receive push notifications from NuevaSync.</p>
<h2>That&#8217;s it</h2>
<p>You&#8217;ve not sufficiently jumped through all the necessary hoops to sync your Lotus Notes with your iPhone, for free, over the air. Pat yourself on the back, you deserve it.</p>
<h2>Thanks</h2>
<p>Thanks to Lifehacker blog for their article on NuevaSync Push with iPhone and also to the creator of the Cal2CSV script for Notes I modified (and now can&#8217;t find the link to the original).</p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
