<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>arisyi-design.web.id</title>
	<atom:link href="http://www.arisyi-design.web.id/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.arisyi-design.web.id</link>
	<description>WebDeveloper :: Internet business consultation, web design, web &#38; database programming services, Internet marketing and web maintenance</description>
	<lastBuildDate>Fri, 11 Jun 2010 04:02:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Multiple Class / ID and Class Selectors</title>
		<link>http://www.arisyi-design.web.id/css/multiple-class-id-and-class-selectors/</link>
		<comments>http://www.arisyi-design.web.id/css/multiple-class-id-and-class-selectors/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 16:06:27 +0000</pubDate>
		<dc:creator>azimah</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.arisyi-design.web.id/?p=260</guid>
		<description><![CDATA[Can you spot the difference between these two selectors?
#header.callout {  }
#header .callout { }

They look nearly identical, but the top one has no space between “#header” and “.callout” while the bottom one does. This small difference makes a huge difference in what it does. To some of you, that top selector may seem like [...]]]></description>
			<content:encoded><![CDATA[<p>Can you spot the difference between these two selectors?</p>
<pre><code class="css">#header.callout {  }
#header .callout { }</code></pre>
<p><span id="more-260"></span><br />
They look nearly identical, but the top one has no space between “#header” and “.callout” while the bottom one does. This small difference makes a huge difference in what it does. To some of you, that top selector may seem like a mistake, but it’s actually a quite useful selector. Let’s see the difference, what that top selector means, and exploring more of that style selector.</p>
<p><span id="more-5690"> </span></p>
<p>Here is the “plain English” of “#header .callout”:</p>
<blockquote><p>Select all elements with the class name <em>callout</em> that are children of the element with an ID of <em>header</em>.</p></blockquote>
<p>Here is the “plain English” of “#header.callout”:</p>
<blockquote><p>Select the element which has an ID of <em>header</em> and also a class name of <em>callout</em>.</p></blockquote>
<p>Maybe this graphic will make that more clear:</p>
<p><img src="http://css-tricks.com/wp-content/classplusid.png" alt="" width="570" height="190" /></p>
<h3>Combinations of Classes and IDs</h3>
<p>The big point here is that you can target elements that have combinations of classes and IDs by stringing those selectors together without spaces.</p>
<h4>ID and Class Selector</h4>
<p>As we covered above, you can target elements by a combination of ID and class.</p>
<pre><code class="html">&lt;h1 id="one" class="two"&gt;This Should Be Red&lt;/h1&gt;</code></pre>
<pre><code class="css">#one.two { color: red; }</code></pre>
<h4>Double Class Selector</h4>
<p>Target an element that has all of multiple classes. Shown below with two classes, but not limited to two.</p>
<pre><code class="html">&lt;h1 class="three four"&gt;Double Class&lt;/h1&gt;</code></pre>
<pre><code class="css">.three.four { color: red; }</code></pre>
<h4>Multiples</h4>
<p>We aren’t limited to only two here, we can combine as many classes and IDs into a single selector as we want.</p>
<pre><code class="css">.snippet#header.code.red { color: red; }</code></pre>
<p>Although bear in mind that’s getting a little ridiculous =)</p>
<h3>Example</h3>
<p>So how useful is all this really? Especially with ID’s, they are supposed to be unique anyway, so why would you need to combine it with a class? I admit the use cases for the ID versions are slimmer, but there are certainly uses. One of those is overriding styles easily.</p>
<pre><code class="css">#header { color: red; }
#header.override { color: black; } </code></pre>
<p>The second targets the same element, but overrides the color, instead of having to use:</p>
<pre><code class="css">.override { color: black !important }</code></pre>
<p>or perhaps prefacing the selector with something even more specific.</p>
<p>More useful is multiple classes and using them in the “object oriented” css style that is all the rage lately. Let’s say you had a bunch of divs on a page, and you used multiple various descriptive class names on them:</p>
<pre><code class="html">&lt;div class="red border box"&gt;&lt;/div&gt;
&lt;div class="blue border box"&gt;&lt;/div&gt;
&lt;div class="green border box"&gt;&lt;/div&gt;
&lt;div class="red box"&gt;&lt;/div&gt;
&lt;div class="blue box"&gt;&lt;/div&gt;
&lt;div class="green box"&gt;&lt;/div&gt;
&lt;div class="border box"&gt;&lt;/div&gt;</code></pre>
<p>They all share the class “box”, which perhaps sets a width or a background texture, something that all of them have in common. Then some of them have color names as classes, this would be for controlling the colors used inside the box. Perhaps green means the box has a greenish background and light green text. A few of them have a class name of “border”, presumably these would have a border on them while the rest would not.</p>
<p>So let’s set something up:</p>
<pre><code class="css">.box { width: 100px; float: left; margin: 0 10px 10px 0; }
.red { color: red; background: pink; }
.blue { color: blue; background: light-blue; }
.green { color: green; background: light-green; }
.border { border: 5px solid black; }</code></pre>
<p>Cool, we have a good toolbox going here, where we can create new boxes and we have a variety of options, we can pick a color and if it has a border or not just by applying some fairly semantic classes. Having this class name toolbox also allows us to target unique combinations of these classes. For example, maybe that black border isn’t working on the red boxes, let’s fix that:</p>
<pre><code class="css">.red.border { border-color: #900; }</code></pre>
<div class="image-wrap"><img src="http://css-tricks.com/wp-content/csstricks-uploads/boxes.png" alt="" width="450" height="151" /><br />
Border color on red box changed because it had both the red class and border class</div>
<p>Based on <a href="http://css-tricks.com/examples/MultipleClasses/">this demo page</a>.</p>
<h3>Browser Compatibility</h3>
<p>All good current browsers support this as well as IE back to version 7. IE 6 is rather weird. It selects based on the first selector in the list. So “.red.border” will select based on just “.red”, which kinda ruins things. But if you are supporting IE 6, you are used to this kind of tomfoolery anyway and can just fix it with conditional styles.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.arisyi-design.web.id/css/multiple-class-id-and-class-selectors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE CSS Bugs That’ll Get You Every Time</title>
		<link>http://www.arisyi-design.web.id/css/ie-css-bugs-that%e2%80%99ll-get-you-every-time/</link>
		<comments>http://www.arisyi-design.web.id/css/ie-css-bugs-that%e2%80%99ll-get-you-every-time/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 05:03:59 +0000</pubDate>
		<dc:creator>azimah</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[IE bug]]></category>

		<guid isPermaLink="false">http://www.arisyi-design.web.id/?p=253</guid>
		<description><![CDATA[
IE 6 actually had the best CSS support of any browser when it first came out… SEVEN YEARS AGO. The little bugs in it’s CSS support still haunt us to this day. I still get comments from people who roundly reject any technique that doesn’t work in IE 6. While I generally refuse to pander [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://css-tricks.com/wp-content/uploads/2008/04/ie-bug.jpg" alt="ie-bug"></p>
<p>IE 6 actually had the best CSS support of any browser when it first came out… SEVEN YEARS AGO. The little bugs in it’s CSS support still haunt us to this day. I still get comments from people who <a href="http://css-tricks.com/improved-current-field-highlighting-in-forms/#comment-14999">roundly reject any technique</a> that doesn’t work in IE 6. While I generally refuse to pander to IE 6’s limitations, I still feel it is important to make things look right in it whenever possible. Here are that major bugs in IE that’ll get you every time:<br /> <span id="more-482"></span></p>
<h3>The Box Model</h3>
<p>This is perhaps the most common and frustrating bug of all in IE 6 and below. Let’s say you declare a box like this:</p>
<pre><code>div#box {
   width: 100px;
   border: 2px solid black;
   padding: 10px;
}</code></pre>
<p><span id="more-253"></span>
<p>IE 6 will calculate the width of the box to be <strong>100px.</strong><br /> Modern browsers will calculate the width of the box to be <strong>124px</strong>.</p>
<p>This kind of discrepancy can cause HUGE layout problems. I even think the IE version makes a little bit more sense logically, but that is not how the spec was written. IE 6 can actually get it right <strong>if you are in standards-compliant mode</strong>, which is rare these days as just using an HTML 4.0 transitional doctype will trigger quirks mode and the box model problem.</p>
<p>I generally work around this issue by just not using padding on boxes I am using for layout. If that box has some text inside it in a &lt;p&gt; element, I’ll apply the padding it needs directly to that p element. Just side-steps the issue, but it works.</p>
<p>&nbsp;</p>
<h3>The Double Margin Bug</h3>
<p>Using our box example from above, let’s say we need that floated to the right:</p>
<pre><code>div#box {
   float: right;
   margin-right: 20px;
}</code></pre>
<p>IE 6 will <strong>double the 20px to 40px</strong>. Again, causing potentially huge layout borks. The commonly thrown-around “fix” for this is to add “display: inline;” to the div. I’m not sure how this “fix” got so much traction, but its a bit impractical. We can’t set static widths on inline elements, now can we?</p>
<p>I also like to side-step this bug whenever possible. If you really need to push that box away from the right side of it’s parent element, you can likely do so by adding padding to the parent element, which is more likely to keep your grid consistent anyway. Also don’t forget about padding. This bug does not affect padding, so you can offen get away with adding padding to the side you need an achieve the same result.</p>
<p>&nbsp;</p>
<h3>No Min Widths / Min Height</h3>
<p>Setting min-width and min-height on elements is such a natural and logical thing that it makes me tear up sometimes thinking I can’t count on them. IE 6 doesn’t just get it wrong, it just completely ignores them. Min-height is incredibly useful for something like a footer. Say your footer needs to be <em>at least </em>100px tall because you are using a background image down there, but you don’t want to set a static height because you want it to grow nicely if, say, the text size is bumped up significantly. Min-height is perfect for this, but using it alone will get you no height whatsoever from IE 6. In a bizarre twist of luck, IE 6 treats the regular height property like modern browsers treat min-height, so you can use a “<a href="http://www.dustindiaz.com/min-height-fast-hack/">hack</a>” to fix it. I call it a “hack”, because I don’t really consider it a hack since it validates just fine.</p>
<p>&nbsp;</p>
<h3>Stepdown</h3>
<p>Normally when floating objects you can count on them lining up vertically until they break. That is, you could if you weren’t using IE 6. IE 6 appends a line break effect after each floated block element which will cause “stepdown”. The fix here is to make sure the line-height in the parent element is set to zero (0), or that the elements being floated are inline elements.  More on <a href="http://css-tricks.com/prevent-menu-stepdown/">preventing stepdown here</a>.</p>
<p>&nbsp;</p>
<h3>No Hover States</h3>
<p>Most modern browsers support hover states on just about any element, but not IE 6. IE 6 only support the hover pseudo-class on anchor (&lt;a&gt;) elements, and <em>even then</em> you don’t get them if your anchor doesn’t have a href attribute. The solution here is to use a <a href="http://www.xs4all.nl/%7Epeterned/csshover.html">proprietary fix</a>, or just deal with not having hover states on everything you want.</p>
<p>&nbsp;</p>
<h3>No Alpha Transparent PNG Support</h3>
<p><span class="crossout">Kind of funny that Microsoft themselves developed the PNG format, but their own browser doesn’t natively support it (until IE 7)</span>*. I have a whole <a href="http://css-tricks.com/the-different-techniques-for-applying-the-png-hack/">roundup of different fixes</a> for this. Do remember that regular non-alpha transparent PNG files work fine without any fix in IE 6, and are often better than their GIF sisters.</p>
<p>*<strong>Update</strong>: I was totally wrong about the Microsoft thing, no idea how that got in my head. <a href="http://www.libpng.org/pub/png/pnghist.html">Tom Boutell</a> actually developed the PNG format. Thanks all!</p>
<p>&nbsp;</p>
<h3>So…</h3>
<p>All these bugs are either fixable or side-steppable, but they will get ya if you don’t do your testing. My general philosophy is: design with the most modern techniques possible, but then just make sure it ain’t busted in older ones.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.arisyi-design.web.id/css/ie-css-bugs-that%e2%80%99ll-get-you-every-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Create an IE-Only Stylesheet</title>
		<link>http://www.arisyi-design.web.id/css/how-to-create-an-ie-only-stylesheet/</link>
		<comments>http://www.arisyi-design.web.id/css/how-to-create-an-ie-only-stylesheet/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 04:51:02 +0000</pubDate>
		<dc:creator>azimah</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[IE bug]]></category>
		<category><![CDATA[IE only]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[IE7]]></category>

		<guid isPermaLink="false">http://www.arisyi-design.web.id/?p=249</guid>
		<description><![CDATA[
This article has been updated from an older version (originally Sept 24, 2007). I just wanted to expand it and make it more clear.
If you read this blog, there is a 99% chance you’ve had a hair-pulling experience with IE. But if you are worth your salt as a CSS coder, you should be able [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://css-tricks.com/wp-content/uploads/2007/09/ie-only-css.gif"/></p>
<p><strong>This article has been updated from an older version (originally Sept 24, 2007). I just wanted to expand it and make it more clear.</strong></p>
<p>If you read this blog, there is a 99% chance you’ve had a hair-pulling experience with IE. But if you are worth your salt as a CSS coder, you should be able to deal with it. I am of the opinion that you can handle anything IE can throw at you without the use of hacks. Hacks are dangerous, since they are based on non-standard exploits, you can’t predict how they are going to behave in future browsers. The tool of choice for fighting IE problems is the <strong>conditional stylesheet</strong>. IE provides comment tags, supported all the way up to the current IE 8 to target specific versions, as well as greater-than/less-than stuff for targeting multiple versions at once.</p>
<p><span id="more-132"></span></p>
<p><span id="more-249"></span><br />
<h2>Why use conditional stylesheets?</h2>
<ul>
<li>You got problems, they need fixin’</li>
<li>Keeps your code hack-free and valid</li>
<li>Keeps your main stylesheet clean</li>
<li>Perfectly acceptable technique, sanctioned by Microsoft</li>
</ul>
<p>And remember, these conditional tags don’t have to be used only for CSS. You could load JavaScript, or even use them down in the content of your site to display special IE-specific messages.</p>
<h2>The Code</h2>
<p>This would go in your &lt;head&gt; with all the other regular CSS &lt;link&gt;ed CSS files. The opening and closing tags should be familiar, that’s just regular ol’ <a href="http://css-tricks.com/snippets/html/comments-in-html/">HTML comments</a>. Then between the brackets, “IF” and “IE” should be fairly obvious. The syntax to note is “!” stand for “not”, so !IE means “not IE”. <tt>gt</tt> means “greater than”, <tt>gte</tt> means “greater than or equal”, <tt>lt</tt> means “less than”, <tt>lte</tt> means “less than or equal.”</p>
<h4>Target ALL VERSIONS of IE</h4>
<pre><code>&lt;!--[if IE]&gt;
	&lt;link rel="stylesheet" type="text/css" href="all-ie-only.css" /&gt;
&lt;![endif]--&gt;</code></pre>
<h4>Target everything EXCEPT IE</h4>
<pre><code>&lt;!--[if !IE]&gt;
	&lt;link rel="stylesheet" type="text/css" href="not-ie.css" /&gt;
&lt;![endif]--&gt;</code></pre>
<h4>Target IE 7 ONLY</h4>
<pre><code>&lt;!--[if IE 7]&gt;
	&lt;link rel="stylesheet" type="text/css" href="ie7.css"&gt;
&lt;![endif]--&gt;</code></pre>
<h4>Target IE 6 ONLY</h4>
<pre><code>&lt;!--[if IE 6]&gt;
	&lt;link rel="stylesheet" type="text/css" href="ie6.css" /&gt;
&lt;![endif]--&gt;</code></pre>
<h4>Target IE 5 ONLY</h4>
<pre><code>&lt;!--[if IE 5]&gt;
	&lt;link rel="stylesheet" type="text/css" href="ie5.css" /&gt;
&lt;![endif]--&gt;</code></pre>
<h4>Target IE 5.5 ONLY</h4>
<pre><code>&lt;!--[if IE 5.5000]&gt;
&lt;link rel="stylesheet" type="text/css" href="ie55.css" /&gt;
&lt;![endif]--&gt;</code></pre>
<h4>Target IE 6 and LOWER</h4>
<pre><code>&lt;!--[if lt IE 7]&gt;
	&lt;link rel="stylesheet" type="text/css" href="ie6-and-down.css" /&gt;
&lt;![endif]--&gt;</code></pre>
<pre><code>&lt;!--[if lte IE 6]&gt;
	&lt;link rel="stylesheet" type="text/css" href="ie6-and-down.css" /&gt;
&lt;![endif]--&gt;</code></pre>
<h4>Target IE 7 and LOWER</h4>
<pre><code>&lt;!--[if lt IE 8]&gt;
	&lt;link rel="stylesheet" type="text/css" href="ie7-and-down.css" /&gt;
&lt;![endif]--&gt;</code></pre>
<pre><code>&lt;!--[if lte IE 7]&gt;
	&lt;link rel="stylesheet" type="text/css" href="ie7-and-down.css" /&gt;
&lt;![endif]--&gt;</code></pre>
<h4>Target IE 8 and LOWER</h4>
<pre><code>&lt;!--[if lt IE 9]&gt;
	&lt;link rel="stylesheet" type="text/css" href="ie8-and-down.css" /&gt;
&lt;![endif]--&gt;</code></pre>
<pre><code>&lt;!--[if lte IE 8]&gt;
	&lt;link rel="stylesheet" type="text/css" href="ie8-and-down.css" /&gt;
&lt;![endif]--&gt;</code></pre>
<h4>Target IE 6 and HIGHER</h4>
<pre><code>&lt;!--[if gt IE 5.5]&gt;
	&lt;link rel="stylesheet" type="text/css" href="ie6-and-up.css" /&gt;
&lt;![endif]--&gt;</code></pre>
<pre><code>&lt;!--[if gte IE 6]&gt;
	&lt;link rel="stylesheet" type="text/css" href="ie6-and-up.css" /&gt;
&lt;![endif]--&gt;</code></pre>
<h4>Target IE 7 and HIGHER</h4>
<pre><code>&lt;!--[if gt IE 6]&gt;
	&lt;link rel="stylesheet" type="text/css" href="ie7-and-up.css" /&gt;
&lt;![endif]--&gt;</code></pre>
<pre><code>&lt;!--[if gte IE 7]&gt;
	&lt;link rel="stylesheet" type="text/css" href="ie7-and-up.css" /&gt;
&lt;![endif]--&gt;</code></pre>
<h4>Target IE 8 and HIGHER</h4>
<pre><code>&lt;!--[if gt IE 7]&gt;
	&lt;link rel="stylesheet" type="text/css" href="ie8-and-up.css" /&gt;
&lt;![endif]--&gt;</code></pre>
<pre><code>&lt;!--[if gte IE 8]&gt;
	&lt;link rel="stylesheet" type="text/css" href="ie8-and-up.css" /&gt;
&lt;![endif]--&gt;</code></pre>
<h2>Universal IE 6 CSS</h2>
<p>Dealing with IE 6 and below is always an extra-special challenge. These days people are dropping support for it right and left, including major businesses, major web apps, and even governments. There is a better solution than just letting the site go to hell, and that is to server IE 6 and below a special stripped-down stylesheet, and then serve IE 7 and above (and all other browsers) the regular CSS. This is been coined the <a href="http://css-tricks.com/snippets/html/universal-ie6-css/">universal IE 6 CSS</a>.</p>
<pre><code class="html">&lt;!--[if !IE 6]&gt;&lt;!--&gt;
  &lt;link rel="stylesheet" type="text/css" media="screen, projection" href="REGULAR-STYLESHEET.css" /&gt;
&lt;!--&lt;![endif]--&gt;
&lt;!--[if gte IE 7]&gt;
  &lt;link rel="stylesheet" type="text/css" media="screen, projection" href="REGULAR-STYLESHEET.css" /&gt;
&lt;![endif]--&gt;
&lt;!--[if lte IE 6]&gt;
  &lt;link rel="stylesheet" type="text/css" media="screen, projection" href="http://universal-ie6-css.googlecode.com/files/ie6.0.3.css" /&gt;
&lt;![endif]--&gt;</code></pre>
<h2>Hacks</h2>
<p>If you must…</p>
<h4>IE-7 ONLY</h4>
<pre><code>* html #div {
    height: 300px;
}</code></pre>
<h4>NON IE-7 ONLY:</h4>
<pre><code>#div {
   _height: 300px;
}</code></pre>
<h4>Hide from IE 6 and LOWER:</h4>
<pre><code>#div {
   height/**/: 300px;
}</code></pre>
<pre><code>html &gt; body #div {
      height: 300px;
}</code></pre>
<h2>Argument against conditional stylesheets</h2>
<p>We shouldn’t need them. They are against the spirit of web standards.</p>
<h2>Argument for conditional stylesheets</h2>
<p>Yeah, but we do need them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.arisyi-design.web.id/css/how-to-create-an-ie-only-stylesheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE Background RGB Bug</title>
		<link>http://www.arisyi-design.web.id/css/ie-background-rgb-bug/</link>
		<comments>http://www.arisyi-design.web.id/css/ie-background-rgb-bug/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 04:28:18 +0000</pubDate>
		<dc:creator>azimah</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[IE Background RGB Bug]]></category>
		<category><![CDATA[IE bug]]></category>

		<guid isPermaLink="false">http://www.arisyi-design.web.id/?p=244</guid>
		<description><![CDATA[Using RGBa for progressive enhancement is getting more and more popular, which is awesome. Even nearly a year ago it was pretty much ready to rock. A great way to handle the progressive enhancement part is just to declare a fallback color before the RGBa value, so older browsers that don’t support it will get [...]]]></description>
			<content:encoded><![CDATA[<p>Using RGBa for progressive enhancement is getting more and more popular, which is awesome. Even nearly a year ago it was pretty much ready to rock. A great way to handle the progressive enhancement part is just to declare a fallback color before the RGBa value, so older browsers that don’t support it will get a solid color version:</p>
<pre class="css">
<span class="cssSelector">div {</span>
   <span class="cssProperty">background</span><span class="cssRest">:</span><span class="cssValue"> rgb(200, 54, 54)</span><span class="cssRest">;</span> <span class="cssComment">/* The Fallback */</span>
   <span class="cssProperty">background</span><span class="cssRest">:</span><span class="cssValue"> rgba(200, 54, 54, 0.5)</span><span class="cssRest">;</span>
<span class="cssSelector">}</span>
</pre>
<p>The situation is that the RGB fallback color only works when using shorthand. If you were to declare the fallback color like this:</p>
<pre class="css">
<span class="cssSelector">div {</span>
	<span class="cssProperty">background-color</span><span class="cssRest">:</span><span class="cssValue"> rgb(255,0,0)</span><span class="cssRest">;</span>
	<span class="cssProperty">background-color</span><span class="cssRest">:</span><span class="cssValue"> rgba(255,0,0,0.5)</span><span class="cssRest">;</span>
<span class="cssSelector">}</span>
</pre>
<p>Using the background-color property only, it will fail and display no background color at all.</p>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/iergbbug.png" border="1" /></p>
<h2>Solution</h2>
<p>Using RGB for a fallback is nice. It’s no-brainer work because all you have to do is duplicated the RGBa value, remove the “a” and remove the 4th (opacity) parameter. If you want to keep using RGB as a fallback, just remember to set it using shorthand (if possible), or set the fallback using regular HEX codes or keywords.</p>
<p>In <a href="http://css-tricks.com/examples/IERGBBug/">the example</a>, the result of 50% red is a light red anyway, so using a hex code to specify that value might be a more appropriate fallback color anyway.</p>
<pre class="css">
<span class="cssSelector">div {</span>
  <span class="cssProperty">background-color</span><span class="cssRest">:</span><span class="cssValue"> #fd7e7e</span><span class="cssRest">;</span>
  <span class="cssProperty">background-color</span><span class="cssRest">:</span><span class="cssValue"> rgba(255,0,0,0.5)</span><span class="cssRest">;</span>
<span class="cssSelector">}</span>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.arisyi-design.web.id/css/ie-background-rgb-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Target IE6 and IE7 with Only Two Characters</title>
		<link>http://www.arisyi-design.web.id/css/how-to-target-ie6-and-ie7-with-only-two-characters/</link>
		<comments>http://www.arisyi-design.web.id/css/how-to-target-ie6-and-ie7-with-only-two-characters/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 07:32:32 +0000</pubDate>
		<dc:creator>azimah</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[css hack]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[IE7]]></category>

		<guid isPermaLink="false">http://www.arisyi-design.web.id/?p=220</guid>
		<description><![CDATA[Did you know that, with the addition of only two characters, you can target both Internet Explorer 6 and 7 in your stylesheets? It&#8217;s easy&#8230;I&#8217;ll show you!

 #someElement {
    background: red; /* modern browsers */
   *background: green; /* IE 7 and below */
   _background: yellow; /* IE6 exclusively [...]]]></description>
			<content:encoded><![CDATA[<p>Did you know that, with the addition of only two characters, you can target both Internet Explorer 6 and 7 in your stylesheets? It&#8217;s easy&#8230;I&#8217;ll show you!</p>
<pre class="css">
 <span class="cssSelector">#someElement {</span>
    <span class="cssProperty">background</span><span class="cssRest">:</span><span class="cssValue"> red</span><span class="cssRest">;</span> <span class="cssComment">/* modern browsers */</span>
   *<span class="cssProperty">background</span><span class="cssRest">:</span><span class="cssValue"> green</span><span class="cssRest">;</span> <span class="cssComment">/* IE 7 and below */</span>
   _<span class="cssProperty">background</span><span class="cssRest">:</span><span class="cssValue"> yellow</span><span class="cssRest">;</span> <span class="cssComment">/* IE6 exclusively */</span>
<span class="cssSelector">}</span>  </pre>
]]></content:encoded>
			<wfw:commentRss>http://www.arisyi-design.web.id/css/how-to-target-ie6-and-ie7-with-only-two-characters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XMLHttpRequest Object</title>
		<link>http://www.arisyi-design.web.id/ajax/xmlhttprequest-object/</link>
		<comments>http://www.arisyi-design.web.id/ajax/xmlhttprequest-object/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 11:21:54 +0000</pubDate>
		<dc:creator>azimah</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[connect ajax]]></category>
		<category><![CDATA[XMLHttpRequest]]></category>

		<guid isPermaLink="false">http://www.arisyi-design.web.id/?p=162</guid>
		<description><![CDATA[Untuk dapat mengembangkan aplikasi web dengan tehnik AJAX ini kita perlu mengkombinasikan
beberapa hal berikut:
Untuk dapat mengembangkan aplikasi web dengan tehnik AJAX ini kita perlu mengkombinasikan beberapa hal berikut:

 Javascript untuk membuat object XMLHttpRequest yang kita gunakan untuk berkomunikasi dengan server secara behind the scene.
 DOM (Document Object Model), hasil proses yang diterima akan kita tampilkan dengan memanipulasi object [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">Untuk dapat mengembangkan aplikasi web dengan tehnik AJAX ini kita perlu mengkombinasikan</div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">beberapa hal berikut:</div>
<p>Untuk dapat mengembangkan aplikasi web dengan tehnik AJAX ini kita perlu mengkombinasikan beberapa hal berikut:</p>
<ul>
<li> Javascript untuk membuat object XMLHttpRequest yang kita gunakan untuk berkomunikasi dengan server secara behind the scene.</li>
<li> DOM (Document Object Model), hasil proses yang diterima akan kita tampilkan dengan memanipulasi object DOM yang telah kita persiapkan sebelumnya untuk menampilkan data hasil proses yang diberikan server.</li>
<li>XML (eXtensible Markup Language) format data yang dikembalikan oleh server, data XML ini siap dibaca dan ditampilkan untuk mengupdate content pada halaman web.</li>
</ul>
<p>secara sederhana kita akan memanfaatkan beberapa kombinasi diatas untuk membuat aplikasi</p>
<p>web dengan tehnik AJAX ini, namun kita masih dapat mengembangkannya lebih lanjut setelah</p>
<p>mengetahui proses kerja dari tehnik AJAX ini.</p>
<p><span id="more-162"></span></p>
<p>Kelebihan utama AJAX sendiri terletak pada pemanfaatan class object XMLHttpRequest untuk</p>
<p>berkomunikasi dengan Web Server secara background dalam melakukan request.</p>
<p>Saat ini terdapat banyak aplikasi web browser, dan yang agak sedikit menyebalkan adalah</p>
<p>karena masing‐masing browser mempunyai standart dan cara berbeda untuk membuat object</p>
<p>XMLHttpRequest ini.</p>
<p>Untuk dapat berjalan dengan baik pada semua browser kita perlu menyiapkan beberapa</p>
<p>kondisi untuk mendeteksi web browser yang digunakan oleh user, dan kemudian membuat</p>
<p>object XMLHttpRequest tersebut sesuai web browser yang digunakan.</p>
<p>Saat ini setidaknya ada 5 web browser yang banyak digunakan (Firefox, Mozilla, IE7, IE sebelum</p>
<p>versi 7, Opera dan juga Safari), berikut pembuatan object XMLHttpRequest dengan javascript</p>
<p>pada masing‐masing web browse tersebut:</p>
<h4>Untuk membuat class object pada browser Firefox, Safari, Mozila, Opera.</h4>
<p><span style="color: #808080;">oAJAX = new XMLHttpRequest();</span></p>
<h4>Untuk membuat class object pada browser IE7</h4>
<p><span style="color: #808080;">oAJAX = new ActiveXObject(&#8216;MSXML2.XMLHTTP&#8217;);</span></p>
<h4>Untuk membuat class object pada browser IE versi lama</h4>
<p><span style="color: #808080;">oAJAX = new ActiveXObject(&#8216;Microsoft.XMLHTTP&#8217;);</span></p>
<p>Dari 3 kemungkinan diatas kita akan menyiapkan sebuat sebuah function untuk pembuatan</p>
<p>object dengan mendeteksi web browser yang digunakan oleh user, berikut</p>
<p>function javascript lengkapnya:</p>
<pre class="html">
<span class="htmlScriptTag">&lt;script&gt;</span>
function createRequest(){
var oAJAX = false;
try {
oAJAX = new ActiveXObject(&quot;Msxml2.XMLHTTP&quot;);
} catch (e) {
try {
oAJAX = new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);
} catch (e2) {
oAJAX = false;
}
}
if (!oAJAX <span class="htmlSpecialChar">&amp;amp;</span><span class="htmlSpecialChar">&amp;amp;</span> typeof XMLHttpRequest != &#039;undefined&#039;) {
oAJAX = new XMLHttpRequest();
}
if (!oAJAX){
alert(&quot;Error saat membuat XMLHttpRequest!&quot;);
}else{
alert(&quot;XMLHttpRequest sukses dibuat!&quot;);
}
return oAJAX;
}
<span class="htmlScriptTag">&lt;/script&gt;</span>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.arisyi-design.web.id/ajax/xmlhttprequest-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress cheat sheet</title>
		<link>http://www.arisyi-design.web.id/wordpress/wordpress-cheat-sheet/</link>
		<comments>http://www.arisyi-design.web.id/wordpress/wordpress-cheat-sheet/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 13:31:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.arisyi-design.web.id/?p=147</guid>
		<description><![CDATA[Theme Structure
header.php &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. Header Section
index.php &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. Main Section
sidebar.php &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. Sidebar Section
single.php &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. Post Template
page.php &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. Page Template
comments.php &#8230;&#8230;&#8230;&#8230;&#8230;&#8230; Comment Template
search.php &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. Search Content
searchform.php &#8230;&#8230;&#8230;&#8230; Search Form Template
archive.php &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. Archive Template
functions.php &#8230;&#8230;&#8230;&#8230;&#8230;. Special Functions
404.php &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. Error Page template
style.css &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. Style Sheet
The Loop

&#60;?php if(have_posts());?&#62;
&#60;?php while(have_posts()); the_post();?&#62;
// The Stuff&#8230; Custom HTML &#38; PHP Code
&#60;?php else;?&#62;
&#60;?php endif;?&#62;
&#60;?php if(have_posts());?&#62;
&#60;?php while(have_posts()); [...]]]></description>
			<content:encoded><![CDATA[<h2>Theme Structure</h2>
<p>header.php &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. Header Section<br />
index.php &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. Main Section<br />
sidebar.php &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. Sidebar Section<br />
single.php &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. Post Template<br />
page.php &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. Page Template<br />
comments.php &#8230;&#8230;&#8230;&#8230;&#8230;&#8230; Comment Template<br />
search.php &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. Search Content<br />
searchform.php &#8230;&#8230;&#8230;&#8230; Search Form Template<br />
archive.php &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. Archive Template<br />
functions.php &#8230;&#8230;&#8230;&#8230;&#8230;. Special Functions<br />
404.php &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. Error Page template<br />
style.css &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. Style Sheet</p>
<h2>The Loop</h2>
<p><span id="more-147"></span></p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 211px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">&lt;?php if(have_posts());?&gt;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 211px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">&lt;?php while(have_posts()); the_post();?&gt;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 211px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">// The Stuff&#8230; Custom HTML &amp; PHP Code</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 211px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">&lt;?php else;?&gt;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 211px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">&lt;?php endif;?&gt;</div>
<p>&lt;?php if(have_posts());?&gt;</p>
<p>&lt;?php while(have_posts()); the_post();?&gt;</p>
<p>// The Stuff&#8230; Custom HTML &amp; PHP Code</p>
<p>&lt;?php else;?&gt;</p>
<p>&lt;?php endif;?&gt;</p>
<h2>The Category Based Loop</h2>
<p>&lt;?php query_posts(&#8216;category_name=</p>
<p>Category&amp;showposts=10&#8242;); ?&gt;</p>
<p>&lt;?php while (have_posts()) : the_post(); ?&gt;</p>
<p>// The Stuff&#8230; Custom HTML &amp; PHP Code</p>
<p>&lt;?php endwhile;?&gt;</p>
<h2>Theme Definition</h2>
<p>/*</p>
<p>Theme Name: Wordpress</p>
<p>Theme URI: http://wordpress.org/</p>
<p>Description: Test Blog</p>
<p>Version: 1.6</p>
<p>Author: Ekin Ertaç</p>
<p>Author URI: http://ekinertac.com</p>
<p>Tags: powerful, cheat, sheet</p>
<p>*/</p>
<h2>Template Include Tags</h2>
<p>&lt; ?php get_header(); ?&gt;</p>
<p>&lt; ?php get_sidebar(); ?&gt;</p>
<p>&lt; ?php get_footer(); ?&gt;</p>
<p>&lt; ?php comments_template(); ?&gt;</p>
<h2>WordPress Template Tags</h2>
<p>&lt;?php the_title() ?&gt; &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;Displays the posts/pages title</p>
<p>&lt;?php the_content() ?&gt; &#8230;&#8230;&#8230;&#8230;Displays the content of the post/page</p>
<p>&lt;?php the_excerpt() ?&gt; &#8230;.Displays the excerpt of the current post/page</p>
<p>&lt;?php the_time() ?&gt; &#8230;&#8230;&#8230;.Displays the time of the current post/page</p>
<p>&lt;?php the_date() ?&gt; &#8230;..Displays the date of a post or set of post/page</p>
<p>&lt;?php the_permalink() ?&gt; &#8230;&#8230;&#8230;&#8230;.Displays the URL for the permalink</p>
<p>&lt;?php the_category() ?&gt; &#8230;&#8230;&#8230;&#8230;&#8230;..Displays the category of a post</p>
<p>&lt;?php the_author(); ?&gt; &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;Displays the author of the post</p>
<p>&lt;?php the_ID(); ?&gt; &#8230;&#8230;&#8230;.Displays the numeric ID of the current post</p>
<p>&lt;?php wp_list_pages(); ?&gt; &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;Displays all the pages</p>
<p>&lt;?php wp_tag_cloud(); ?&gt; &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;Displays a tag cloud</p>
<p>&lt;?php wp_list_cats(); ?&gt; &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;Displays the categories</p>
<p>&lt;?php get_calendar(); ?&gt; &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..Displays the calendar</p>
<p>&lt;?php wp_get_archives() ?&gt; &#8230;&#8230;&#8230;.Displays a date-based archives list</p>
<p>&lt;?php posts_nav_link(); ?&gt; &#8230;Displays Previous page and Next Page links</p>
<p>&lt;?php next_post_link() ?&gt; &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;Displays Newer Posts link</p>
<p>&lt;?php previous_post_link() ?&gt; &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..Displays previous link</p>
<p>&lt;?php edit_post_link(__(&#8216;Edit Post&#8217;)); ?&gt; &#8230;&#8230;..Displays the edit link</p>
<p>&lt;?php the_search_query();?&gt; &#8230;&#8230;&#8230;&#8230;&#8230;.Value for search form</p>
<p>&lt;?php wp_register();?&gt; &#8230;&#8230;&#8230;&#8230;&#8230;.Displays the register link</p>
<p>&lt;?php wp_loginout();?&gt; &#8230;&#8230;&#8230;&#8230;..Displays the log in/out link</p>
<p>&lt;?php wp_meta();?&gt; &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..Meta for administrators</p>
<p>&lt;?php timer_stop(1);?&gt; &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;Time to load the page</p>
<p>&lt;?php echo c2c_custom(&#8216;test&#8217;);?&gt; &#8230;&#8230; Displays the custom field1</p>
<p>&lt;?php get_links_list(); ?&gt; &#8230;&#8230;&#8230;..Display links from Blogroll</p>
<p>&lt;?php get_calendar(); ?&gt; &#8230;&#8230;&#8230;.Displays the built-in calendar</p>
<p>&lt;?php comments_popup_link(); ?&gt; &#8230;&#8230;.Link of the posts comments</p>
<h2>BlogInfo Tags</h2>
<p>&lt;?php bloginfo(&#8216;name&#8217;); ?&gt; &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;Title of the blog</p>
<p>&lt;?php bloginfo(&#8216;charset&#8217;); ?&gt; &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;The character set</p>
<p>&lt;?php bloginfo(&#8216;description&#8217;); ?&gt; &#8230;&#8230;&#8230;.The description of the blog</p>
<p>&lt;?php bloginfo(&#8216;url&#8217;); ?&gt; &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.The address of the blog</p>
<p>&lt;?php bloginfo(&#8216;rss2_url&#8217;); ?&gt; &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..The RSS URL</p>
<p>&lt;?php bloginfo(&#8216;template_url&#8217;); ?&gt; &#8230;&#8230;&#8230;&#8230;.The URL of the template</p>
<p>&lt;?php bloginfo(&#8216;pingback_url&#8217;); ?&gt; &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..The pingback URL</p>
<p>&lt;?php bloginfo(&#8217;stylesheet_url&#8217;); ?&gt; The URL for the template&#8217;s CSS file</p>
<p>&lt;?php bloginfo(&#8216;wpurl&#8217;); ?&gt; &#8230;&#8230;&#8230;&#8230;.URL for WordPress installation</p>
<p>&lt;?php bloginfo(&#8216;version&#8217;); ?&gt; &#8230;.Version of the WordPress installation</p>
<p>&lt;?php bloginfo(&#8216;html_type&#8217;); ?&gt; &#8230;&#8230;&#8230;&#8230;&#8230;HTML version of the site</p>
<h2>BlogInfo Tags</h2>
<p>is_home() &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..When the user is on the blog home page</p>
<p>is_front_page() &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.When the user is on the home page</p>
<p>is_single() &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;When the single post displayed</p>
<p>is_sticky() &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.Check if a post is sticky</p>
<p>is_page() &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.When a page is displayed</p>
<p>is_category() &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;When a category is displayed</p>
<h2>Navigation Menu</h2>
<p>Category Based Navigation</p>
<p>&lt;ul id=&#8221;menu&#8221;&gt;</p>
<p>&lt;li &lt;?php if(is_home()) { ?&gt; class=&#8221;current-cat&#8221;&lt; ?php } ?&gt;&gt;</p>
<p>&lt;a href=&#8221;&lt;?php bloginfo(&#8216;home&#8217;); ?&gt;&#8221;&gt;Home&lt;/a&gt;&lt;/li&gt;</p>
<p>&lt; ?php wp_list_categories(&#8216;title_li=&amp;orderby=id&#8217;); ?&gt;</p>
<p>&lt;/ul&gt;</p>
<p>Pages based Navigation</p>
<p>&lt;ul id=&#8221;menu&#8221;&gt;</p>
<p>&lt;li &lt;?php if(is_home()) { ?&gt; class=&#8221;current_page_item&#8221;&lt; ?php } ?&gt;&gt;</p>
<p>&lt;a href=&#8221;&lt;?php bloginfo(&#8216;home&#8217;); ?&gt;&#8221;&gt;home&lt;/a&gt;&lt;/li&gt;</p>
<p>&lt; ?php wp_list_pages(&#8217;sort_column=menu_order&amp;depth=1&amp;title_li=&#8217;); ?&gt;</p>
<p>&lt;/ul&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.arisyi-design.web.id/wordpress/wordpress-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script PHP Informasi Anda &#8211; IP &#8211; Proxy &#8211; Koneksi</title>
		<link>http://www.arisyi-design.web.id/php-tutorial/script-php-informasi-anda-ip-proxy-koneksi/</link>
		<comments>http://www.arisyi-design.web.id/php-tutorial/script-php-informasi-anda-ip-proxy-koneksi/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 17:51:16 +0000</pubDate>
		<dc:creator>azimah</dc:creator>
				<category><![CDATA[PHP tutorial]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php script]]></category>

		<guid isPermaLink="false">http://www.arisyi-design.web.id/blog/?p=121</guid>
		<description><![CDATA[Ini adalah script untuk membuat tampilan &#8220;informasi anda&#8221; seperti :
1. ip
2. proxy
3. koneksi
Silahkan memodifikasi script ini

 &#60;?php
$agent = $_SERVER['HTTP_USER_AGENT'];
$uri = $_SERVER['REQUEST_URI'];
$user = $_SERVER['PHP_AUTH_USER'];
$ip = $_SERVER['REMOTE_ADDR'];
$ref = $_SERVER['HTTP_REFERER'];
$proxy = $_SERVER['HTTP_X_FORWARDED_FOR'];
$via = $_SERVER['HTTP_VIA'];
?&#62;
&#60;table width=&#34;140&#34; border=&#34;0&#34; style=&#34;border-collapse:collapse;&#34;&#62;
&#60;tr&#62;
&#60;td background=&#34;img/ket_2.jpg&#34;&#62;
&#60;img src=&#34;/img/h_3.jpg&#34;&#62;&#60;b&#62;Informasi Anda&#60;/b&#62;:
&#60;/td&#62;
&#60;/tr&#62;
&#60;tr&#62;
&#60;td&#62;
&#60;span&#62;&#60;b&#62;IP:&#60;/b&#62;&#60;/span&#62;
&#60;br&#62;
 &#60;span style=&#34;padding-left:5px;&#34;&#62;&#60;?php echo $ip; ?&#62;&#60;/span&#62;
&#60;/td&#62;
&#60;/tr&#62;
&#60;tr&#62;
&#60;td&#62;
&#60;span&#62;&#60;b&#62;Proxy:&#60;/b&#62;&#60;/span&#62;
&#60;br&#62;
&#60;span style=&#34;padding-left:5px;&#34;&#62;&#60;?php echo $proxy; ?&#62;&#60;/span&#62;
&#60;/td&#62;
&#60;/tr&#62;
&#60;tr&#62;
&#60;td&#62;
&#60;span&#62;&#60;b&#62;Koneksi:&#60;/b&#62;&#60;/span&#62;
&#60;br&#62;
&#60;span style=&#34;padding-left:5px;&#34;&#62;&#60;?php echo $via; ?&#62;&#60;/span&#62;
&#60;/td&#62;
&#60;/tr&#62;
&#60;/tr&#62;
&#60;/table&#62;

]]></description>
			<content:encoded><![CDATA[<p>Ini adalah script untuk membuat tampilan &#8220;informasi anda&#8221; seperti :</p>
<p>1. ip<br />
2. proxy<br />
3. koneksi</p>
<p>Silahkan memodifikasi script ini</p>
<pre class="php">
 <span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span>
$agent <span class="phpOperator">=</span> <span class="phpScriptVar">$_SERVER</span><span class="phpOperator">[</span><span class="phpString">'HTTP_USER_AGENT'</span><span class="phpOperator">]</span><span class="phpText">;</span>
$uri <span class="phpOperator">=</span> <span class="phpScriptVar">$_SERVER</span><span class="phpOperator">[</span><span class="phpString">'REQUEST_URI'</span><span class="phpOperator">]</span><span class="phpText">;</span>
$user <span class="phpOperator">=</span> <span class="phpScriptVar">$_SERVER</span><span class="phpOperator">[</span><span class="phpString">'PHP_AUTH_USER'</span><span class="phpOperator">]</span><span class="phpText">;</span>
$ip <span class="phpOperator">=</span> <span class="phpScriptVar">$_SERVER</span><span class="phpOperator">[</span><span class="phpString">'REMOTE_ADDR'</span><span class="phpOperator">]</span><span class="phpText">;</span>
$ref <span class="phpOperator">=</span> <span class="phpScriptVar">$_SERVER</span><span class="phpOperator">[</span><span class="phpString">'HTTP_REFERER'</span><span class="phpOperator">]</span><span class="phpText">;</span>
$proxy <span class="phpOperator">=</span> <span class="phpScriptVar">$_SERVER</span><span class="phpOperator">[</span><span class="phpString">'HTTP_X_FORWARDED_FOR'</span><span class="phpOperator">]</span><span class="phpText">;</span>
$via <span class="phpOperator">=</span> <span class="phpScriptVar">$_SERVER</span><span class="phpOperator">[</span><span class="phpString">'HTTP_VIA'</span><span class="phpOperator">]</span><span class="phpText">;</span>
<span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span>
<span class="htmlTableTag">&lt;table width=<span class="htmlAttributeValue">&quot;140&quot;</span> border=<span class="htmlAttributeValue">&quot;0&quot;</span> style=<span class="htmlAttributeValue">&quot;<span class="cssProperty">border-collapse</span><span class="cssRest">:</span><span class="cssValue">collapse</span><span class="cssRest">;</span>&quot;</span>&gt;</span>
<span class="htmlTableTag">&lt;tr&gt;</span>
<span class="htmlTableTag">&lt;td background=<span class="htmlAttributeValue">&quot;img/ket_2.jpg&quot;</span>&gt;</span>
<span class="htmlImageTag">&lt;img src=<span class="htmlAttributeValue">&quot;/img/h_3.jpg&quot;</span>&gt;</span><span class="htmlOtherTag">&lt;b&gt;</span>Informasi Anda<span class="htmlOtherTag">&lt;/b&gt;</span>:
<span class="htmlTableTag">&lt;/td&gt;</span>
<span class="htmlTableTag">&lt;/tr&gt;</span>
<span class="htmlTableTag">&lt;tr&gt;</span>
<span class="htmlTableTag">&lt;td&gt;</span>
<span class="htmlOtherTag">&lt;span&gt;</span><span class="htmlOtherTag">&lt;b&gt;</span>IP:<span class="htmlOtherTag">&lt;/b&gt;</span><span class="htmlOtherTag">&lt;/span&gt;</span>
<span class="htmlOtherTag">&lt;br&gt;</span>
 <span class="htmlOtherTag">&lt;span style=<span class="htmlAttributeValue">&quot;<span class="cssProperty">padding-left</span><span class="cssRest">:</span><span class="cssValue">5px</span><span class="cssRest">;</span>&quot;</span>&gt;</span><span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span> <span class="phpFunction">echo</span> $ip<span class="phpText">;</span> <span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span><span class="htmlOtherTag">&lt;/span&gt;</span>
<span class="htmlTableTag">&lt;/td&gt;</span>
<span class="htmlTableTag">&lt;/tr&gt;</span>
<span class="htmlTableTag">&lt;tr&gt;</span>
<span class="htmlTableTag">&lt;td&gt;</span>
<span class="htmlOtherTag">&lt;span&gt;</span><span class="htmlOtherTag">&lt;b&gt;</span>Proxy:<span class="htmlOtherTag">&lt;/b&gt;</span><span class="htmlOtherTag">&lt;/span&gt;</span>
<span class="htmlOtherTag">&lt;br&gt;</span>
<span class="htmlOtherTag">&lt;span style=<span class="htmlAttributeValue">&quot;<span class="cssProperty">padding-left</span><span class="cssRest">:</span><span class="cssValue">5px</span><span class="cssRest">;</span>&quot;</span>&gt;</span><span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span> <span class="phpFunction">echo</span> $proxy<span class="phpText">;</span> <span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span><span class="htmlOtherTag">&lt;/span&gt;</span>
<span class="htmlTableTag">&lt;/td&gt;</span>
<span class="htmlTableTag">&lt;/tr&gt;</span>
<span class="htmlTableTag">&lt;tr&gt;</span>
<span class="htmlTableTag">&lt;td&gt;</span>
<span class="htmlOtherTag">&lt;span&gt;</span><span class="htmlOtherTag">&lt;b&gt;</span>Koneksi:<span class="htmlOtherTag">&lt;/b&gt;</span><span class="htmlOtherTag">&lt;/span&gt;</span>
<span class="htmlOtherTag">&lt;br&gt;</span>
<span class="htmlOtherTag">&lt;span style=<span class="htmlAttributeValue">&quot;<span class="cssProperty">padding-left</span><span class="cssRest">:</span><span class="cssValue">5px</span><span class="cssRest">;</span>&quot;</span>&gt;</span><span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span> <span class="phpFunction">echo</span> $via<span class="phpText">;</span> <span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span><span class="htmlOtherTag">&lt;/span&gt;</span>
<span class="htmlTableTag">&lt;/td&gt;</span>
<span class="htmlTableTag">&lt;/tr&gt;</span>
<span class="htmlTableTag">&lt;/tr&gt;</span>
<span class="htmlTableTag">&lt;/table&gt;</span>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.arisyi-design.web.id/php-tutorial/script-php-informasi-anda-ip-proxy-koneksi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Membuat SHOUTBOX dengan PHP</title>
		<link>http://www.arisyi-design.web.id/php-tutorial/membuat-shoutbox-dengan-php/</link>
		<comments>http://www.arisyi-design.web.id/php-tutorial/membuat-shoutbox-dengan-php/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 17:44:12 +0000</pubDate>
		<dc:creator>azimah</dc:creator>
				<category><![CDATA[PHP tutorial]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php script]]></category>

		<guid isPermaLink="false">http://www.arisyi-design.web.id/blog/?p=117</guid>
		<description><![CDATA[Berikut adalah cara mudah membuat SHOUTBOX dengan PHP :


if ($_SERVER['REQUEST_METHOD']=='POST')
{
$tempat_data = "data.txt"; // ini nama file tempat text disimpan, CHMOD ke #777
$max_karakter = 500; // ini maksimal karakter untuk text
$max_nama = 32; // ini maksimal karakter untuk nama

$min_karakter = 8; // ini karakter minimal untuk text

$min_nama = 3; // ini karakter minimal untuk nama

&#60;span id="more-117"&#62;&#60;/span&#62;
$berapa_baris [...]]]></description>
			<content:encoded><![CDATA[<p>Berikut adalah cara mudah membuat SHOUTBOX dengan PHP :</p>
<pre class="php">
<span class="phpKeyword">
if </span><span class="phpOperator">(</span><span class="phpScriptVar">$_SERVER</span><span class="phpOperator">[</span><span class="phpString">'REQUEST_METHOD'</span><span class="phpOperator">]</span><span class="phpOperator"><span class="phpOperator">=</span>=</span><span class="phpString">'POST'</span><span class="phpOperator">)</span>
<span class="phpOperator">{</span>
$tempat_data <span class="phpOperator">=</span> <span class="phpString">"data.txt"</span><span class="phpText">;</span> <span class="phpComment">// ini nama <span class="phpFunction">file</span> tempat text disimpan, CHMOD ke #777
</span>$max_karakter <span class="phpOperator">=</span> 500; <span class="phpComment">// ini maksimal karakter untuk text
</span>$max_nama <span class="phpOperator">=</span> 32<span class="phpText">;</span> <span class="phpComment">// ini maksimal karakter untuk nama
</span>
$min_karakter <span class="phpOperator">=</span> 8; <span class="phpComment">// ini karakter minimal untuk text
</span>
$min_nama <span class="phpOperator">=</span> 3; <span class="phpComment">// ini karakter minimal untuk nama
</span>
<span class="phpOperator">&lt;</span>span id<span class="phpOperator">=</span><span class="phpString">"more-117"</span><span class="phpOperator">&gt;</span><span class="phpOperator">&lt;</span>/span<span class="phpOperator">&gt;</span>
$berapa_baris <span class="phpOperator">=</span> 3; <span class="phpComment">// ini jumlah berapa baris text yang akan dimunculkan
</span>$buka_data <span class="phpOperator">=</span> <span class="phpFunction">file</span><span class="phpOperator">(</span>$tempat_data<span class="phpOperator">)</span><span class="phpText">;</span>
$nama <span class="phpOperator">=</span> <span class="phpFunction">htmlspecialchars</span><span class="phpOperator">(</span><span class="phpFunction">addslashes</span><span class="phpOperator">(</span><span class="phpScriptVar">$_POST</span><span class="phpOperator">[</span><span class="phpString">'nama'</span><span class="phpOperator">]</span><span class="phpOperator">)</span><span class="phpOperator">)</span><span class="phpText">;</span>
$text <span class="phpOperator">=</span> <span class="phpScriptVar">$_POST</span><span class="phpOperator">[</span><span class="phpString">'text'</span><span class="phpOperator">]</span><span class="phpText">;</span>
<span class="phpKeyword">
if </span><span class="phpOperator">(</span><span class="phpFunction">empty</span><span class="phpOperator">(</span>$nama<span class="phpOperator">)</span><span class="phpOperator">)</span>
<span class="phpOperator">{</span>
<span class="phpFunction">die</span> <span class="phpOperator">(</span><span class="phpString">'Empty name'</span><span class="phpOperator">)</span><span class="phpText">;</span>
exit; <span class="phpOperator">}</span>
<span class="phpKeyword">
if </span><span class="phpOperator">(</span><span class="phpFunction">empty</span><span class="phpOperator">(</span>$text<span class="phpOperator">)</span><span class="phpOperator">)</span>
<span class="phpOperator">{</span>
<span class="phpFunction">die</span> <span class="phpOperator">(</span><span class="phpString">'Empty text'</span><span class="phpOperator">)</span><span class="phpText">;</span>
exit; <span class="phpOperator">}</span>
<span class="phpKeyword">
if </span><span class="phpOperator">(</span><span class="phpFunction">strlen</span><span class="phpOperator">(</span>$nama<span class="phpOperator">)</span> <span class="phpOperator">&gt;</span> $max_nama<span class="phpOperator">)</span>
<span class="phpOperator">{</span>
<span class="phpFunction">die</span> <span class="phpOperator">(</span><span class="phpString">'namanya terlalu panjang, maksimal karakter adalah '</span>.$max_nama<span class="phpOperator">)</span><span class="phpText">;</span>
exit;
<span class="phpOperator">}</span>
<span class="phpKeyword">
if </span><span class="phpOperator">(</span><span class="phpFunction">strlen</span><span class="phpOperator">(</span>$text<span class="phpOperator">)</span> <span class="phpOperator">&gt;</span> $max_karakter<span class="phpOperator">)</span>
<span class="phpOperator">{</span>
<span class="phpFunction">die</span> <span class="phpOperator">(</span><span class="phpString">'text nya terlalu panjang, maksimal karakter adalah'</span>.$max_karakter<span class="phpOperator">)</span><span class="phpText">;</span>
exit;
<span class="phpOperator">}</span>
<span class="phpKeyword">
if </span><span class="phpOperator">(</span><span class="phpFunction">strlen</span><span class="phpOperator">(</span>$nama<span class="phpOperator">)</span> <span class="phpOperator">&lt;</span> $min_nama<span class="phpOperator">)</span>
<span class="phpOperator">{</span>
<span class="phpFunction">die</span> <span class="phpOperator">(</span><span class="phpString">'namanya terlalu pendek, minimal karakter adalah '</span>.$min_nama<span class="phpOperator">)</span><span class="phpText">;</span>
exit;
<span class="phpOperator">}</span>
<span class="phpKeyword">
if </span><span class="phpOperator">(</span><span class="phpFunction">strlen</span><span class="phpOperator">(</span>$text<span class="phpOperator">)</span> <span class="phpOperator">&lt;</span> $min_karakter<span class="phpOperator">)</span>
<span class="phpOperator">{</span>
<span class="phpFunction">die</span> <span class="phpOperator">(</span><span class="phpString">'text nya terlalu pendek, minimal karakter adalah'</span>.$min_karakter<span class="phpOperator">)</span><span class="phpText">;</span>
exit;
<span class="phpOperator">}</span>
<span class="phpKeyword">
if </span><span class="phpOperator">(</span><span class="phpOperator">!</span><span class="phpFunction">empty</span><span class="phpOperator">(</span>$nama<span class="phpOperator">)</span> &#038;amp<span class="phpText">;</span>&#038;amp<span class="phpText">;</span> <span class="phpOperator">!</span><span class="phpFunction">empty</span><span class="phpOperator">(</span>$text<span class="phpOperator">)</span><span class="phpOperator">)</span>
<span class="phpOperator">{</span>
$text <span class="phpOperator">=</span> <span class="phpFunction">preg_replace</span><span class="phpOperator">(</span><span class="phpString">"<span class="phpComment"><span class="phpComment">//span</span><span class="phpOperator">&gt;</span>, "</span><span class="phpOperator">&lt;</span><span class="phpString">", $text<span class="phpOperator">)</span><span class="phpText">;</span>
</span>$text <span class="phpOperator">=</span> <span class="phpFunction">preg_replace</span><span class="phpOperator">(</span>"</span>/<span class="phpOperator">&gt;</span>/<span class="phpString">", "</span><span class="phpOperator">&gt;</span><span class="phpString">", $text<span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpKeyword">
if </span><span class="phpOperator">(</span><span class="phpFunction">strlen</span><span class="phpOperator">(</span>$text<span class="phpOperator">)</span> <span class="phpOperator">&lt;</span> $max_karakter<span class="phpOperator">)</span>
<span class="phpOperator">{</span>
$tulis <span class="phpOperator">=</span> <span class="phpFunction">fopen</span> <span class="phpOperator">(</span>$tempat_data, "</span>w<span class="phpString">"<span class="phpOperator">)</span><span class="phpText">;</span>
$text <span class="phpOperator">=</span> <span class="phpFunction">stripslashes</span><span class="phpOperator">(</span>$text<span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpFunction">fwrite</span> <span class="phpOperator">(</span>$tulis, "</span>$nama<span class="phpOperator">:</span> $text
\n<span class="phpString">"<span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpKeyword">
for </span><span class="phpOperator">(</span>$i <span class="phpOperator">=</span> 0; $i <span class="phpOperator">&lt;</span> $berapa_baris<span class="phpText">;</span> $i<span class="phpOperator"><span class="phpOperator">+</span><span class="phpOperator">+</span></span><span class="phpOperator">)</span>
<span class="phpOperator">{</span>
<span class="phpFunction">fwrite</span> <span class="phpOperator">(</span>$tulis, $buka_data<span class="phpOperator">[</span>$i<span class="phpOperator">]</span><span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpOperator">}</span>
<span class="phpOperator">}</span>
<span class="phpFunction">fclose</span><span class="phpOperator">(</span>$tulis<span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpOperator">}</span>
<span class="phpOperator">}</span>
<span class="phpKeyword"><span class="phpKeyword">
include<span class="phpOperator">(</span></span></span>"</span>data.txt<span class="phpString">"<span class="phpOperator">)</span><span class="phpText">;</span> <span class="phpComment">//<span class="phpKeyword"><span class="phpKeyword"> include </span></span>disini maksudnya adalah untuk menampilkan shout yang ada
</span>
<span class="phpFunction">echo</span> "</span>
\n<span class="phpString">"<span class="phpText">;</span>
<span class="phpComment">// Dibawah ini adalah form nya
</span><span class="phpFunction">echo</span> "</span>
Nama<span class="phpOperator">:</span>
Text<span class="phpOperator">:</span>&quot;<span class="phpText">;</span>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.arisyi-design.web.id/php-tutorial/membuat-shoutbox-dengan-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Membuat Counter dengan PHP</title>
		<link>http://www.arisyi-design.web.id/php-tutorial/membuat-counter-dengan-php/</link>
		<comments>http://www.arisyi-design.web.id/php-tutorial/membuat-counter-dengan-php/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 17:39:18 +0000</pubDate>
		<dc:creator>azimah</dc:creator>
				<category><![CDATA[PHP tutorial]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php script]]></category>

		<guid isPermaLink="false">http://www.arisyi-design.web.id/blog/?p=115</guid>
		<description><![CDATA[Pada artikel kali ini, aku akan men-share sedikit script PHP untuk membuat counter sederhana seperti yang terdapat di bagian footer website ini. Bagi kamu yang udah ngerasa expert, sebaiknya berhenti membaca sekarang juga, karna dari judulnya, kamu seharusnya tau bahwa kita cuma mo bikin counter simple. Cara kerja counter ini kurang lebih kayak gini: halaman [...]]]></description>
			<content:encoded><![CDATA[<p>Pada artikel kali ini, aku akan men-share sedikit script PHP untuk membuat counter sederhana seperti yang terdapat di bagian footer website ini. Bagi kamu yang udah ngerasa expert, sebaiknya berhenti membaca sekarang juga, karna dari judulnya, kamu seharusnya tau bahwa kita cuma mo bikin counter simple. Cara kerja counter ini kurang lebih kayak gini: halaman utama dibuka-&gt;input ke database-&gt;Output berupa jumlah records dari table yang dijadikan counter. OK, lets do this&#8230;<br />
Pertama, buatlah table dengan nama counter pada database MySQL kamu dengan field sebagai berikut:<br />
ip<br />
user_agent<br />
tanggal<br />
Sekarang, tambahkan script berikut pada halaman utama website kamu. Ingat, tempatkan script ini di bagian paling atas sebelum tag</p>
<p><span id="more-115"></span></p>
<pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span>
$ip<span class="phpOperator">=</span><span class="phpFunction">getenv</span><span class="phpOperator">(</span><span class="htmlText">remote_addr</span><span class="phpOperator">)</span><span class="phpText">;</span>
$<span class="phpFunction">date</span><span class="phpOperator">=</span><span class="phpFunction">get<span class="phpFunction">date</span></span><span class="phpOperator">(</span><span class="phpFunction">date</span><span class="phpOperator">(</span>“U”<span class="phpOperator">)</span><span class="phpOperator">)</span><span class="phpText">;</span>
$day<span class="phpOperator">=</span>$<span class="phpFunction">date</span><span class="phpOperator">[</span><span class="htmlText">mday</span><span class="phpOperator">]</span><span class="phpText">;</span>
$month=$<span class="phpFunction">date</span><span class="phpOperator">[</span><span class="htmlText">month</span><span class="phpOperator">]</span><span class="phpText">;</span>
$year=$<span class="phpFunction">date</span><span class="phpOperator">[</span><span class="htmlText">year</span><span class="phpOperator">]</span><span class="phpText">;</span>
<span class="phpKeyword">
if </span><span class="phpOperator">(</span><span class="phpOperator">!</span><span class="phpFunction">isset</span><span class="phpOperator">(</span><span class="phpScriptVar">$_COOKIE</span><span class="phpOperator">[</span><span class="phpString">"visitor"</span><span class="phpOperator">]</span><span class="phpOperator">)</span><span class="phpOperator">)</span>
<span class="phpOperator">{</span>
<span class="phpFunction">setcookie</span><span class="phpOperator">(</span>“visitor”, “$ip”, <span class="phpFunction">time</span><span class="phpOperator">(</span><span class="phpOperator">)</span> <span class="phpOperator">+</span><span class="htmlText">3600</span><span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpFunction">mysql_connect</span><span class="phpOperator">(</span>“localhost”, “user”, “password”<span class="phpOperator">)</span><span class="phpText">;</span> <span class="phpComment">//sesuaikan host, user, dan password-nya <span class="phpOperator">!</span>
</span><span class="phpFunction">mysql_select_db</span><span class="phpOperator">(</span>“nama_db”<span class="phpOperator">)</span><span class="htmlText"> or </span><span class="phpFunction">die</span><span class="phpOperator">(</span><span class="phpFunction">mysql_error</span><span class="phpOperator">(</span><span class="phpOperator">)</span><span class="phpOperator">)</span><span class="phpText">;</span> <span class="phpComment">//sesuaikan nama database-nya
</span>
<span class="phpFunction">mysql_query</span><span class="phpOperator">(</span>“INSERT INTO counter<span class="phpOperator">(</span>ip, user_agent, tanggal<span class="phpOperator">)</span><span class="htmlText"> VALUES</span><span class="phpOperator">(</span>‘$ip’, ‘<span class="phpScriptVar">$_SERVER</span><span class="phpOperator">[</span><span class="htmlText">HTTP_USER_AGENT</span><span class="phpOperator">]</span>‘, ‘$day/$month/$year’<span class="phpOperator">)</span>”<span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpOperator">}</span>
<span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span>
</pre>
<p>Pada code di atas, saat pertama kalo diakses halaman website kita akan membuat cookies dengan nama visitor yang isinya IP address dari visitor kita. Kalo cookies belom diset, maka record table Counter akan ditambah satu.<br />
Untuk mendapatkan jumlah pengunjung, kita tinggal menghitung berapa jumlah records dari table Counter, gunakan code berikut:</p>
<pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span>
$qhit<span class="phpOperator">=</span><span class="phpFunction">mysql_query</span><span class="phpOperator">(</span><span class="phpString">"SELECT * FROM counter"</span><span class="phpOperator">)</span><span class="phpText">;</span>
$hit<span class="phpOperator">=</span><span class="phpFunction">mysql_num_rows</span><span class="phpOperator">(</span>$qhit<span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpFunction">echo</span> <span class="phpString">"
Kamu adalah pengunjung ke<span class="phpOperator">:</span> $hit
"</span><span class="phpText">;</span>
<span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span>
</pre>
<p>Sekarang, kamu tinggal meletakkan code di atas untuk menampilkan berapa jumlah pengunjung website kamu.</p>
<p>Semoga bermanfaat dan mohon dimaafkan kalo ada kesalahan.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.arisyi-design.web.id/php-tutorial/membuat-counter-dengan-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
