alice252293
Elite Member
- Nov 21, 2017
- 1,536
- 700
Question in the title. thanks.
If it's embedded in your site, you can use PHP to block the ads.Question in the title. thanks.
Could you show me how?If it's embedded in your site, you can use PHP to block the ads.
The basic idea is to write PHP code that blocks ads.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).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).
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.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>
That should be the easiest (and cheapest) way to do this actually. Good suggestion but OP needs to have WP for this.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/
This is what I'm looking for. Have you used it before? Is it worth the money?.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/
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..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..
Exactly! That's what I suggested too.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).