Accessing URLs of iCloud files - php

I'm very confused as to how Apple intends iCloud to work with web apps; they stated that there will be web application support, but there seems to be no API to access iCloud files from anything other than a Mac or iOS application.
What I am trying to do is access a .md iA Writer file from a php based application. I have searched and searched but there seems to be no easy way of accessing the files a given app uploads.
Is there something really obvious that I'm missing?

There is no web API (yet). If your PHP script could access files written by other applications without the developer's file type docs, then you're bound to create incompatible changes. (I understand that Markdown is an open format, but I'm speaking more generically.) Applications being able to view and edit other applications' data could lead to UX issues or possibly security issues.

Related

Uploading PHP script by user in Joomla front-end

Sorry for my English and probably stupid question, but being amateur in web programming I can't find a definite, short answer for the following questions:
what is the danger of allowing Joomla user to upload PHP file from the front-end, and
is there any way to prevent the risks in (1), while allowing user to upload PHP script?
Thanks in advance!
CBroe's answer outlines the risks of letting users upload PHP script files to your web server. There are applications that allow this functionality by using automatic code generators that create the PHP script files server side, providing some kind of UI for users to do so. Some of the Content Construction Kits (CCKs) do this. Others allow authorized users (administrators) to edit PHP files directly, which mitigates the security risks by relying on trusted users to not do harm. A third approach is something like Facebook's, where they require users to host the PHP script files on the user's own server, but provide an API and SDK to integrate those apps into Facebook's system.

Access mysql db and server side scripts from local file

This is more general design kind of question. My major project is to create native app for Firefox OS. Which therefor means JavaScript, jQuery, HTML5 and css. This application should have several functions. But as a general design goes I need local html,css,js application running under firefox OS with ability to access server php scripts and mysql db, but because application is running on client side, I have a major problem with communication between application and server. Which technology, language, API or JS functions could I use for Login check, registration, messaging. How can I access server from local (on PC or Mobile Device) files. There is possibility that I'm missing some point or that my whole understanding of the problem is wrong, but is this possible and how?
Apps are built using standard Web technologies with additional metadata that allows the User Agent to discover, install, launch, and grant them additional privileges.
So says MDN.
The usual way to interact with remote, shared databases is to place a RESTful HTTP front end in front of them and access that with JavaScript/XMLHttpRequest.
XHR, WebSocket or TCPSocket.
FYR:
https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest
https://developer.mozilla.org/en/docs/WebSockets
There is no TCPSocket document on MDN, but you can study gaia email app.
https://raw.github.com/mozilla-b2g/gaia/master/apps/email/js/ext/gaia-email-opt.js

Extraction of connection string from web config using web service

I have this tricky scenario and want so advice to you. My client have a website built in WordPress and a web application that was built in .Net 3.5 now they want me to integrate this too site by querying some information from the database that .Net is using and display the output on the said website.
Communication between the two site is complete and working fine using some DLL for PHP to integrate to MSSQL now the problem arises here, my don't want to expose he connection string on the website built on WordPress for security reason. Without this, I can't connect to the database and made some query so I propose some bright idea, using a web service to extract connection string from the web config of ASP.Net web application. Consuming of web service to PHP is working fine but the last issue is that the web service is expose in public. what I mean once the site launch online, the said web service is open to public and anyone can see thru the web config that my boss want to keep in secret (hehehe).
I'm already confuse on how to make the web service to be more secure. Below are some specification of the two websites.
WordPress Site
PHP based
Mysql
installed with php_pdo_sqlsrv_53_ts_vc9.dll and php_sqlsrv_53_ts_vc9.dll
nusoap (use to consume ASP.Net webservice)
Mysql for database using by WordPress
.Net Site
web service to extract connection string from web config
web reference added
MSSQL for database
Please let me know if you need more information regarding my problem.
TIA
you don't have to setup a web service for this. Just store the connection string in a php file outside of your web servers root directory (probably public_html) and then include that file within you plugin. You should hard-code the path, so that people with access to the setting can't use that functionality to spy on other files. Also make sure the web server service account has read access to that file.
That is a pretty safe setup as the file can't be directly accessed through the web.

Web application to sync data with Android phone application

I already know quite a few tricks with Android java and I have an application that I need to sync with a web application. What it needs to be doing is connect to a server and sync database and download jpg picture uploaded by user. The web application should also be for more users each with his own phone and Android application in it, so it should probably be accesable via login and password.
My problem is that I have zero experience with web applications. All I know is a little HTML. So my question is, how should I start? What language do I use? And what basic structure or principle should my web application have?
Thank you!
I would recommend a PHP - MySQL solution. PHP and MySQL are open source and I know Java can interface with that kind of database. Both languages are well documented and PHP is similar to Java in that it is C-based, so if you know Java fairly well, PHP should be relatively straightforward for you. I would recommend heading over to Lynda.com and searching for PHP Essential Training with Kevin Skoglund. Lynda is a great online video tutorial site and you can access a good amount of the content for free. But if you're serious about developing this web application, I would make the investment (I was, and I did, and I am glad). That's how I learned PHP / MySQL for the most part.
First off, to do any PHP / MySQL development, you'll need to install a server onto your computer, such as WAMP (Windows Apache MySQL PHP - for windows), MAMP (Mac " " - for mac), or LAMP (Linux " " - for Linux), where you will be able to begin developing your application. This is your "test" server, or "development" server. For instance, I use MAMP since I am on a Mac. MAMP is free, as are the other versions, but you can pay for an upgrade. For your purposes, start with the free version. Essentially, *AMP comes with the Apache Server software, MySQL database installation, and PHP installation pre-packaged and ready to go with minimal configuration. From there, you can start writing PHP and MySQL and get your project rolling.
As a matter of fact, that title at Lynda.com, PHP Essential Training, will walk you through ALL of the steps I just stated, AND, uses an exercise project of setting up a basic Content Management System to include password protection, user login and authentication, as well as all of the essential PHP and MySQL that you'll need to go along with it. Seriously, check out Lynda.com.
Good Luck!
This is a very open question and you might get a huge range of different answers, neither of them perfect. However, I will try to put a simple response.
Have a single server and expose from it web services. This web services will handle the CRUD of the data (I will assume you will use a database and that you have experience with databases).
Web services is a big topic. If you want the simplest web services, and you're planning to use PHP, I will suggest using RESTful with JSON, since it will be very simple.
The web application should be within the same domain/server of the web services, at least for the beginning (if it grows, you can change this architecture), since that way you won't require using JSONP and just stick to standard AJAX (I will now assume you don't know what JSONP is, I will suggest reading: http://remysharp.com/2007/10/08/what-is-jsonp/ which is just the first result I got on Google just now ;)) and it will be easier.
You say you have experience with Android. I will assume you know how to consume web services using Java/Android. In case you don't, here's a sample of how to do it: http://www.codeproject.com/Articles/267023/Send-and-receive-json-between-android-and-php
Please note the PHP code there is pretty dirty, but as a "how to", I think it looks great. Only thing to note is: the sample uses HttpClient, while the preferred method is to use HttpURLConnection ( http://android-developers.blogspot.mx/2011/09/androids-http-clients.html)
Having said this, PHP + MySQL is standard. In the web app, you SHOULD USE HTML. Please, don't use Flash or Java Applets (I smiled a bit by even mentioning Java Applets in here). For all the communication purposes between the web service and the HTML client, I recommend using jQuery ( http://jquery.com/ ) with AJAX.
Don't go with a JSONP API unless you want other websites to be able to use your API.
This is only a quick approach created with the little information you have given. The more (and clearer) information you give, a better solution is likely to appear.

web file server framework with permissions?

I work for a company where we do a lot of digital projects and need back and forth uploading/downloading of assets and files between clients and employees.
Ideally I want to put in place a web portal where users can login and access a designated area to upload/download files. Must be isolated from other users/clients and secure so I was thinking of creating an admin panel to set permissions to a user database.
This sounds like a common need to me. Are there any free or open frameworks that do this?
If I end up building this custom, using html, js, mysql, php, what would be the ideal backend setup for storing files? i.e. what type of server configuration would be secure and robust?
Thanks
ResourceSpace—free and open source digital asset management. The documentation's good and covers most situations, including configuring it to separate clients. The permissions configuration is a bit cryptic, but maybe they've improved that since I installed/updated it last (a while back). And it has a "pluggable remote API architecture."
Widen provides digital asset management software in a fully hosted environment. Digital asset management is becoming very popular with every type of business for easy retrieval and safe storage all their media files.

Categories