Is it possible to block pops up on embeded iframe videos?

Could you show me how?
Instead of rendering the page via iframe, use curl to get the content of the page. Then use regex/domdocument to remove the popup script part from the page. Then, either show the modified page inside an iframe (load iframe source dynamically through JS) or put it in your page itself. It might take a bit of modifications to the urls in that page (like link href, script src.. anchor tags etc) though (relative URL vs absolute URL with domain).
 
Instead of rendering the page via iframe, use curl to get the content of the page. Then use regex/domdocument to remove the popup script part from the page. Then, either show the modified page inside an iframe (load iframe source dynamically through JS) or put it in your page itself. It might take a bit of modifications to the urls in that page (like link href, script src.. anchor tags etc) though (relative URL vs absolute URL with domain).

Lol you're talking to a noob who dont know a line of code. For example, I want to embed this video from xvideo. Could you tell me which code I need to add to block pops up.
<iframe src="https://www.xvideos.com/embedframe/26720221" frameborder=0 width=510 height=400 scrolling=no allowfullscreen=allowfullscreen></iframe>
 
Lol you're talking to a noob who dont know a line of code. For example, I want to embed this video from xvideo. Could you tell me which code I need to add to block pops up.
<iframe src="https://www.xvideos.com/embedframe/26720221" frameborder=0 width=510 height=400 scrolling=no allowfullscreen=allowfullscreen></iframe>
LOL it is not easy for even an experienced programmer to be frank. What I told you in my last post was just a concept. It might actually be nearly impossible to do this for xvideos because they are a big player and they have thought about their stuffs looong time ago.

That being said, try hiring someone who can work on this for you. There's a lot of guys available in the marketplace over here. This can't be done for free, which is for sure :p
 
You can try Clean Tube Player which Removes redirections and ads from Pornhub, Redtube, Xvideos and Youporn embed players.
https://www.wp-script.com/plugins/clean-tube-player/
 
Ok i was stuck into same thing and worked out a solution for this...though that still needs to be tested thoroughly but for my purpose i tested it and i was able to block all redirections from a iframe.
 
An IFrame is technically a new DOM, so maybe you could inject a new javascript (from your page to the Iframe) and modify the function that triggers the popup.
 
if you are talking about a pc-wide solution you can use hosts file to block ads
 
An IFrame is technically a new DOM, so maybe you could inject a new javascript (from your page to the Iframe) and modify the function that triggers the popup.
That will get blocked by cors (not technically 'blocked', but the dom will return null). It is not possible to access the dom inside the iframe, if the iframe is in a different domain (or the iframed site has allowed all origins). It is however possible to get the html via curl and do the same modification and show inside an iframe..
 
That will get blocked by cors (not technically 'blocked', but the dom will return null). It is not possible to access the dom inside the iframe, if the iframe is in a different domain (or the iframed site has allowed all origins). It is however possible to get the html via curl and do the same modification and show inside an iframe..

Good point.

Then how about to load the code ($iframe=fopen("url..."); echo $iframe; ) instead of loading the iframe. So it is even possible to modify the end code, unless the code it's protected by some kind of javascript encryption (but it could be bypassed anyways).
 
Good point.

Then how about to load the code ($iframe=fopen("url..."); echo $iframe; ) instead of loading the iframe. So it is even possible to modify the end code, unless the code it's protected by some kind of javascript encryption (but it could be bypassed anyways).
Exactly! That's what I suggested too.
 
Back
Top