Welcome Guest, Not a member yet? Register   Sign In
does Javascript class still work
#3

(This post was last modified: 12-17-2019, 01:40 AM by richb201.)

(12-17-2019, 01:06 AM)jreklund Wrote: Implement the functionality in PHP, you can't emulate a browser/run javascript with PHP*.

* You can, but why would you?!
https://www.php.net/manual/en/book.v8js.php
Well, I was thinking about this last night. I have instructions to have a chrome extension create a message path to my CI program in the Google docs and send messages back and forth. The current  issue is that i don't know how to create a message pipe from php to the extension.

So now I am thinking I should have a timer in the extension's background task that tries to open a pipe  to the CI app every say 5 seconds. If the pipe is successful, then, I will change the extension's icon to a camera. If it is not successful, then the extension will work as it does now.

I am using the modified extension as a way to screenscrape a browser tab and store the result to a jpg. I will  transfer the jpg up to my server and then to amazon S3, for further processing with a natural language processor, at a later time. What would  be even better is to have the extension transfer the jpg directly up to s3, but I don't want to bite off more than I can chew!

So, if I do it this way, from the extension (in javascript) to the CI app, it might work. At least I have a chance. But I am also having trouble opening the pipe on my linux client. Worked fine under Windows. I currently get an oauthe2 error. Additionally my server is now running in Docker.

Bottom line I am not sure it is possible to create the path in the other direction.
proof that an old dog can learn new tricks
Reply


Messages In This Thread
does Javascript class still work - by richb201 - 12-16-2019, 02:47 PM
RE: does Javascript class still work - by richb201 - 12-17-2019, 01:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB