Android: How do I retrieve problematic data from a specific webpage? - html

I have used .NET and ShDocVw for years to grab data off webpages without any issues I couldn't overcome. This website has me beat though. It seems like such as easy task to grab the titles and other information off a library search page, but I can't see the data to be able to grab it. Usually, I just look in the DOM, but the data wasn't there. I did a view source, but the data wasn't there. I am so confused.
I am learning Android right now and that is how I would like to solve my problem, but if .NET would be easier... Right now I will take any help, in any form.
The URL is http://catalog.kcls.org/opac/en-US/skin/kcls/xml/rresult.xml?if=&it=h&bl=&lf=&a=&la=&cl=&d=1&l=1&s=pubdate&sd=desc&adt=ml&tp=&t=bibcn%3ADVD%20FIC%20ON%20ORDER&av=&rt=multi

For this specific website, if you disable javascript in your browser, you will see they give you a link to a plain html search portal
http://catalog.kcls.org/opac/en-US/extras/slimpac/start.html

Related

url link preivew for html textarea

I am currently trying to implement a textarea in html for entering url links. When a user types in a url and press enter, a link preview should come up just like in Facebook. I am quite sure there would be some kind of plugins or pre-built tool that I can use for such functionality, but I am not sure where to look for. Can someone give me an advice on how to make this work? Thank you.
Facebook accomplishes this behaviour by using the Open Graph Protocol. For it to work properly, your target site does need to have the specific Open Graph meta tags like og:title defined (you can find the complete documentation on the page).
If you scroll down to Implementations you will find parsers for those Open Graph meta tags written for different programming languages like PHP or Ruby. However, you will most certainly not be able to parse the needed information with plain html.

Go Dynamically Removing HTML onClick

I'm new to Go. I'm understanding the basics more and more but now I'm trying to learn how to interface the code with HTML.
My simple scenario is that I have a single web page with a list that's created by Go fetching information from a database, then building the html page from a group of templates. All I want is to make a simple list that will allow me to somehow mark it as complete/done when the <div> is clicked or something. Also, to be able to fully delete a "row" in my webpage list, a div basically.
So my list will indicate something is complete (I assume I must use Go to alter the css) and delete an item (completely remove that block of html). And remember, these items are stored in a database, so I must be able to identify the specific item.
Any help, ideas, resources, pseudocode, pointers would be greatly appreciated!
In web development, there are two "ends" where code executes; the browser and the server, aka. the front-end and the back-end.
A "click" happens in the browser and will execute code in the browser. That "browser-code" in turn may or may not contact the server for additional information and then render that information to the browser.
That means; the server has no control over what happens in the browser* and vice versa. That's the basics of web development.
Go is a language good for building servers. Javacript is the language that most browsers understand. What you need is Javascript, not Go.
* this is not entirely true but good enough as a base to start learning.

Finding out how a website is coded

I'm trying to figure out how to program a website that looks very similar to http://www.renthop.com/.
I'm new to web coding, so I'm not really sure where to start. For example, is it Java or HTML? Or both? I really like how its setup, the responsiveness and smoothness of it. I just want to make sure I start off in the right direction in terms of choosing the right language etc.
If anyone has any idea of what this is based on it would be greatly appreciated!
Thanks - KC
The server-side code is PHP, the front-end is built off of the jQuery and jQuery-UI javascript libraries and a series of third-party plugins. The final product is a dynamic HTML application.
Do you want to launch your website? If so, creating a website from HTML would only make a website on your local hard drive, not public. You're going to need a domain name and hosting to make it public.
HTML is a markup language for formatting websites, but you can still create a website out of it. Not public, as I said above.
CSS is rulesets for telling the browser how to display the HTML formatted content. It is also not a programming language in the same way HTML is, although it can be a lot more powerful.
Javascript is a programming language. You use it to make the website interactive. Get Firebug or a similar add-on for Firefox, or just right click and 'Inspect Element' in Chrome to see the javascript for more detail on what javascript does.
AJAX is an extension of javascript to get data from the web server and update the page with it, without having to refresh the page.
PHP is code commonly used server side to interact with the filesystem and databases and output HTML. You can also use python, perl, .NET and a handful of other languages/frameworks to do this.
MySQL is a database.

ExtJs and Sencha Touch Search Engine Optimization

I've started learning ExtJS 4 and Sencha Touch 2, and i really like it.
The main difference between Sencha products and jQuery(& others) is that instead of enhancing preexisting HTML, it generates its own DOM based on objects created in JavaScript.
Apps developed like this are great as intranet apps, but can you create a consumer oriented website using Sencha?(like an online store)
I see that you don't write any HTML code in ExtJS or Sencha Touch so i am wondering how can fully generated Javascript page be indexed by Search Engines like Google. As i know, the Google Bot only sees the plain HTML code.
Is there anyway to SEO a Sencha WebApp?
Kind Regards,
Dan Cearnau
Nothing is impossible. You just need to do some work.
1. Generate standard static page using PHP or smth else. The page should look like the page of your ExtJS app. But all links must have GET params in URL. Also PHP should aggregate input GET params.
2. Add your ExtJS app to the page. In the app you have to take into an account GET params and make proper request.
2a. If a real user opens your page: PHP generates the output, then ExtJS app starts and hides the static page and generates the dynamic output.
2b. If a crawler opens your page so JS is disabled, PHP aggregates the request according to GET params and generates the output.
You can add params to URL like #param1&param2&param3 in ExtJS when clicking on links, so real users will be able to share their links. Just learn the router on PHP-side to understand URLs like this.
There is no way to make SEO-friendly pages using JavaScript only.
Using a full blown app it would be close to impossible to SEO. They are far too dynamic. Search engines work of indexing pages. They can deal with some Ajax stuff by supporting pages with #s but imagine how many pages a fully functional app will have. Every view you have has 100s of options that would constitute a new page, which also has 100s of options. All these virtual pages would most likely be just slight variations from other pages. different sort order, different filter, moved panel, search option.
If you use ExtJs to enhance a website like jQuery is often used, then that's a different story. You will have html for the spiders to read and then you enhance how the content works via javascript (see progressive enhancement).
Actually in Touch 2 you can define paths and use history support. This will treat sections of your app as actual pages in the browser w/ standard functionality like going back in the browser etc... this will be your best bet when working with mobile SEO
Getting any kind of SEO out of a Sencha app is impossible since it builds everything on the fly. Even if you use the history support in Sencha Touch, thats also done on the fly and has no effect on SEO.
For consumer-facing websites, Sencha is not the answer. For back-end (for maybe managing the shopping cart), its a different story.

How to hide precious HTML from user eyes?

I am thinking to create an website that generates HTML through a wizard.Finally, I want to make the users to buy the generated HTML source if they like what they see.
But I don't want to let the users to steal the HTML, CSS and JS that I use to create the effect they want.
I want a technique which is immune to Firebug and Right Click -> View Page Source.
Any thoughts ?
edit: I remember something about iframes or frameset, but I'm not sure how to fool the browser and Firebug to execute the code without updating their capability of showing that source code. A popup is also a possible solution.
edit 2: html hosted in silverlight ? will you use it ?
The best thing you can do is to just obfuscate your code. Trying to hide the source is not going to work (for ex: if you disable right click-> view source that doesn't stop them from using the menu or saving the page or using a shortcut key or writing an app to stream the http request into a file and open that, etc).
Firstly, depending on what you are doing you can have the HTML code loaded through JS after the page load (AJAX).
As far as your JS goes:
Free Obfuscator
Not Free Obfuscator
In the end though, there is no stopping someone who really wants to get that source. Even obfuscated code can be rebuilt (though it's hell on wheels painful depending on how good the obfuscator is).
To really protect the sample HTML from prying eyes, you'd need to render it on the server-side and only pass image data to the client. If you want the user to be able to interact with the sample as if it were a normal Web page, you'll also need to send their pointer and keyboard inputs to the server and update the displayed image when necessary. At that point, though, you're basically making an HTTP-based version of VNC. This is definitely possible, but I don't think it will be easy, and I doubt there are any existing software packages to let you do this. If I were you, I'd rethink my business model a bit.
Sending XSL-templated XML to the browser may be enough fool some, and it will work more or less the same in many modern browsers including IE6 (maybe even 5.5).
But really, trying to hide the HTML code isn't going to work if anyone halfway serious wants to get it.
I am thinking to create an website that generates HTML through a wizard.
Finally, I want to make the users to buy the generated HTML source if they like what they see.
If this is what you need you might consider the possibility of creating a preview of the page as an image, and provide the download of the source only after the user agreed and paid. There is no magic way to let a browser display a code that you can't see.
You can make a video, showing the functionality and upload the same, which may help users to view / feel it.