I am trying to build an e-learning website which helps the users in coding by making them code simple examples. I have integrated an online console from coding guru in an iframe. I wanted to fetch the results from what the user codes and match with the answers in my database to know whether the user has solved the problem correctly or not.
How do I take only the result section from iframe?
Thanks in advance
<html>
<iframe width='100%' height='550'
src='https://www.tutorialspoint.com/execute_python_online.php'
allowfullscreen='allowfullscreen' frameborder='0'></iframe>
</html>
Related
I make a website and I try to share it via Line chat. It seems that Line chat has a feature to display web preview like Facebook does. My question is, how to control which image and description that will be shown in Line chat? I know for Facebook but I never know in Line. I have tried googling around but I don't know the keyword for it. The google result is not what I expected.
Thank you for your help.
I think what you are searching is using HTML Meta Tags on sites. Social Media such as facebook, twitter, etc. usually reads index.html's <meta> tags to provide a preview about the sites. You may learn more about meta tags here.
I want to use google analytics in my website, but I don't understand where I have to put the tracking code. I built my web page using Yii and php, and I am also using templates. I read the google page about the tracking code, and it says:
If your website uses templates to generate pages, enter it just before
the closing tag in the file that contains the the section.
I tried to put the tracking code before </head>, but it didn't work. Please, someone could help me? I don't understand what google means.
Thanks.
You should be placing it within your views, preferably before the </head> tag. When you say it didn't work, what is it doing? Did it throw an error - if so, what?
I just noticed that some of webpages can not be viewable through frames. I have to display this website (https://mebbis.meb.gov.tr/login1.aspx) but I just don't know where to start . In addition to this, I tried couple of more websites like google, facebook, yahoo, etc... But non of them seem to be displayable through iframes either. I am not really interested in google yahoo facebook. However I have to get this website working. Does anyone out there know a workaround to fix this? Thank you
<iframe runat="server" id="mainFrame" name="main" width="100%" src="https://mebbis.meb.gov.tr/login1.aspx" style="height: 600px;">Your browser doesn't support frames.</iframe>
P.s. I am working with asp.net so any suggestion with that will be appreciated.
Why I need this : I designed a website that can take pictures of a frame so that our users can login to mebbis.gov.tr to prove that they are currently students so that they can ride the buses with reduced price. We'v been working this over a month and we are quite stuck at this point.
I have seen this recently myself within e-learning courseware, as courseware is typically loaded within an iframe.
Some websites add a setting so that they cannot be visable within an iframe. The setting is a header called "x-frame-options"
An example of this is facebook, which passes back:
x-frame-options DENY
This can be viewed in firebug under the net panel.
More details about the header are here:
https://developer.mozilla.org/en/The_X-FRAME-OPTIONS_response_header
EDIT
I've noticed that the link you sent doesn't have the header. Because the website is actually returning an error, it looks like it's detecting that you are loading it though an iframe in the onload javascript event and redirecting you to an error page.
if (self != top) self.location='http://mebbis.meb.gov.tr/hatali.jpg'
If a website is specifically trying to stop loading through an iframe, you probably shouldn't do so.
I'm running in to a couple of issues and wondered if anyone had any insight. I'm using the latest php-sdk I'm developing a canvas app that has a number of different steps. These steps are spread across multiple pages. Now when I first enter the app everything seems to work fine. The access token is there and I can call the api functions. On the second page (which is linked to in the same iframe) I get OAuth errors. Now if I use this on the 2nd page:
$me = $facebook->getUser();
var_dump($me);
it returns the correct user id, but I still get errors when trying to use an api query (specifically a FQL one in this instance)
Now, bear in mind these links are within the iframe so I was assuming the signed_request is getting lost somewhere, I know facebook normally issues this via a POST. If I set all my links to target="_parent" with a url such as http://apps.facebook.com/myapp/page2.php then everything works fine. Facebook clearly posts the correct info this time. Subsequently, then when I use links that only redirect the iframe it seems to work fine again (implying a cookie is being set somewhere).
Now I've seen other apps that don't have a target="_parent" that seem to work correctly, only ever loading the iframe on subsequent clicks and not the full facebook site. So I can only assume they are storing this info somewhere. I've tried to inspect these apps using httpfox but I can't see anything obvious. Does anyone have any links for best practice with multiple page apps? I know I can get around this using full urls and target="_blank" but I would like to know what's going on here. I've looked through the developer docs and the canvas page examples, but there's nothing obvious to me.
Any help or info would be appreciated
Many Thanks
There is some ways to achieve this
using Facebook JavaScript SDK (which will set cookie for you, so PHP-SDK can rely on it)
issuing POST request to your pages including signed_request from initial page loaded in canvas
I am working on a Flex AS3 application and wanted to add the Facebook Like button inside the app. I am unable to find any API or anything apart from the http://developers.facebook.com/docs/reference/plugins/like code generator.
Any ideas on how this might be accomplished? I am quite new to the recent changes in the Facebook Platform, so any info would be appreciated.
A direct "like" button should not be possible, since Facebook needs to sandbox the whole thing. Both like button formats (iframe and xfbml) use a sandboxed iframe, so nobody but facebook can set "likes" or know anything about the user.
For that to work with Flash, I think facebook would have to provide the button itself as a SWF file so you can load it in Flash. Then it can create a sandbox within itself and thus load the user information safely. Very much like the Chromeless Youtube Player, where it's almost impossible for Flash to access the actual FLV URL (even through introspection).
But even so, I don't think this would provide enough security... realize that you are dealing with very private user information and credentials here.
The only way I know you can "like" stuff through Flash is first doing the whole Facebook Connect thing (several popup windows asking the user for permissions) and then using the API of your choice to do the actual "liking", for instance, with the Graph API:
http://developers.facebook.com/docs/api#publishing
The closest information I could find are these 2 items so far. Hope it helps you in your journey.
Facebook Developer Site: Source
Facebook like button in flash
I hate answering "no" to a question because what I really mean is "I don't know and I can't find a way". I'm sure your Google-fu is as good as mine. All I can see are Facebook forum posts like this where people are asking the same question and no one is answering.
The examples they give of the like button are either embedded in iFrames or using XFBML <fb:like ../> tag. There are no examples of how to like something using their new graph api or either of their old APIs (FQL and REST API).
I had to get a Facebook like button in a html page (looked like a header on the top) and get the swf embedded below. As its a complete flex app in my case, this work around was possible and plausible