Jump to content
moose-en-a-gant

Are there any browsers that can be embedded or wikipedia perhaps?

Recommended Posts

I'm creating a learning tool where people can paste in information and learn about random subjects.

 

Ideally for a desktop view eg. widescreen, a browser/search engine is on the left, and the interface is on the right.

 

So I need to embed a browser, I have tried to embed Google but I think, obviously, that they do not permit that.

 

I have seen possible alternatives like Chromium or Mozilla not firefox, something else "Gecko?"

 

Anyway, aside from not knowing what a browser is... for example how else can you access a website without a browser, SSH right? But it's about parsing / interpreting the languages correctly...

 

So what options do I have? Or should I just optimize the website to be used split screen with a browser in a separate tab? (Currently what I'm doing).

Share this post


Link to post
Share on other sites

The usual way would be to use an api if they have one available, otherwise connect to the website using file_get_contents or curl , parse the data you need, display it or save into your own database for display when needed.

It's not always possible to iframe another site, some won't allow and get a white page or browser redirects, even jumping out of frame and leaving your site.

 

I have another post explaining api's and ways to parse data

http://forums.phpfreaks.com/topic/291985-how-to-make-useful-native-apps/?p=1494550

 

mediawiki is a wikipedia api

There is also sites that have rdf data available, dbpedia would be one of them

Learn about the semantic web

There are a few sites that have complete rdf data sets available to download and can be used as local data.

http://datahub.io/dataset

http://www.w3.org/wiki/DataSetRDFDumps

http://www.w3.org/wiki/TaskForces/CommunityProjects/LinkingOpenData/DataSets

http://www.rdfhdt.org/datasets/

http://www.rdfdata.org/data.html

Edited by QuickOldCar

Share this post


Link to post
Share on other sites

What you have there is something to use in local applications for windows.

You should look into an application server for server side although would have to be done with something like java.

 

You should try to make yourself a REST API in json format.

The advantage is that you can fetch or send information from various sources over the net and locally while being widely supported many coding languages.

 

You can do whatever you want as I just give my opinions.

I've been coding for 35 years and using a web browser allowing people to access it over the net is a very bad idea.

Share this post


Link to post
Share on other sites

 

...using a web browser allowing people to access it over the net is a very bad idea.

 

Why do you say that?

 

Isn't a web browser accessed by the internet?

 

I don't understand what you are saying.

 

It's a learning tool, you are researching something, and you copy random information whether it's a photo, a paragraph, a link, a video, etc... Ideally you see both interfaces if not clone a browser and the learning tool is implemented in that browser.

 

The problem on the phone end is that I have to switch between browser pages, and in the process of doing that, I lose the session value which could be desing/code problems...

 

Mainly I'm after wikipedia but youtube and other web pages / any web site would be nice.

Share this post


Link to post
Share on other sites
Why do you say that?

 

Allowing a person to tunnel through your server to visit other sites could get you into trouble, do malicious acts, visit harmful pages or scripts.

 

 

Isn't a web browser accessed by the internet?

 

A web browser makes it possible to view the internet.

 

A browser is a very complicated software application that does many things most are not aware of.

I'll explain in simpler terms how a browser works because I have some time.

(not including the multitudes of languages,encoding,handling plugins and extensions,networking,storage of cookies,cache,etc)

 

On each persons device or computer they installed a browser.

The browser uses the address bar to connect to a web resource using a URI (Uniform Resource Identifier)

A URL(Uniform Resource Locator) is a type of URI and is the global address of documents and other resources on the World Wide Web, commonly referred to as a link, hyperlink, web address, website, file location and whatnot.

 

The browser's rendering engine will determine what type of content it is and parse it.

Most commonly is rendered html pages along with css style.

Javascript interpreter is used to parse and execute javascript code.

 

The rendering engine will start parsing the HTML document and convert elements to DOM nodes in a tree called the "content tree"

It will parse the style data in external css files and in style elements

The styling information with visual instructions in the HTML is used to create the render tree.

The render tree consists of rectangles with visual attributes like color and dimensions.

The rectangles are in the right order to be displayed on the screen.

Once the render tree is constructed there is a layout process which will give each node the exact coordinates where it should appear on the screen.

It will then begin a painting process of the render tree will be traversing each node using the UI backend layer.

The UI backend draws basic widgets on the browser like combo boxes, windows, etc

 

What you describe seems the opposite, a browser running on a server and people having access to it, that is not the normal way.

Consider the browser as a client side (for you only) tool, it does not go both ways incorporated into websites.

 

The problem on the phone end is that I have to switch between browser pages, and in the process of doing that, I lose the session value which could be desing/code problems

 

Sessions are held each website and only they have control over them.

 

Possibly a browser plugin is more what you are after?

https://developer.chrome.com/extensions/getstarted

https://blog.mozilla.org/addons/2014/06/05/how-to-develop-firefox-extension/

 

There are ways to create your own browser and modify it some, but then everyone would have to download it and you would need to keep it current as other browsers do.

Browsers are way more complex than what I even described or written information about them.

That's the reason why is just a few out there.

  • Like 1

Share this post


Link to post
Share on other sites

Man I must not be good at conveying my thoughts.

 

I am trying to have say "Google" in my website, where the browser operates independently of my website with the exception that it is inside my website.

 

I thought an Iframe would have done that but apparently or if not obvious, this doesn't happen.

 

It's just more convenient than searching the interent in a separate tab eg. split screen.

 

Do you see the current design, a browser is supposed to be on the left. 

 

post-174107-0-63221700-1421012153_thumb.png

 

Yes the ad is controversial eg. if I am using Google or a browser in the website then am I technically stealing... so that ad can go it's not a big deal.

 

Thank you for the detailed explanation of browsers.

Share this post


Link to post
Share on other sites

Man I must not be good at conveying my thoughts.

 

I am trying to have say "Google" in my website, where the browser operates independently of my website with the exception that it is inside my website.

 

I thought an Iframe would have done that but apparently or if not obvious, this doesn't happen.

 

It's just more convenient than searching the interent in a separate tab eg. split screen.

 

Do you see the current design, a browser is supposed to be on the left. 

 

post-174107-0-63221700-1421012153_thumb.png

 

Yes the ad is controversial eg. if I am using Google or a browser in the website then am I technically stealing... so that ad can go it's not a big deal.

 

Thank you for the detailed explanation of browsers.

Share this post


Link to post
Share on other sites

You conveyed the idea well.

Google sets the x-frame-options response header to SAMEORIGIN

So not iframing google as you desire.

This problem and others makes iframing other sites not worth the effort.

If you want the data all sites use their api's or would have to scrape the content.

Share this post


Link to post
Share on other sites

 

Google sets the x-frame-options response header to SAMEORIGIN

 

What does that mean?               

 

Literally what I would like to have is to open "google.com" in a frame and then browse in their and visit any webpage as if it was in a separate tab...

 

It's a research tool. Browsing random places whether it's a wikipedia article or a white paper... you have them side by side and collect random information like writing notes into a notebook.

 

I'm going to start working on this project again so if I figure something out I'll post it. And thoroughly analyze the options you have provided.

Thanks

Share this post


Link to post
Share on other sites
What does this mean?

 

 

Basically what it means is Google are actively attempting to stop you doing what you want to do by using response headers to tell your browser (Internet Explorer, Chrome, Firefox or whatever) not to show external content in iFrames/frames etc. There are many sites that attempt to block their content from being shown on another in the same way. However, they often supply APIs to allow you to still use their services (i.e. Google search, Google maps etc).

 

Here's a link to an explanation of the x-frame response header (on Mozilla Developer Network), worth having a quick look if you want to know why your currently proposed methodology for your project will cause you problems: 

 

https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options?redirectlocale=en-US&redirectslug=The_X-FRAME-OPTIONS_response_header

 

I think I understand what you are trying to do. I must tell you that there are already several 'snippet' plugins/extensions for browsers available that in some sense  already do what you are attempting. I'm not saying don't do it (experimentation is a wonderful thing ... mostly), but you are kind of re-inventing the wheel.

 

Good luck.

Share this post


Link to post
Share on other sites

"re-inventing the wheel" yes that does seem to be a pattern

 

It's all in one, you know, a car that also has a bath tub, a fridge and a built in grocery store? Come on... who wouldn't want that?

 

Thanks I'll have a look and use "my research tool" haha

Share this post


Link to post
Share on other sites

Basically in order to do what you want, you'd have to proxy everything a user visits through your server which isn't really possible/practical. As you've discovered through the example with google, sites will prevent you from framing them either with this header or by using javascript to break your frame. Aside from that the same origin policy would prevent you from interacting with the page which could be a problem depending on what kind of features you want to do.

 

That leaves two basic solutions:

1) Write your own browser. You can find libraries that handle all the rendering and what not, you'd just have to create your shell UI and tie things together. Then you'd have to get users to download, install, and use your custom browser which you're probably not going to be able to do.

2) Write extensions for existing browsers. You'd write extensions for Firefox, Chrome and IE that will modify their UI with your functions. Then users would just need to install your extension on their browser of choice. Much more likely to happen and much less work on your end.

 

There are already extensions for the browsers that let you do things like attach notes to pages. You could find one of those and use it as a base for your own extension. Then you'd create an API on your site that your extension can use to communicate with your server to save/load users details.

  • Like 1

Share this post


Link to post
Share on other sites

Ehh... I don't like either of those options, consumers are lazy man... you don't hand them a soldering gun and some circuit boards and tell them "400 hours later, you will have an iPhone"

 

What is this about proxy?

What could go wrong with a browser embedded in a website? Scuse me for being ignorant / naive but what are the potential damages?

Share this post


Link to post
Share on other sites

Say somebody using your web-page decides to use it to load a webpage that does automated attacks on somebody elses site (i.e. loads the webpage 10000 times a second or something). That means YOU are responsible for allowing that person making the attack to hide behind YOUR website/IP address.... which means the FBI/NSA or whomever are going to coming to YOU first when they track back from the attack.

 

You're also in danger of creating infinite regression... what happens if somebody opens the page they are already using (your page) inside the browser on your page, and then open it again in the browser on that page ad infinitum....? Can you write code to handle that kind of potential issue? No offense, but from what I've read here, I am assuming that you aren't even approaching that kind of coding level.

 

Go ahead and try if you want, but you are basically just willingly walking into a field after having been told it's full of mines and quicksand. Like I say, I'm all for experimentation, just to find out what will happen....but that's up to you now. I think you've had all you need regards our opinions/expertise on the subject.

 

Good luck with whatever you decide to do.

Edited by wezhind

Share this post


Link to post
Share on other sites

I see your point. Okay then for now I will optimize for split screen and a search engine will be in another browser tab.

 

Thanks for the warnings.

 

I was interested in getting their attention to see what would happen but they must know that I have no value so... another time I suppose.

Edited by moose-en-a-gant

Share this post


Link to post
Share on other sites

p.s.  I didn't dislike the idea - and I can see what you were trying to do. Don't stop having ideas mate - no matter how much value you think another places on it. Everything starts from some 'crazy' idea. Good luck with yours :-)

Share this post


Link to post
Share on other sites

Yeah I just, what you said makes sense.

 

I like to think that anything is possible, it's simply a matter of engineering or finding a way to solve the problem.

 

I mean it's just data you know, that's the beauty of all of this, it's not manufacturing, raw resources... it's electricity. A man could make so much money with a cheap computer, a link to the internet and time.

 

Anyway, I'll see what I can come up with. I may look into that browser idea which already may be a useless thought because of that problem of causing problems on my end and me getting blamed.

 

Thanks for your input.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.