The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 21, 2019, 06:06:38 AM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Server based javascript engine or js capable browser  (Read 4023 times)
kurdt
Lifer
*****
Offline Offline

Posts: 1153


paha arkkitehti


View Profile
« on: May 06, 2009, 02:20:48 AM »

Does anybody have ANY solution to server based javascript engine? I think easier solution would be a browser that does all the javascript work and then outputs the generated result source.

I once tried to play with XULRunner but due my linux handicap I didn't get it to work properly. I think the problem was to get the final thing running without creating X window or something like that.

I bet vsloathe has some solution for this Wink

Logged

I met god and he had nothing to say to me.
nop_90
Global Moderator
Lifer
*****
Offline Offline

Posts: 2203


View Profile
« Reply #1 on: May 06, 2009, 05:09:00 AM »

yes
Logged
kurdt
Lifer
*****
Offline Offline

Posts: 1153


paha arkkitehti


View Profile
« Reply #2 on: May 06, 2009, 06:03:25 AM »

yes
Ok, I'm good to go now Wink
Logged

I met god and he had nothing to say to me.
vsloathe
vim ftw!
Global Moderator
Lifer
*****
Offline Offline

Posts: 1669



View Profile
« Reply #3 on: May 06, 2009, 06:03:31 AM »

My browser class in PHP uses SpiderMonkey (custom compiled version of it) in order to evaluate Javascript.

It's not as straightforward as it seems in your head though, trust me.

When I get home tonight, I can figure out what I did and try to write up some instructions. There's an API for Spidermonkey from C but I think I compiled it into a binary and hook it from the CLI. I abstracted myself a while ago so I'll have to check.
Logged

hai
vsloathe
vim ftw!
Global Moderator
Lifer
*****
Offline Offline

Posts: 1669



View Profile
« Reply #4 on: May 06, 2009, 06:04:59 AM »

Also, flattery will get you everywhere.  Smooch Angel
Logged

hai
nop_90
Global Moderator
Lifer
*****
Offline Offline

Posts: 2203


View Profile
« Reply #5 on: May 06, 2009, 06:13:42 AM »

http://pypi.python.org/pypi/python-spidermonkey
Logged
vsloathe
vim ftw!
Global Moderator
Lifer
*****
Offline Offline

Posts: 1669



View Profile
« Reply #6 on: May 06, 2009, 06:17:21 AM »

http://pecl.php.net/package/spidermonkey

 Grin
Logged

hai
kurdt
Lifer
*****
Offline Offline

Posts: 1153


paha arkkitehti


View Profile
« Reply #7 on: May 06, 2009, 07:07:27 AM »

Also, flattery will get you everywhere.  Smooch Angel
Indeed.. shit, people here apparently need a little bit not-so-obvious approach Wink That was kinda flattery too.. I just can't help it.  Jackoff god I feel so dirty now..

And I almost forgot .. thanks Smiley
Logged

I met god and he had nothing to say to me.
kurdt
Lifer
*****
Offline Offline

Posts: 1153


paha arkkitehti


View Profile
« Reply #8 on: May 13, 2009, 06:37:07 AM »

It's not as straightforward as it seems in your head though, trust me.
Yes it sure seems like it.. I have been trying to get my JS php runner to work for few hours now and it sure isn't dancing on the roses (which would probably be actually painful?).
Logged

I met god and he had nothing to say to me.
nop_90
Global Moderator
Lifer
*****
Offline Offline

Posts: 2203


View Profile
« Reply #9 on: May 13, 2009, 02:45:06 PM »

http://htmlunit.sourceforge.net/
sucks basically because it is written in java.
But basically you have to make somethink like that in language of ur choice (option 1)

Option 2 is you get a web-browser and run it on a server.
easy to do with 1 browser, not easy when u run 20-50 Smiley
Logged
kurdt
Lifer
*****
Offline Offline

Posts: 1153


paha arkkitehti


View Profile
« Reply #10 on: May 14, 2009, 12:50:47 AM »

http://htmlunit.sourceforge.net/
sucks basically because it is written in java.
But basically you have to make somethink like that in language of ur choice (option 1)

Option 2 is you get a web-browser and run it on a server.
easy to do with 1 browser, not easy when u run 20-50 Smiley
I tried to play with this http://freshmeat.net/projects/php-js/ but either I'm doing something wrong OR that can't handle anything more complex than print("hello").
Logged

I met god and he had nothing to say to me.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!