How to block website traffic from a particular country

This little gem of a website will get you started:

http://www.countryipblocks.net/country-blocks/

In a nutshell, all you need to do is create (or add to) an .htaccess file located in your websites root directory, or public_html directory using a simple text editor program. Notepad for PC users or TextEdit for Mac users.

Here’s a sample of the content:

<Limit GET POST>
order allow,deny
# Country: SAUDI ARABIA
# ISO Code: SA
# Total Networks: 251
# Total Subnets:  4,820,736
deny from 2.88.0.0/14
deny from 31.24.224.0/21
deny from 31.166.0.0/15
deny from 217.12.224.0/20
deny from 217.145.240.0/20
deny from 217.173.80.0/20
#
allow from all
</Limit>

Just like hmtl, we have the opening and closing tag “Limit.” The “#” symbol allows for comments only recognized by humans. The “order allow,deny” calls for a list of IP numbers or ranges that must be preceded by “deny” or “allow.” The general “allow from all” will allow any visitors outside the denied IPs. You can of course reverse this to allow only from a range of IPs and “deny all”  (if for instance you have an ecommerse site that solicits exclusively to your own country) however you run the risk of denying traffic from your next door neighbor if you’re IP database isn’t absolutely perfect.

The difficult part obviously is getting the IPs for an entire country. The website mentioned above has a working database of country IPs but isn’t foolproof necessarily. If a neighbor complains they can’t view your website you’ve done something wrong and need to examine your IPs used. It’s also hard to test. You could try using Proxy websites to experiment (another topic) or ask your Facebook friend in Italy to see what they get. Users prohibited from viewing your site will get the “HTTP Error 403 Forbidden” code.

Mac users will have better luck using a PC for this action since placing a period before your filename will render the file invisible in your OS (PC users don’t have that problem). The Unix architecture in the Mac by default renders those filetype invisible to you to avoid users mismanaging them and causing your Mac to go into seizures. Therefore you would actually need to name the file “something.htaccess” in TextEdit upload it, then change the filename back to .htaccess using your FTP program after it’s online. And avoid using Mac OS 10.4 – unfortunately the .htaccess file will get totally screwed up due to the different text encoding algorithms between your computer and the servers.

Finally assign the CHMOD to 644 and test it out! If you make a mistake no permanent harm will come to your website, just delete the .htaccess file (or rename it) and start over.

Have fun!

 

 

Posted in Uncategorized | Leave a comment

How to transfer a domain name

Transferring a domain name from one registrar to another will in effect add a minimum of one year to the life of the domain for the same cost of registering it for an additional year. If your domain name is due to expire in a few days we recommend you renew it at its current registrar, then initiate a transfer to the new registrar, causing it to then be good for 2 years. Why?  Because the transfer process can take a few days, and you don’t want the domain to expire when it’s in limbo between two registrars.

  1. Unlock the domain from the old registrar
  2. Request the EPP code*
  3. Log into your account
  4. Click “Place New Order”
  5. Under “Categories” select “Domain Registration”
  6. Check “I want to transfer my domain to Agape Creative”
  7. Key in the EPP code
  8. Purchase the transfer

The transfer process can take about 1 week.

The last and final step will be to authorize the transfer from your old registrar. Depending on your registrar, this may involve replying to an email they send, or by manually approving the outgoing transfer on your registrars website.

*If your unsure how to do this, your current registrar should provide a way to have your EPP code sent to the email address listed as the technical contact of your domain names WHOIS data. This would likely be the email address you or your webmaster used when initially registering the domain. If the email address is no longer valid, you may change it to a valid one, but this is not ideal because the domain will then be unavailable for transfer for 60 days. Ideally find a way to recreate the email address so you may then receive the EPP code. There may also be other methods the registrar can use to validate you as the owner.

The EPP key (aka Authorization code) is a safeguard against unauthorized transfers of domain name registrations. The EPP key is required when transferring .com, .net, .org, .biz, .info and .us domain names. It is not possible to initiate a domain name transfer for these domains without an EPP code.

Posted in Uncategorized | Leave a comment

Graphic Design: Hiring a professional or doing it yourself?

Doing the graphic design work for your company yourself may be a good way to save money, but if you’re not a professional designer the end result of your hard work could have a negative effect on your company. You could lose business, and people would not think that you were very professional.

Graphic designers are trained to create professional looking work. And they are able to be objective about it, which means that they will design something that you like but their main goal is to design products that will attract customers, to give your company a specific image and brand so that you will stand out amongst competitors.

The time you might be saving by doing the graphic work yourself will ultimately outweigh the effect it will have on your target audience. Not being a professional designer, the work you create will not be up to par with the work that is done by a professional. You are at a great disadvantage when you go up against your competitors, who may have had their logo, website, or business cards made by a professional graphic designer.

It also takes a lot of time to properly learn the necessary programs to make acceptable graphic design work. Anyone is capable of creating something in Word, using clip art and borders to create a quick business card or newsletter. But the work that is created with those programs is subpar, and not at all professional looking. To have exceptional looking work, it would take many hours of learning Photoshop, Illustrator and other graphics programs to produce something that was of professional quality.

With DIY there is no need to try and explain to someone what your idea is, what you want to create. You can just create it yourself; tailor the design to exactly how you want it to look. Or you could explain your vision to a designer, and they will professional create the product you wanted. Explaining to someone what you want done, or can you do it yourself and make it look good.

You have to think of the impact the design will have on the customers, what type of image you are trying to create. A professional graphic designer would be able to give you a professional image, something that would be in competition with other businesses. If the graphic would was done on your own, there would be no professional image portrayed because you probably don’t have the necessary skills to produce graphical work of a high standard.

Although doing the graphic work yourself may seem like the best choice, because it saves you money, and you can design the product exactly how w you want, that’s not always a good thing because you might not have the necessary skills that a professional graphic designer has. It’s best to hire a graphic artist, tell them what you want, and wait for them to deliver a high quality product that will give your business a professional flare.

Posted in Uncategorized | Leave a comment

Photo Slide Shows

Photo gallery’s are a common request here at Agape. There are many ways to implement them, but the ideal is to provide the end user with a set of thumbnails allowing them to navigate themselves through it. Doing so however provides a cumbersome interface that forces them to click, close window, click, close window etc. While it’s a good thing to iframe in the viewing space, a far better solution is using lightbox.

Click here for a quick example.

In this scenario, the web designer simply links to a CSS document, and some javascript to produce a user navigable slide show that dims the page, and opens a window for each image complete with “next” or “previous image” nav buttons. There are no limits to the width and height of each image since the script sizes the pop up window accordingly.

Simply paste this within your head tag:

<script type=”text/javascript” src=”js/prototype.js”></script>
<script type=”text/javascript” src=”js/scriptaculous.js?load=effects,builder”></script>
<script type=”text/javascript” src=”js/lightbox.js”></script>

And in the same head tag point to the css file:
<link rel=”stylesheet” href=”css/lightbox.css” type=”text/css” media=”screen” />

Note, the CSS and nav images are all available as a free download here

Now just add the “rel” attribute to linked images plus the name of the group in brackets [ ]. The brackets title tells the browser the image belongs to a series and therefore will allow the end user to click the “next” or “previous image” nav buttons:

<a href=”gallery/01.jpg” rel=”lightbox[GroupName]” title=”Your Caption Here”>
<img src=”gallery/thumbs/01.jpg” width=”100″ height=”100″ border=”0″ /></a>

I tried to explain this as best as I could, but go tolokeshdhakar.com/projects/lightbox2/ for their full description of this functionality.

Posted in Uncategorized | Leave a comment

Dealing with “non flash” browsers

See the example of this javascript based photo slide show with fade transitions here:

http://www.agapecreative.com

Because some Apple products don’t display Flash content, and since these devises are becoming increasingly popular, it becomes necessary for website designers to create work arounds when creating Flash animations. One simple method is to create 2 pages: one for Flash ready devices, and a second for non-flash browsers. You do this by creating a single page with some javascript – nothing else:


<SCRIPT LANGUAGE=JavaScript1.1>
<!--
var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
var words = navigator.plugins["Shockwave Flash"].description.split(" ");
for (var i = 0; i < words.length; ++i)
{
if (isNaN(parseInt(words[i])))
continue;
var MM_PluginVersion = words[i];
}
var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
&& (navigator.appVersion.indexOf("Win") != -1)) {
document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
document.write('on error resume next \n');
document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
document.write('</SCR' + 'IPT\> \n');
}
if ( MM_FlashCanPlay ) {
window.location.replace("index-flash.html");
} else{
window.location.replace("index-no-flash.html");
}
//-->
</SCRIPT>

You can see the if / else conditions at the bottom where the browser will be directed either to the Flash or Non-Flash pages. Pretty simple, just replace the file names with the ones you use and you’re done. Another method we just made use of is getting rid of the flash content entirely and using javascript to manage the fade transitions in a slide show. It looks like Flash, but are just a few independent png files, managed by javascript, that can be replaced as needed with new pngs without having to go into Flash, and it displays well on iphones and ipads.

The below java script should be placed in the head tag:


<script type="text/javascript">

var gblPhotoShufflerDivId = "photodiv";var gblPhotoShufflerImgId = "photoimg";var gblPhotoShufflerAnchorId = "photoanchor";
var gblImg = new Array("http://agapecreative.com/images/buttons/LargeButton1.png?v=0","http://agapecreative.com/images/buttons/LargeButton2.png?v=0","http://agapecreative.com/images/buttons/LargeButton3.png?v=0");
var gblHref = new Array("http://agapecreative.com/web-hosting.html","http://agapecreative.com/web-design.html","http://agapecreative.com/web-editing.html");
var gblPauseSeconds = 5.25;var gblFadeSeconds = .85;
var gblRotations = 1;
// End Customization section
var gblDeckSize = gblImg.length;var gblOpacity = 100;
var gblOnDeck = 0;var gblStartImg;var gblStartHref;
var gblImageRotations = gblDeckSize * (gblRotations+1);
window.onload = photoShufflerLaunch;
function photoShufflerLaunch(){var theimg = document.getElementById(gblPhotoShufflerImgId);gblStartImg = theimg.src; // save away to show as final imagevar theanchor = document.getElementById(gblPhotoShufflerAnchorId);gblStartHref = theimg.href; // save away to show as final image
document.getElementById(gblPhotoShufflerDivId).style.backgroundImage='url(' + gblImg[gblOnDeck] + ')';setTimeout("photoShufflerFade()",gblPauseSeconds*1000);}
function photoShufflerFade(){var theimg = document.getElementById(gblPhotoShufflerImgId);
// determine delta based on number of fade seconds// the slower the fade the more increments neededvar fadeDelta = 100 / (30 * gblFadeSeconds);
// fade top out to reveal bottom imageif (gblOpacity < 2*fadeDelta ) {gblOpacity = 100;// stop the rotation if we're doneif (gblImageRotations < 1) return;photoShufflerShuffle();// pause before next fadesetTimeout("photoShufflerFade()",gblPauseSeconds*1000);}else{gblOpacity -= fadeDelta;setOpacity(theimg,gblOpacity);setTimeout("photoShufflerFade()",30); // 1/30th of a second}}
function photoShufflerShuffle(){var thediv = document.getElementById(gblPhotoShufflerDivId);var theimg = document.getElementById(gblPhotoShufflerImgId);var theanchor = document.getElementById(gblPhotoShufflerAnchorId);
// copy div background-image to img.srctheimg.src = gblImg[gblOnDeck];theanchor.href = gblHref[gblOnDeck];window.status = gblHref[gblOnDeck]; // updates status bar (optional)// set img opacity to 100setOpacity(theimg,100);
// shuffle the deckgblOnDeck = ++gblOnDeck % gblDeckSize;// decrement rotation counterif (--gblImageRotations < 1){// insert start/final image if we're donegblImg[gblOnDeck] = gblStartImg;gblHref[gblOnDeck] = gblStartHref;}
// slide next image underneaththediv.style.backgroundImage='url(' + gblImg[gblOnDeck] + ')';}
function setOpacity(obj, opacity) {opacity = (opacity == 100)?99.999:opacity;
// IE/Winobj.style.filter = "alpha(opacity:"+opacity+")";
// Safari<1.2, Konquerorobj.style.KHTMLOpacity = opacity/100;
// Older Mozilla and Firefoxobj.style.MozOpacity = opacity/100;
// Safari 1.2, newer Firefox and Mozilla, CSS3obj.style.opacity = opacity/100;}

//–><!]]></script>

For this example I used the full URLs so it works on our blog, but they can be relative.

The last thing is setting the html/css:

<div id="photodiv"><p><a id="photoanchor"
href="http://agapecreative.com/web-editing.html">
<img src="http://www.agapecreative.com/images/buttons/LargeButton3.png?v=0"
alt="Web Editing" border="0" id="photoimg" /></a></p>

The alt text isn’t necissary, but pay attention to the weird ?v=0 at the end of the file names in the html and javascript. If I were smarter I’d explain what that’s for.

Posted in Uncategorized | Leave a comment

At the working man’s house hunger looks in but dares not enter

Benjamin Franklin wrote this proverb under one of his many pen names, and it’s as true today as it was in the 1700′s. We live in a time when technology has created so many conveniences, making life and daily tasks easier, cheaper, and less labor intensive. My wife and I no longer have our traditional weekly “calendar date.” To communicate our obligations we simply let Google sync our iphone calendars. Renting DVD movies at Blockbuster is old school – just stream it from a laptop and hook it up to the home theater. No need for boxy DVD players when listening to music – just ear bud into your phone and use itunes. Just a short list of stuff the iPhone has replaced includes Still / Video Cameras, Phones, Laptops, Newspapers, Magazines, Video Arcades, Books, Maps, Watches, Guitar Tuners, Notepads, Police Scanners, Radios, Stock Brokers, Movie Theaters and TV’s.

A college professor once asked me, are we better today? We live better, but are we better?

All the technology in the world can never replace a strong work ethic. When prospective customers have questions, you can’t refer them to a FAQ page on the internet. You need to have a strong knowledge of your craft to give them an answer, and that knowledge comes from hard work and experience. You don’t get information into your head by attaching a cable to the back of your neck as depicted in The Matrix, you have to actually absorb it through experience. That’s the way God made us. There is no substitution for hard work.

Thanks Benjamin Franklin.

Posted in Uncategorized | Leave a comment

Web Site Hosting for 99 cents

It sounds crazy and most people would, and should, be skeptical. But this is the real thing. For 99 cents per month, anyone can create a hosting account with Agape Creative and have it served just like any other website, 24-7-365. The space allocated is 5 MB, you can’t go beyond that. We may bump it up to 10, but will see how the market reacts. Most of the sites we design are above that, however they don’t have to be if you’re careful.

At this time you can either register a new domain with it or transfer an existing. We’re not allowing people to keep an existing domain registered outside of our system and just point their name servers to us, it doesn’t make sense for us from a business standpoint. It is however a fantastic deal.

It’s important to note up front, there is no support with this package. We can’t help people design the site yourself, offer tech support related to the site content/design, and there is no email associated with it. You create the account, you create your FTP user from the cpanel, you design and upload your own files. We hope to create a video tutorial to assist people with the basic set up (it is pretty simple) and let er rip. In short it’s a self serve drive through hosting hot dog stand. Hope you relish it :)

Posted in Uncategorized | Leave a comment

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

Posted in Uncategorized | Leave a comment