You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Saturday, June 6th 2009, 10:53pm

how to use php in onstart event?

Hi !
Do you know how to use some php code in panorama?
I'd like to track the guests actions in panorama. Let's say I have panorama tour with some panoramas inside, and every panorama is opened with loadscene method.
I'd like to write something simply to statistic file, or set cookie value.
Is it possible?
Regards
Greg

Shanti

Intermediate

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

2

Saturday, June 6th 2009, 11:50pm

Well yes, if you use Ajax, you can do anything, not that simple but doable, you will have to call a js function from Krpano to load the scene, and in the same function call the PHP using ajax.

Or you can just use the Google Analytics plugin I posted, and use events to track whatever they do in the panorama. :)

http://www.krpano.com/forum/wbb/index.ph…ad&threadID=692

3

Sunday, June 7th 2009, 9:22am

In fact it must not be the php.
It could be simply read/write to file implementation.
For example, it could be enough:
<scene name="xx" onstart="action(onstart)">
<action name="onstart">
writeToFile("some text",theFilename);
</action>
...
Greg

Shanti

Intermediate

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

4

Sunday, June 7th 2009, 6:58pm

I didn't knew you could use writeToFile is this posible? I thought Flash didn't allow for this...

I can't seem to find ANY information on writeToFile? where did you read it?
are you using it?

nelk

Intermediate

Posts: 358

Location: Paris

  • Send private message

5

Sunday, June 7th 2009, 8:10pm

Shanti, have a look to "SHAREDOBJECT" in Action Script 3. You can write a file like a cookie with this class in flash.
VideoStitch, a video stitching engine / blog sur les visites virtuelles ( french ).

Shanti

Intermediate

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

6

Sunday, June 7th 2009, 10:52pm

but, is it possible to write to a custom file? does krpano allow to write to any file?

7

Monday, June 8th 2009, 2:39pm

Hi,

krpano itself provides no functions for saving data (cookies, shared-objects or so...),
you can only make such with javascript or with own flash plugins,

best regards,
Klaus

Shanti

Intermediate

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

8

Monday, June 8th 2009, 7:46pm

Hi,

krpano itself provides no functions for saving data (cookies, shared-objects or so...),
you can only make such with javascript or with own flash plugins,

best regards,
Klaus



thats what I thought...

Similar threads