Windows interface to a web application - php

I have a simple web application written in PHP. You can log in and upload/download some files. Now I want to integrate those functions into windows. Imagine a user right clicks a file and can click to Upload to my application. The system automatically sends those file to the webserver via POST and maybe get even a reply back from the webserver. Is there a good solution for something like that?

Related

How to use Node.js, Express, and Socket.io in a PHP file being served by Apache?

I am working on a project that was written in PHP and being served on an Apache server. I have been asked to integrate Socket.io live chat functionality into a page that was written in PHP and served by Apache. To do this, I've been writing a Node.js application with Express. But I can't figure out a way to integrate my Express app into the PHP page.
I have googled this for several hours and found many tutorials about running Node.js and Apache on the same server but different ports, but as I understand it, that strategy would limit me to serving different pages or different files. What I need is to be able to use the Socket.io livechat function on the PHP page.
I thought maybe I could use an iframe integrated into the PHP page to display the livechat window itself, but I also need to display new chat request notifications on the PHP page and give the user the ability to click different tabs to switch between chat windows. I thought I could probably have the tab clicks handled by writing a REST API on the Node.js end and letting the PHP page make calls to that. But I'm not sure how I would have the PHP page display new chat request notifications if I can't have Express and Apache handling the same page.
So my question is basically how to:
1) Configure things so one PHP page can be accessed and manipulated by both the PHP side and the Node.js/Express side of things, or
2) Route Socket.io events from the Node.js/Express side into the PHP side so that they can be handled on that end.
Context: I know minimal, minimal PHP--that's being handled by my colleagues, and my role is the JavaScript and Node.js stuff--so please keep that in mind.

how to automatically upload a file in another website from my own website such as uploading and sending file gmail from another web app automatically?

Hi can someone tell me how to upload a file in this website http://hexserver.loria.fr from my web app ?
The thing is that you can see in the front page of the website there are two options for submitting molecules from my computer and then do docking...
So if I want to write such a script that will automatically upload the files in this website and then docking. the files will be in my mysql database.on submitting the files will be uploaded in this website.how to do it?
Any pointer towards solving this problem will be really helpful.
It's just a simple form you may use php or .net
Like;
http://wezfurlong.org/blog/2006/nov/http-post-from-php-without-curl/
and if you'are linux user you may add this to cron. Just learn form names.

Pass data between webpage and VB application

I am developing an application for internal use in our company. The purpose of this application is for document imaging. What we are wanting to do is print a barcode label to attach to documents so that when they are scanned in a piece of software such as vfiler will be able to read the barcodes and know how to file them.
The main focus is our ERP system which is web based (PHP). We are wanting to modify the code to allow the user to print the barcode label immediately once they enter an order or PO. I have access to the source code for the ERP web pages. I don't know of any way to make a web page print to a printer without displaying the printer select dialog. So, I decided that I wanted to try and create a VB application that would do the printing of the barcodes. This would allow me to bypass the the printer select dialog.
Now for the question. Is there any way to have a web page (PHP) running on the server call a VB app to perform a task? So, if I had a button on the webpage and the user clicked it, that button would somehow send the pertinent information (Order number) to the VB app and the VB app would print the barcode. The VB app will always be running on the machine. The label printers will be Zebra USB label printers on each person's machine.
Any thoughts appreciated.
Thanks,
Keith
The way I implemented something like this was to have an Windows service, running on a different system from the webserver, watching the upload folders on the web server, then moving the files to the appropriate location for further processing. I tracked the movement of files through the system by creating an initial record upon a success upload, then creating a transaction record for each activity afterward (printed, faxed, emailed, sent for manual review, etc). This insured a reportaable audit trail for each document and helped identify 'orphan' files that would happen sometimes.
The important thing with a service like this is making sure that you've configured security properly so that the service has access to resources like printers and network drives.
You could make the VB app a service, then implement a FileSystemWatcher on a specific folder. When the user clicks the Print button, all the webpage does is save a file with the necessary info to the folder that is being watched.
It seems an old question but maybe this answer would help someone else. It would be much easier to implement this with a command line app. Just pass the necessary parameters into the exe file with PHP exec().
exec("barcodePrint.exe -barcodeValue");

USING EFS with IIS and PHP encrypt uploaded documents

My php website allows authorised users share documents by uploading and downloading documents to a document library.
I want to store the files encrypted on the server, and I am trying to use EFS, instead of explicitly encrypting/decrypting in php code on upload/download.
Server is windows server 2003/IIS
I have created a new user on my server, logged on as this user, then encrypted the folder containing the documents using EFS.
I now want to IIS to run my web application as so it can view the encrypted documents. However I am having trouble with this, as doesn't have all the permissions it needs, for example to write session files.
The other approac I have tried is to keep my website running under IUSR_Machine_Name built in user, and getting php to present user credentials when it wants to open a file for streaming, however, I'm stuck with this too.
Looking for advice on:
Is EFS the right approach?
What permissions would
need for IIS to use it to run my web
application?
Is there any way in php to expicitly
present user credentials at the
point where php function fopen accesses my EFS
encrypted files?

Update a gallery webpage via Dropbox?

I'd like to know if the following situation and scripts are at all possible:
I'm looking to have a photo-gallery (Javascript) webpage that will display in order of the latest added to the Dropbox folder (PHP or Python?).
That is, when someone adds a picture to the Dropbox folder, there is a script on the webpage that will check the Dropbox folder and then embed those images onto the webpage via the newest added and the webpage will automatically be updated.
Is it at all possible to link to a Dropbox folder via a webpage? If so, how would I best go about using scripts to automate the process of updating the webpage with new content?
Any and all help is very appreciated, thanks!
If you can install the DropBox client on the webserver then it would be simple to let it sync your folder and then iterate over the contents of the folder with a programming language (PHP, Python, .NET etc) and produce the gallery page. This could be done every time the page is requested or as a scheduled job which recreayes a static page. This is all dependent on you having access to install the client on your server.
You can try this : http://forums.dropbox.com/topic.php?id=15885
You can use the (alpha) tool autodrop, wich is just that: a simple gallery frontend that uses images in Dropbox.
As said: alpha. I am still developing it, rewriting it and making it a little prettier and nicer.
Written in Ruby, using dropbox, sinatra and HAML gems. So you will need a host that supports Ruby apps.

Categories