Stuck in transition between BlueHost and AWS - amazon-web-services

I cant seem to figure out how to query database information from mysql through a php file uploaded to a server back to a xamarin application after something like a http post call.
I am relatively new to database development, however I had used bluehost for php storage and querying of my app information for about a year yet cant seem to do the same with AWS. I have a relatively decent scope of what S3, EC2, and RDS do for you, however none of them seem to do what I want. In essence I want to be able to say have someone click a button on my xamarin app that creates an event for a club. Then after they click said button, it will make an http post request to an aws site that contains a php file. In that php file it will change or grab the contents of a mysql database. The only place that seems to be able to upload files is S3 but you cant seem to directly utilize php files in the JSON format that I want. Am I completely off with why you would use AWS at all, am I close but not using the right tools, or is it something else? Please give a pretty extensive description on all that I would need to do as I have been struggling to find anything at all on this topic surprisingly.

So after some digging this video here walks through it a bit with phpstorm as your way to connect to the database and add webpages or api php files. Its pretty long but very helpful.

Related

Connect AWS database to files in VScode

I have already made front end pages using html css and js and I wanted to use the aws rds mysql database in it. The db is connected to the databse in vs code but how do I access it in the php file?
With your short explanation and screenshot's what I have understood is that you are developing an app with a front end (html, css, js) and you want to connect this app to a database through the php file.
So in order to connect and access your database in the php file you need to download the php client for Mysql, the name is mysqli and you can find many videos in YouTube. The purpose of this library is to talk to your database, is the only reasonable way to do it.
Second you need to get the credentials from the rds service. So far you have expressed that you where able to connect visual studio to the db, so you already have the credentials.
When you start to see the basic tutorials on how to use mysqli everything will come to sense
Good luck!

How to locate the WSDL file in Azure web site?

I've created a web application that runs a web service (WCF). The source code is long gone but I just checked that the app itself is still up and running. Given that I have the address to the service (something.azurewebsites.com) and the name of one of the methods exposed (parameterless Ping), how can I learn the location of the WSDL file?
As far I recall, I've exposed it the most common way, the publish file fetched from the suggestion on Azure portal. I'd like to just call the method Ping to verify something, so rebuilding a whole new service seems a bit overkill.
Suggestions on what the exact URL might be? Alternatively, suggestions on a tool to sniff that up?
Go to the Azure portal and find the FTP address for your "something.azurewebsite.net". Then use an FTP program to connect to the server and browse the files. This way you might be able to find the ".svc" file. For that matter, you might be able to download all of your code and use a tool like Reflector to view the .Net compiled code.

How to use NowJS to provide notifications to user in django framework

I have built a website in django framework. It has a lot of features such as blog, discussion forum, basically there are lots of ways users can interact. I have built a basic notification framework where a user gets notified when somebody comments on their blog, or answers their question in the forum.
Since the notifications are stored in db, new notifications are displayed only when a page refresh is done. I would like to make it real time using some push server using something like long polling technique.
I have come across NowJS which seems to be pretty handy for this, but in all the examples that are given I could not see any example where there was any interaction with the database. In all the cases there was some information sent by one client and it was displayed to one or more clients.
What I actually want to do is to call a function using NowJS, and make it go to sleep until a new notification is added in the database. When a new notifications comes in the server responds back with the notification and a new request is done immediately.
I can figure out all other parts except how to access the database from Node server that is used by NowJS. Any help or guidance is appreciated.
Either:
Have your node.js server make an http call to the Django server via something like a REST api to get info back
Google for a database connector for node.js - I found enough evidence for a MySQL one, and rumours of a PostgreSQL one. Note this won't get you access to the Django DB API, so you'll have to work out all your related queries and craft your SQL by hand (make sure Bobby Tables doesn't bother you: http://www.xkcd.com/327)
Re-implement the NowJS protocol so that you can write a django server for it, keeping the same JS client code on the clients... but then you may as wel.....
...use django-socketio http://blog.jupo.org/2011/08/13/real-time-web-apps-with-django-and-websockets/

programmatically get ics file from icloud?

I've been running a process for a client that involves grabbing their publicly available calendar file from me.com by making an https GET call in a ruby script, and then converting the data in the .ics file to html, then copying it to their website.
They recently upgraded to Lion and iCloud, and it appears that, while the calendar I want is still publicly available, it's only usable by webCal enabled apps--I can no longer get it over https.
I've poked around a bit on google, but haven't see anything that points me in the right direction yet. Does anyone know if there's a way to access public calendars on iCloud via http/https? Or is it strictly via webcCl? The documentation does make it sound like iCloud is designed to only share data among Apple devices. Am I just stuck here?
I'm surprised no one has answered this yet...
If you go to iCloud.com, you should be able to get the URL of the calendar that you have syncing using a public share. It should be a webcal protocol (webcal://). However, if you change that webcal to https, it will download the ics format instead of trying to sync using Macs iCalendar.
I have my website linking to the https ics file, and it appears to be working just fine (for now at least).
icloud is gona supply an API for developers soon at least thats what they sayed in the last keynote

Could I upload a file through a web service?

I want my customers to upload some file to my server. My current design is as below:
I make a folder on my server with R/W permission to Anonymous user like this: http://myserver/uploads
Customer contact my web service to indicate they want to upload something, and the webservice returned a path like this: http://myserver/uploads/xxx-xxx-xxx-xxx, the xxx part is a GUID.
But I don't know what to do next? I believe customer has the permission to write to the virtual path returned by the web service, but how could I write my client-side code so that it can actually copy things to that virtual path? My client-side is a Win32 application, not a web page.
What if I want the customer upload files within a web page, how to do that? I know that there's a "PUT" method in HTTP protocol that could be used to upload things to server, but how to use that?
I am new to this kind of web development. I hope I made myself clear. If there's any better design, please let me know.
Many many thanks.
Update - 1 - 0:59 2010/12/27
A similar question: How to upload a file to a WCF Service?
Some possible solutions:
Image Upload Web Service in C#.NET
Upload any type of File through a C# Web Service
Progress Indication while Uploading/Downloading Files using WCF
I would avoid allowing anyone to write files to a directory. I know you have set up permissions to help guard against anything bad happening, but it is still setup to where anyone can read/write to it, not just to person you've told the URL to. Security through obscurity is not a best practice.
What kind of webservice are you using? WCF, SOAP, something else all together? I would have the file upload still be a service call (not just some PUT command to a directory). That way you can still apply security if needed. When you get right down to it, a file is nothing more than an array of bytes, so you can have your web service accept an array of bytes and write it out to the correct location. If I had a better idea of what technologies you are using (php, asp.net, jsp, etc) Then I might be able to make more precise recommendations.
HTH
You can use SOAP attachments, or if not using SOAP, something similar - specifying filename, content type and binary data, Base64-encoded.