Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum
https://www.tinywebgallery.com/forum/

Pulling only a specific DIV from a page for iframe
https://www.tinywebgallery.com/forum/viewtopic.php?f=21&t=4377
Page 1 of 1

Author:  Stuart0870 [ 10. Jul 2017, 11:48 ]
Post subject:  Pulling only a specific DIV from a page for iframe

Until this last weekend, I was able to pull our cricket scorecard from CricHQ's website (example) but they've locked it behind a forced login page now, which is only an overlay, the actual scorecard is still live in the background, it it possible to generate an iframe from the specific DIV on their page (div class="match-region").

Btw, I'm not sure how I validate this user id as someone who's purchased the Pro version, if it matters.

Thanks.

*edit* Never mind, they've disabled the option to embed in an iframe too, ah well.

Author:  TinyWebGallery [ 10. Jul 2017, 17:17 ]
Post subject:  Re: Pulling only a specific DIV from a page for iframe

Do you use the external workaround?

Best, Michael

Author:  Stuart0870 [ 11. Jul 2017, 09:28 ]
Post subject:  Re: Pulling only a specific DIV from a page for iframe

Yes, I believe so...
Code:
<script>
var iframe_id = "crichqsc";
var updateIframeHeight = "true";
var hide_page_until_loaded_external = "true";
var iframe_content_id = "#main-region";
var enable_responsive_iframe = "true";
var iframe_hide_elements = "#header,.ui-widget-overlay,.ui-dialog,#footer-region,.adunit";
</script>

<script src="https://www.sspcc.co.uk/wp-content/plugins/advanced-iframe/js/ai_external.js"></script>

[advanced_iframe securitykey="529fxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" use_shortcode_attributes_only="true" id="crichqsc" src="https://www.crichq.com/matches/{urlpath-1}/print" width="835" height="1000"]


Then the page link is https://www.sspcc.co.uk/score-card/541194/ to pass the scorecard number to the iframe code.

Author:  TinyWebGallery [ 11. Jul 2017, 17:42 ]
Post subject:  Re: Pulling only a specific DIV from a page for iframe

You can remove the overlay

try:
var iframe_hide_elements = "#header,.ui-widget-overlay,.ui-dialog";

Best, Michael

Author:  Stuart0870 [ 12. Jul 2017, 10:50 ]
Post subject:  Re: Pulling only a specific DIV from a page for iframe

Well, no matter what I try it's failing, i was just getting blank space in Chrome, but trying it in IE game me the error:

Quote:
This content cannot be displayed in a frame

To help protect the security of information you enter into this website, the publisher of this content does not allow it to be displayed in a frame


So I'm guessing I'm SoL, thanks for trying. :(

Author:  TinyWebGallery [ 12. Jul 2017, 16:24 ]
Post subject:  Re: Pulling only a specific DIV from a page for iframe

Right:

please see

http://www.tinywebgallery.com/blog/advanced-iframe/free-iframe-checker

https://www.crichq.com/matches/541194/1st_innings

if you check you get
Header X-Frame-Options found.

The header is set to SAMEORIGIN.
This means you can only incude this page on the same domain.

also on
https://www.crichq.com/matches/541194/1st_innings

is no ai_external.js anymore... Have they removed this?

Author:  Stuart0870 [ 16. Jul 2017, 12:38 ]
Post subject:  Re: Pulling only a specific DIV from a page for iframe

Yeah, they've changed their layout, presumably to stop people like me helping my users from avoiding going to their website direct.

Ah well, thanks for your help.

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/