I need to get live information like news, photos, content, videos link, and etc from the website and display it on my app.
Please let me know how to do it. I saw some samples, they get info using web client. mostly its for string content. for me, i display some photos and some other reference link and etc.,
Anyone help me how to do it.
It depends on the site from which you want to fetch the data. Many popular sites implement their own API's for providing the data. For example, Twitter API and Facebook API.
And the data is provided to us in the form of XML or JSON in general, which you need to parse in your app and show it in your UI.
Note: Whatever may be the data format(images or videos), they are provided as the http links which you need to supply as the source to your UI components.
For example, insert an image tag in UI
<image Name="myImage"/>
and then after parsing your web response, supply its source from your response like this
myImage.Source = response.imageSource;
(This is just for an overview, not a complete solution)
You may want to review the Code Samples here :-
http://msdn.microsoft.com/en-us/library/ff431744(v=vs.92).aspx
Your question is very broad as there are many factors involved in creating a Windows Phone application so you need to look at various samples, take the bits you want from those samples and then create something, it is very difficult to create an app for someone in a forum post, this is why you are not going to get a direct answer to your question.
Related
Hi I am trying to pull this string from courseweb.hopkinsschools.org and display it on my own asp.net application. I have been looking for a long time for a tutorial but nothing works. Any help would be greatly appreciated.
Picture of String needed:
String
When I started doing work with websites and interfacing with other websites, I originally wanted to do what you're talking about, reading the text from pages, because thats how we as people interface with computers and websites.
But that is not how computers should ever interface with other websites unless absolutely necessary.
Moodle has an API for such things like course management. Its kind of difficult to find information on, but its called Moodle Web Services if I remember quickly. I'll add a link back if I can find it.
What these will do is let you access moodle in a computer friendly way, ie. a way your computer can easily understand, instead of trying to read webpages.
Edit
Here are some resources to get you started:
https://docs.moodle.org/dev/Web_services
https://code.google.com/p/mnet-csharp/
https://delog.wordpress.com/2010/08/31/integrating-a-c-app-with-moodle-using-xml-rpc/
https://delog.wordpress.com/2010/09/08/integrating-c-app-with-moodle-2/
I'm trying to create a wpf application such as a movies library because i would like to manage and sort out my movies with a pretty interface.
I'd like to create a library with all my movies getting information from the web, but i don't know how very well.
I thought to get the information from a web site, for example imdb, but i don't know if it's legally to capture html from page to get the nested information.
It's my first desktop application and I would also like to know if it is necessary to create a database within the project and then create a setup project with specified script for deploy it.
Sorry for the confusion but i would like to know too much things :)
Thanks a lot in advance.
The legality of web scraping is a grey area. See my question, "Legality of Web Scraping vs Normal Use" and the corresponding answers for some insight.
Even if the legality is not a problem, web scraping is a flimsy approach because the webpage structure may change without notice, making your application suddenly useless until you update it to the new format. You are much better off using some sort of web API (if the site providing the information offers it).
Whether you need a database or not depends entirely on what your application will be doing and how you design it - it's not something any of us can tell you.
Same goes for the setup project - in fact I wouldn't worry about that until you actually have a working application. Take it step by step and keep the scope within control.
Yes I did not think about api.
It's a great idea, maybe use "themoviedb".
But if i create an application based on it, that has to show all the movies that you have stored on your hdd and get , for example, the posters, the description and the ranking, i have to create a database according to you?
Thanks a lot.
I'm trying to find out what libraries there are out there for streaming live audio to a website.
The current technology stack that I'd like to stay within is...
MVC3/C#
HTML/HTML5
Basically, I'm wanting to build something that will allow the end user to have nothing but their (modern) browser installed and stream the audio. If possible I'd prefer that the same end user interface support previously recorded content as well.
As far as the input side of things I don't care what it uses as long as it's a .net/c# based technology or if not .net/c# I'd need it to be pre-built and capable of sending to a .net endpoint.
I have searched on SO for this topic and have found several posts on the subject, but most were extremely vague and didn't fit within the confines of the tech stack that I have in use (java/flash/etc) so please if you manage to find out be sure that it is actually inline with the question before you link it!
I would suggest you start here at the W3Schools - HTML5 Audio page and implement a C# handler that returns a byte-stream of the audio content for the source tag. Failing that, there are a bunch of JavaScript libraries that should be able to help you implement this properly.
The last one that I linked above ThunderJS, looks promising only because of the introductory line:
Thunder works its magic by creating HTML5 Audio elements with a src value containing a base64 data URI.
You could also check out similar questions here on StackOverflow, because you want to do this client-side so the language of choice isn't as much of an issue...
Maybe start here, or here, or here.
Failing THAT, there's always "the Google" which led me to these, few, lists?
Hope this helps to point you in the right direction. Good luck.
This website that keeps updating some live information about the bus timings in Helsinki.
I want to parse the live information from the website and display it on my WP7 phone. The user needs to enter the bus stop number and the WP7 app should show the buses/trams currently in the bus stop.
Is there any way I could obtain the real time information from the website?
If you look at the source of the website (http://www.omatlahdot.fi/omatlahdot/web?command=fullscreen&stop=1020455) -- in IE right-click on the page and select View Source -- you'll see that there's really very little in the actual source file, in particular none of the data is there. All of the hard work is coming from the referenced javascript file scripts/fullscreen_header.js (full path is http://www.omatlahdot.fi/omatlahdot/scripts/fullscreen_header.js). You want to download that .js file and study how it retrieves data with AJAX calls. Start with the reloadPage function.
You can make these same calls (e.g., using WebClient) to retrieve the data into your application. If you want to extract the data from the returned HTML, I'd consider parsing it simply as a string since I am assuming that it would have a very regular structure and dragging in a general-purpose HTML parser would probably be overkill.
Alternatively, you might find out if the omatlahodot.fi provides the data as JSON or XML feeds, so you don't have to "screen-scrape" the HTML. I don't read Finnish, so I can't help you with that. Look around on their websites (maybe a section called "dev" or "api") or send them an email inquiry.
Please let us know how it works out!
I'm wanting to use google maps and see a million ways to do it on the web. Some are javascript methods and some are asp.net server components with which I have hit and miss luck. What's the easiest and most reliable way using c# and asp.net?
I have my location data including geocodes in a database. I want to provide users a method to do a lookup for certain locations. From there, my code will provide a table of geocodes to google maps with markers on the map corresponding to the found entries. Users can see each entry and need to be able to tell which is which if multiple rows are returned.
Is there a good way to do this?
The Google Maps API is accessed via JavaScript (any server controls are just abstracting this away from you). In the case you described, you would need to dynamically output the required JavaScript to tell the maps API what to display.
See http://dotnet.sys-con.com/node/171162
There are a few server controls to do it, like this, but you have to learn how to do things in one way (server control) or another (Javascript Google API).
I recommend using the Google API, since it has more samples all over the web, and you can use new features implemented by Google right after they release them and don't have to wait for the server control developer to do it.
I would recommend using direct JavaScript to create the Google Maps. It's fairly straight forward and then you will be able to understand what's going on behind the scenes.
Google has some pretty good tutorials and documentation to get you up and running quick. Once you add one to your site, it will become very easy to setup the rest of the customization that you need.
Take a look at this site for examples.
http://code.google.com/apis/maps/documentation/examples/
As usual I point to ComponentOne who has a nice SilverLight control for this that can use google-maps or Microsofts Live Maps, it uses Silverlight Deep Zoom to handle it nicely:
http://www.componentone.com/SuperProducts/MapsSilverlight/
Live example:
http://demo.componentone.com/Silverlight/Factories/
(I'm not from ComponentOne, just a satisfied customer) ;)
I know you can do it yourself with scripts and other ways, but its just so much more fun to use code allreade written. ;)
Best .NET Wrapper for Google Maps or Yahoo Maps?
BTW: I found a great post here that has an example on how to do a store lookup. Works really well. I recommend!!
http://blog.donnfelker.com/post/HOWTO-Build-a-Store-Locator-in-ASPNET.aspx
Check out this example: Data driven Google Maps in ASP.Net
I used ASP.Net Ajax to create a web-service that is callable from JavaScript.
The web-service talks to the database and fills a very basic object. ASP.Net Ajax, then makes the object available to my client javascript. The rest is easy: In the client, you call the webservice from Javascript, read the data returned and populate Google Maps, using simple Google Maps API calls.
Check out the site at link text
Please, try my GoogleMaps control for ASP.NET