PHP 5 and lotus

Hello to everyone,

I am trying to get information from the domino server using a PHP script, to learn how to do so, i have tried this example : IBM - United States

but i have problem using it, i get a 404 error when executing the action of OpenAgent

Note that the agent’s lotusscript tell me it has some errors (in designer) And also, i cannot find the option to run as a web user (designer 7).

the php and domino server are on two separate computers, and both in the intranet

The iNotes is activated since i can check my inbox online using the lotus web access

My main objective is to get the data about a ‘Group calendar’

Did anyone be able to use PHP with lotus domino ?

Thanks in advance for any help

jerome

Subject: PHP 5 and lotus

I almost forgot about that article.The live demo link does not work because the Domino server is down. Use downloaded files to setup it on your own server.

Here are latest changes which can help you to solve the problem: Using this application

You should be able to get documents from calendar views without using agents, but using XML commands, like:

http://www-10.lotus.com/ldd/nd6forum.nsf/Dateallflatweb?ReadViewEntries&StartKey=20070115&KeyType=time&Count=300

/Andrei

http://dominounlimited.blogspot.com

Subject: RE: PHP 5 and lotus

hello andrei,

thanks for your reply,

i actually tried the files to my own domino server, the login works but can’t access my agent,

Do you know a way to find out what ‘design notes’ are present on the domino ? Because the http server can’t find the ‘Dateallflatweb’ note on my own mail database (calendar is part of mail database, right ?)

Subject: RE: PHP 5 and lotus

The easiest way to find design elements of the database is to open it in the Domino Designer client.There is no “Dateallflatweb” view in the mail database. You can try with “($Inbox)” or “($Calendar)”

Here is a list of all views and folders in a standard mail database, iNotes template should have same views:

Name: (CalSummary)

Alias: CalSummary

Name: (Custom Expiration\By Date)

Alias: ($CustomExpirationDate)

Name: (Custom Expiration\Expired Documents)

Alias: ($CustomExpirationExpired)

Name: (Mail Threads)

Alias: Threads

Name: (MiniView - Followup2)

Alias: MiniView - Followup2

Name: (MiniView - Group Calendars)

Alias: MiniView - Group Calendars

Name: (MiniView - Notices2)

Alias: MiniView - Notices2

Name: (MiniView - Tasks2)

Alias: MiniView - Tasks2

Name: (MiniView - Trash2)

Alias: MiniView - Trash2

Name: (Stationery)

Alias: Stationery

Name: (To do’s\By Category)

Alias: TodoByCategory

Name: (To do’s\Completed)

Alias: TodoCompleted

Name: (To Do’s\Group)

Alias: ToDoGroup

Name: (To do’s\Incomplete)

Alias: TodoByStatus

Name: (To do’s\Personal)

Alias: TodoPersonal

Name: ($All)

Name: ($ApptUNID)

Name: ($Calendar)

Alias: Calendar

Name: ($Contacts)

Alias: People

Name: ($Drafts)

Name: ($FolderAllInfo)

Name: ($FolderInfo)

Name: ($FolderRefInfo)

Name: ($Follow-Up)

Alias: ($Follow-Up)

Name: ($HeadlinesView)

Name: ($IMTranscripts)

Alias: IM Transcripts

Name: ($MeetingsAllByDate2)

Alias: MeetingsAllByDate2

Name: ($MeetingsOnMyCalendar)

Alias: MeetingsOnMyCalendar

Name: ($Meetings)

Alias: Meetings

Name: ($PeopleGroupsFlat)

Name: ($POP3UIDL)

Alias: ($POP3UIDL)

Name: ($POP3)

Name: ($Profiles)

Name: ($RepeatLookup)

Alias: ($RepeatLookup)

Name: ($Sent)

Name: ($SoftDeletions)

Alias: ($SoftDeletions)

Name: ($ToDo)

Alias: Tasks

Name: ($VIM100)

Name: ($VIM23)

Name: ($VIM256)

Name: ($VIM42)

Name: ($VIM98)

Folder Information

Name: (Group Calendars)

Alias: Group Calendars

Alias: (GroupCalendarFolder)

Name: (Rules)

Alias: (Rules)

Alias: Rules

Name: ($Alarms)

Alias: $Alarms

Name: ($Inbox-Categorized1)

Name: ($Inbox)

Name: ($JunkMail)

Alias: JunkMail

Name: ($Trash)

Subject: RE: PHP 5 and lotus

when i query for the group calendar’s xml,this all i get :

−

<viewentry position="1" unid="2A2094BAF9AA5E9EC12571DC002B1E14" noteid="8C5A" siblings="1">

−

<entrydata columnnumber="0" name="Subject">

service desk SFS

−

<entrydata columnnumber="1" name="$106">

M_INFORMATIQUE_ALL

do you know if there is a way to get more information than just the title ??? (i mean some info to see if something is already planified for someone)

thanks for your help :slight_smile:

Subject: RE: PHP 5 and lotus

You can not get available/unavailable time using XML command to group calendar view. That information is not stored in a document, it’s looked up dynamically when you open the group calendar document.I think the only solution is to create your own agent or web service which gets the required data using either direct lookups to calendars or using notessession.FreeTimeSearch function. FreeTimeSearch returns available times for provided list of people.

Example:

Dim session As New NotesSession

Dim window As NotesDateRange

Dim startDateTime As New NotesDateTime("Today")

Dim endDateTime As New NotesDateTime("Tomorrow")

Dim names(1 To 2) As String

Dim freeTime As Variant

Call  endDateTime.AdjustDay(8)

Set window = session.CreateDateRange()

Set window.StartDateTime = startDateTime

Set window.EndDateTime = endDateTime

names(1) = "Dude 1"

names(2) = "Dude 2"

freeTime = session.FreeTimeSearch _

(window, 60, names, False)

'Messagebox Error$

If (freeTime(0) Is Nothing) Then

	Messagebox "No Match Found"

Else

	Forall x In freeTime

		Messagebox x.Text  ' show free time slot

	End Forall

End If

/Andrei

http://dominounlimited.blogspot.com