PHP - Help With Blocking Ads Or Muting Ads Through An Iframe...
Im not sure if this is the correct section so sorry for that in advance,
i have this URL on my website inside an iframe: http://gorillavid.com/cna/zwzcpyvcfi7j What im wanting to do is somehow either remove all the ads that are shown, or make sure all of the ads are muted and cant make any noise. is this possible? Seany Similar TutorialsHow can I block a text that contains only spaces? Right now I have done if ($body == "") { die("<font color='red'><font size='15'><strong><center>Your post did not contain any text!"); } But that's extremely insufficient, as any user can easily post " " Any ideas? Code: [Select] i have this to vlock bots out why is the pregmatch part receiving inserts of "http" ???? [cdoe] if (empty($_POST['Main']) && !empty($_POST['CustomerEmail']) && !preg_match("/http/i","$RequestText")) { mail($to, $subject, $message, $headers); $url_success = "confirmation.php"; echo("<meta http-equiv = refresh content=0;url=".$url_success.">"); } elseif (empty($email)) { exit(); } else { exit(); } Well people who hate my site have been coming on and making a site with my site maker . And instead of filling in proper info they put <script> which redirects. And when they finish it saves into mysql and when i view the list of sites it redirects me to another site, Anyone know what can solve this? Could somebody please point me in the right direction.... I want to block the US, AUS, NZ, CAN, IRE from the index.php of my site. But not the rest of the site. The following site (like many others) provides a pretty neat list for the htaccess http://www.ipinfodb.com/ip_country_block.php I did a test. I got the list for blocking the UK. After copying the UK list to my htaccess i couldn't view my site. The thing i don't get is... my ip address was not in the list but i was still blocked, The 1st 2 sets from my ip are '2.100' The only ip's in the list starting with 2 a deny from 2.24.0.0/13 deny from 2.96.0.0/13 deny from 2.120.0.0/12 deny from 2.136.0.0/13 How exactly is this all working? And what's the best way of blocking the above countries from just my index.php? Any links to manuals or anything here would be great... Thank You. John im sure i am missing something simple. but this is killing me. i get this to work: Code: [Select] $url = (isset($_POST['url'])) ? $_POST['url'] : ''; $BlockedNames = array('nepwk', 'teleworm'); $BlockedDomains = array('nepwk.com', 'teleworm.com', 'yopmail.com', 'adf.ly', 'www.nepwk.com'); @list($name, $domain) = explode("http://", $url); else if(in_array($name, $BlockedNames) || in_array($domain, $BlockedDomains)) { $mesaj = "<div class=\"msg\"<div class=\"error\">Your URL has been blocked by our system!</div></div>"; } now the above works if i type the whole domain for every single url i want to block but i want to know is how would i add a catch all of sorts to the domain so say the domain is: http://www.google.com i want to block everything google so all of the following would be blocked as well http://www.google.com/whatever http://www.google.com/anything http://www.google.com/something i want all of those to be blocked automatically without having to add each individual one im trying to block adf.ly links which change for each person and each url they mask and i want to take proactive measure to just block them from being added into my form instead of having them added to my database then having to go and manually delete them. any questions or if this doesn't make sense let me know. thanks in advance (and maybe this is bad code im a noob so go easy ) I have found that when I go to a page on my website, it can cause my IP to get blocked for 1/2 hour by their servers. I have confirmed this by using a proxy to see the site is still up and running. I contacted tech support for the server and after hours and hours of not being able to identify the issue, their tech support accused me of writing bad PHP code. The code has not changed, and this has been a recent issue with the server (last few months). The web page queries a SQL database and displays many small thumbnails. So I took the code from that page, trimmed it down to just get the contents of the image directory and display the thumbnails. Very basic, whereas before it queried the database for specific images, and created thumbnails on the fly. And so the very basic page (link below) without all that extra stuff STILL causes my IP to be blocked from the site when I access the page. http://www.1966-67chargerregistry.com/gallery/indexTest.php Can you guys confirm that it's not a coding issue? Sure I could split up the images onto multiple pages, but there should be nothing here that a decent server can't handle, right? All thumbnails are 2-3 kb and there's typically maybe 1000 of them. Thanks!!! Re-factored PHP code below: <html> <head><title></title></head> <body> <table align="center" width="1000"> <?php //get contents of image directory so we can look for existing images later in loop $filePath = '../66pics/seppics'; $imageFiles = scandir($filePath); $output = ''; $added = 0; //walk through each of the directory image results for($i = 0; $i < count($imageFiles); $i++) { //only display thumbnail images if(substr($imageFiles[$i], 0, 1) == 'T' && strlen($imageFiles[$i]) > 10) { //save each image in a table cell to write out later $output .= chr(13).'<td><center><img src="'.$filePath.'/'.$imageFiles[$i].'"></center></td>'; $added++; //write out 7 pictures on each table row if($added%7 == 0) { echo chr(13).'<tr>'.$output.chr(13).'</tr>'; $output = ''; } } } //end for loop //output final incomplete line if(strlen($output) > 0) { echo chr(13).'<tr>'.$output.chr(13).'</tr>'; } ?> </table></body></html> This topic has been moved to Apache HTTP Server. http://www.phpfreaks.com/forums/index.php?topic=359622.0 has anyone here ever seen these 2 sites?
IP DENY
TOR EXIT NODES with regard to the former, the domain has one page per country I believe. so, you can get listings for like say, China and Russia on these 2 pages: China: https://www.ipdeny.com/ipblocks/data/countries/cn.zone Russia: https://www.ipdeny.com/ipblocks/data/countries/ru.zone my question to folks here is, would this information be useful to me? I am putting together some website content that I do not want everyone in the world to see. And, it is possible that by some miracle, the sophisticated hacker world outside the USA will want to take it down and/or disrupt the service offerings of it if they find out that it exists. Anyone got any advice on whether these resources are even worth the effort to use? and if they are, what is the best way to leverage them? e.g. - when pulling info from the server DB to display content on the page, check this IP data first to see who they are and whether I will allow them or block them? thanks. Adam @requinix, I know we've talked about blocking illegitimate traffic before. and I know you said I can't ever get rid of all of it. but this is new info that I've run across. Just wondering what you guys think of this. =) I have around 14 script files for an admin page.
I am looking to block the access to 10 of them with .htaccess, so they can not get called up through the URL with the web browser, by for example guessing the name.
<Files index.php> Order Allow,Deny Allow from all </Files>How to set up, so I can have "those" 10 files in there? Also, when comes to having an admin page and blocking the access to "those" script files is this the proper way to do it? I would appreciate the suggestions a lot! Edited by glassfish, 25 October 2014 - 11:06 AM. I am using the ReactPHP event loop with periodic timer. The code works but the browser always shows that the activity is going on (the circle on the chrome tab is always running, refer the link to image below) and it runs only once. Is it possible to get rid of the running circle and still the periodic loop should run in loop at given intervals to execute the code within the loop. Please advise. Circle on the tab Below is my code, Note: **getAll($temp) is a function with parameter in another .php file. I have got the file as include in my current .php file.
$Loop=React\EventLoop\Factory::create(); $Loop->addPeriodicTimer(5, function(React\EventLoop\TimerInterface $timer) use(&$temp, $Loop, &$Total) { try{ $Total = getAll($temp); echo"<script>document.getElementById('Overall').innerText=".$Total."</script>"; }catch (Exception $e){ echo "Error in Loop"; throw $e; } }); Hi, I upgraded my XAMPP to the version 1.8.3 (win32) recently. Apache failed to start and I got the following error I have an iFrame with a source location of www.google.com. If I browse to another page on Google.com, I can go to it, but cannot obtain the source of the page. Using JavaScript, I can only return the parent location, www.google.com Is there a way to return the current page URL of an iframe? Another idea is, using PHP, when the iframe makes a request to a new page, is there some way to return the request? Ex: if I browse to google.com/images, can PHP return that the server is trying to request that page? Hi on my site, i am using an iframe for google maps. When the map comes up it shows markers with information on - part of which is a "clickable" link. Problem is that the url opens in the iframe and i want it to open in a new window coz it goes to a completely different site. I tried putting the target=_blank in different parts of the code, but it just seems to stop everything from working and my google map vanishes ! HERES THE LINE OF CODE THAT I THINK I NEED TO CHANGE } if(v.website != '') { content_string += "<p class='web'>Website: <a href='"+v.website+"'>"+v.website+"</a></p>"; } Can anyone help? - i just want it to open a new window when people click on the hyperlink in the iframe - any suggestions please Brain Hello. I'm using a PHP/CGI Upload Script -tesUpload. U can see the uploader at http://www.mintload.com/upload/upload-single.php As you can see, the percentage doesnt reload (its an iframe). On Firefox, if u right click on frame (0%) and select "open frame in new tab" or show only frame, u see it movin' and refreshing. Basically the iframe /fileprog.php calculates the percentage uploaded and refreshes itself to get new percentage every second. The code for upload-single.php is : <?php require_once("upload_helper.php"); $sid = md5(uniqid(rand())); ?> <html> <head> <script language="javascript" type="text/javascript" src="upload.js"></script> <link rel="stylesheet" href="upload.css" type="text/css" media="screen" title="Upload" charset="utf-8" /> <script language="javascript"> function beginUpload(sid) { document.postform.submit(); var pb = document.getElementById("progress"); pb.parentNode.parentNode.style.display='block'; new ProgressTracker(sid,{ progressBar: pb, onFailu function(msg) { Element.hide(pb.parentNode); alert(msg); } }); } </script> </head> <body> <form target="_top" enctype="multipart/form-data" name="postform" action="/cgi-bin/upload.cgi?sid=<?php echo $sid; ?>&target=<?php echo normal_target('receive.php') ?>" method="post"> <div class="inputhead">File 1</div> <input type="file" size="50" name="file_1" /><br/> </form> <div id="progressbox" style="display: none;"><img src="http://www.remit2home.com/remittance/images/mmm_loading.gif" alt="uploading..."> Uploading now... <div class="progresscontainer"><div class="progressbar" id="progress"></div></div> </div> <iframe src="http://mintload.com/upload/fileprog.php?sid=<?php echo $sid; ?>" width=50 height=50 frameborder=0 border=0 allowtransparency="true" ></iframe> uploaded <!--img src="http://www.remit2home.com/remittance/images/mmm_loading.gif" alt="uploading..."--> <!--iframe for percentage--> <p align="right"><input type="image" src="http://mintload.com/images/btn_upload.png" onclick="beginUpload('<?php echo $sid ?>');" alt="Upload" ></p> </body> </html> fileprog.php is alright. I need the percentage in iframe to refresh even when embedded onto upload-single.php Please help Thank you. Hello I am curious if it is even possible to get the domain when using iframes/frames? eg. domain2 shows a file from domain1 in an iframe. Can domain1 grab domain name "domian2"? Hi there, i have 3 pages: 1. index.php 2. iframe.php 3. output.php iframe.php is within index.php and in iframe.php there's a form with input fields. Form is including output.php for sending the information. Whenever someone come to index.php, my HTTP_REFERER get's reffer of index.php instead of previously visited page (before my index.php)... how can i fix this? Please help! i am tryin to use google map iframe . the $ts4 and $ts5 from the db. Can i generate multiple markers if not can any1 direct me to a link to do so. <iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.in/maps?f=q&source=s_q&hl=en&geocode=&q=<?php echo "$ts4,+$ts5"; ?>&ie=UTF8&hq=&hnear=<?php echo "$ts4,+$ts5"; ?>&z=14&iwloc=A&output=embed"></iframe> Thanks I'd like to pass a value from a URL to an iframe. This would look as follows: URL: http://www.mysite.com?www.mysite2.com The value (www.mysite2.com) will be an actual web address which should then be inserted into an iframe on www.mysite.com via php. Since I know little to no php, I don't know how the URL has to be structured and what php coding I need to use to include the web address in the iframe. Any suggestions are highly appreciated Is there a way of getting a variable from an iframe to the parent? There are many ways to pass a variable from the parent to the iframe, but I'm not sure if you can pass a variable from the iframe back to the parent. When i refresh/update the iframe, i want the updated/new variable "id_no" to be passed to the parent file (so I can put this value in a form field). I tried the code below, but have been unlucky. Code: [Select] document.getElementById("iframe").this.form.id_no.value; Any ideas? |