HTML - Change Which Webpage Loads Based On Ip Range
I don't know if this belongs here, because I'm not sure what I would do to do this, but here's my question:
Is there any way I can make one webpage load if the IP the user is browsing from is in a certain range, and an alternate page if the user's IP is not part of that range? If so, how do I do this (this method is for a false block page that only appears from certain IPs to discourage folks from further attempting finding what is blocked. Sorta like a puzzleish thing instead of a traditional password - not to be secure, just for the fun of it.) Thank you in advance! Similar TutorialsHello there, I always make webpages using tables. The usual outline for me is a vertical menu bar at the left that is of STATIC width, and a window on the right that displays the conent with a DYNAMIC width. So I pretty much want the left pane to take up i.e. 200px and the right pane to take up the rest of the page. With tables, it's easy b/c you can just set the table width to 100%, define the td width of the left pane, and the right pane will automatically resize itself to fill the page. I'm trying to adapt a div-based layout now and I can't figure out how to do that with divs. I've been playing with it, but keep running into problems. If I set float:left, after a certain point in making the window narrower, the right div jumps below the left div, etc.. Can someone give me some hints or point me in the right direction as to how to achieve the same effect I had using tables? Thanks! Here's the scenario. There's a heading on the page that says "Latest News". This might say something like "Next event is 4 May". Obviously on 5 May, the text becomes out of date. But it would be OK if the heading changed to "Recent News" BTW: I'm not a techie . Below are the two sites I will use to explain my problem. For reference, I used Mozilla Firefox 3.08 and Google Chrome 1.0.154.53 in my tests. Example 1: http://www.irishbyname.com/example1.htm Example 2: http://www.irishbyname.com/example2.htm When browsing the site in a browser other than Internet Explorer, example 1 and example 2 center to different locations on the page. In example 1, I set the height of the content area to be 200 px tall. In example 2, I set the height of the content area to be 500 px tall. When I have example 1 open in one tab and example 2 open in another, I can alternate between the two tabs and see a visual difference in alignment. The HTML code on both pages is exactly identical with the exception of the height of the content area. Can anyone tell me why the horizontal page center changes based on the height of the page? Can anyone tell me how to change my HTML to make certain the page centers correctly no matter how tall the page is? Thanks for your help in advance. Hi Not sure why, but IE hangs when loading my site. Could someone please take a look at the code - I'm using SWFObject to embed Flash, and am trying to build alternate HTML content: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Backlash - Rock n Roll Duo NSW AUSTRALIA</title> <meta name="Description" content="Backlash are the NSW premier Rock n Roll duo, for corporate and private functions"> <meta name="Keywords" content="Backlash, rock n roll, rock n' roll, wedding, dance, band, duo, Tom, Vanessa, CD, live, music, reception, corporate, song, songs, party, rcok, 60's, 70's, entertainment, Australia, backlash.com, backlash.net, www.backlash.com, www.backlash.net, www.backlash.com.au, www.backlash.net.au, singer, sing, vocalist, pop, drums, guitar, keyboards, bass, private functions, show, professional party band, professional party bands, party bands, corporate party bands, corporate party band, cover band, cover bands, Mick Jagger, Ron Woods, Keith Richards, rolling stones mp3, Brookwood Lounge, Pop Beat Blues, Dance, Elvis"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript" src="swfobject.js"></script> <script type="text/javascript" src="swfaddress.js"></script> <script type="text/javascript"> var flashvars = {}; var params = {}; params.quality = "best"; params.scale = "noscale"; params.allowfullscreen = "false"; var attributes = {}; attributes.id = "backlash"; swfobject.embedSWF("backlash.swf", "myAlternativeContent", "989", "590", "10.0.0", "expressInstall.swf", flashvars, params, attributes); </script> <link href="style.css" rel="stylesheet" type="text/css"/> </head> <body> <div id="flashvertical"> <div id="flashhoz"> <div id="myAlternativeContent"> <div id="background"> <div id="menu"> <?php include ("menu.php"); ?></div> <div id="content"> <div id="about"> <?php $content = file_get_contents($_SERVER['DOCUMENT_ROOT']."/about.txt"); echo htmlspecialchars($content); ?> </div> </div> </div> </div> </div> </div> </body> </html> /////////////////////// and here's the CSS: html{height:100%} html,body {margin:0;padding:0;} body{ background:#000000; text-align:center; min-width:650px; } h1 { font: 1px Verdana, Arial, Helvetica, sans-serif; text-align:left; color: #fff; } .maintext { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color:#fff; } #flashvertical{ position:absolute; top:50%; margin-top:-295px;/* half flash height*/ left:0; width:100%; } #flashhoz { width:989px;/* flash width*/ margin-left:auto; margin-right:auto; height:590px;/* flash height*/ background:#000; } h1 {color:#fff;margin:0;padding:0} #FlashDiv { width:989px; height:590px; //position:absolute; //left:50%; //top:50%; //margin-top:-295px; //margin-left:-494px; } #background { position:absolute; width:989px; height:590px; background-image:url(images/background_html.jpg); background-position:center; background-repeat:no-repeat; } #menu { height:375px; width:110px; margin-left:92px; margin-top:289px; float:left; } #content { height:260px; width:690px; margin-right:70px; margin-top:289px; background-color:#00FF00; float:right; } #about { height:100px; width:600px; margin-left: auto; margin-right:auto; margin-top:10px; background-color:#fff; } //////////////////////// Cheers Shaun Sorry if i posted this in the wrong location. So im a real estate agent making a website. Im no pro and most of the stuff ive been using to build has been through layouts/generators/help of others such as yourselves. So ive been stuck on finding/making this code for the past couple of days. So all my listings are on my agencys website, not my personal agent website. Is there a code i could have where in the listings page my my personal agent website, i could have a window maybe 600x900 of the listing page on my agencys website? To kind of clear things up, you know how when you google something you have the magnifying glass, how it gives that preview. How can i have that preview coded onto a webpage, but me say what webpage to preview and how big to make the preview box? Tried to explain it as best i could. If you dont know the code, if you can tell me what its called so i can try to narrow the google searches. So far everything that has been coming up in the search restults has been preview boxes to preview html codes you have already written. Fail Blog Thanks Hello! I hope that someone in this forum can help me solve the mystery that has been giving me a headache for two days now. I have a page that has a couple of iframes in it. when I view the page in firefox they show perfectly fine, however when viewed with IE one loads but the second one only shows a blank white page. They reside in a table, and are in a single row of that table. the code looks like this: <tr><td width="535" height="285" colspan="6" bgcolor="#FFFFFF"> <iframe frameborder="0" scrolling="auto" width="535" height="285" src="/members/updates.html"></iframe></td> <td width="5" height="285" bgcolor="#FFFFFF"> <img src="/members/graphics/spacer.gif" width="5" height="285" border="0"></td> <td colspan="2" background="/members/graphics/newsbg.jpg" width="240" height="285" alt="" border="0"><iframe frameborder="0" scrolling="auto" width="240" height="285" src="/members/news.html"></iframe></td> </tr> Is there some reaso that the second one isn't showing? I have two different pages that are designed like this. They look fine in firefox 1.5. IE gives me nothing. Hi, How in HTML can you force a webpage to scroll down to a certain point of the page when the page loads up. Is this possible in HTML. Once it does scroll down to the certain point, I still want to be able to scroll up and down AFTER it has loaded up...is this possible. Can someone please urgently help. Thanks I've made a site (http://sketch.uk.com) that hides and displays divs according to the browser size. However, ideally I'd like to prevent the hidden divs loading their content until they are visible. A good example is the index page of the above link. There is an iframe for the flash animation that changes to a static picture when you resize to a smaller window. If you were to open the site on the smaller window (such as a tablet or mobile for example) it would be better that the iframe were never loaded at all. Any suggestions? Hi there, my pages are loading wide and then jumpimg down to the size the table is set to be. Does anyone know how i can specify the width of content either through css or the div tag? Thanks in advance! I'm trying to set up an affiliate popup for my buddies and each time someone clicks a certain link, there will be a popup, but each time you click the link the content on the popup is different. I was wondering if this is possible. Need help determining why the below code will load on firefox but not internet explorer. fixed hey guys...i've seen the page of sourceforge where, when the page loads...the download of the file generates automatically.... i want the help related to implement that.... can anyone tell me how to do that.... thanks in advance... Hi I have an html page that contains a .swf (index.html). I'd like to make sure that browsers always load the site, and not get it from their cache. I've heard of a thing called cache busting, but there is little info on it when dealing with anything other than a Wordpress site. Does anyone know about it or have info on any other way to make sure the site automatically loads directly? I don't want to have to rely on users manually clearing their cache. Cheers Shaun I believe in thread titles that get to the point. I have a basic page, when the page loads I want people to see the top of the page for a few seconds while a flash starts to load but then I want the page to scroll down a bit so the visitor can see the flash load progress status. I just want code that I can copy into my page. I don't have access to the flash code. Greg (the page under design) www.mytcanada.com/designer.html I have a programmer in the US who starts pages for me and then I much around with them until it's looks like I want. He helps me when I get stuck but he's on holidays. Any help would be great. Hello Reader, I am very new at html (so please no CSS) and this is what Im trying to do 1) Have my logo on the far right and the page 2) Put the website name in the centre of the page Ive done a wrap (I think and it seems to be working) the problem is: the website name is not going in the centre of the whole page but the centre of the page from where the logo ends (on the right of the page). So if you look at the company name its not in the centre of the page but in the centre of the page from where the logo ends. I have decided to work with that as it will actually look good with what I want to do - My question is this: If I did want to centre the company name to the middle of the page could I use   (loads of them!) to position it exactly where I wanted on the page and is that good practice? And if not what can I use in its stead?? Any advice will be very much appreciated!!!! hi; i want to create something like this http://www.microsoft.com/en/us/default.aspx need to do exactly as in this site how can i do that.... ; any script (when mouse is over needs to change the iframe....) Highlights Latest releases Using your computer how do i make a background image fit to the window. also i have a button on a page. how do i get it to close the window uppon clicking it. any help would be great. I'm a novice compared to the pros here and stuck on a couple issues. My website is uspsrealty.com There is some "empty" space on my home page below the horizontal line. I want to remove the horizontal line and have the ability to use that empty space without throwing my borders/margins off. I would like to add about 3-4 sentences in that blank area. Can this be changed so I can add a few sentences? I know why this is happening, just don't know how to correct it. Also want to change the copyright.jpg to 2010 from 2009. Might as well make up a few more jpgs with the years 2011, 2012, 2013, 2014, and 2015 Willing to paypal you money for your help. Hoping one of you pros can do this in 30 min and willing to pay $25-30. Contact me he galevin@hotmail.com Thanks, Gerald Levin Hi, i have a problem im not sure how to go about it . I have a webpage where the user enters there personal details . As they are fillign in details they click a link and another webpage is opened ( keeping the orginal open ) Where the do some other stuff on this new page and what is created is a javascript array of numbers I then want them to be able close this new window down and the javascript array data will be submitted with the rest of the personal information when the click a submit button on the first page . If this makes sense how do i go about this? Thanks I have always used tables to layout my sites bt now everyone is telling me that I should use css instead. I am not sure how to do this in css so would somebody please explain this to me and an example would be nice too! Thanks so much! |