<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Getting real IP address in PHP</title>
	<atom:link href="http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html/feed" rel="self" type="application/rss+xml" />
	<link>http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html</link>
	<description>Useful Tutorials, Scripts , Tips, and Resources for all PHP and Ajax beginners and experts .</description>
	<lastBuildDate>Tue, 07 Feb 2012 08:10:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: PHP ile IP Adresi Ö?renme&#160;&#124;&#160;Ali OKTAY</title>
		<link>http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html/comment-page-2#comment-5642</link>
		<dc:creator>PHP ile IP Adresi Ö?renme&#160;&#124;&#160;Ali OKTAY</dc:creator>
		<pubDate>Sun, 19 Sep 2010 21:31:53 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/getting-real-ip-address-in-php/#comment-5642</guid>
		<description>[...] Kaynak: http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html [...]</description>
		<content:encoded><![CDATA[<p>[...] Kaynak: <a href="http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html" rel="nofollow">http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: json</title>
		<link>http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html/comment-page-2#comment-5354</link>
		<dc:creator>json</dc:creator>
		<pubDate>Mon, 12 Apr 2010 13:56:38 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/getting-real-ip-address-in-php/#comment-5354</guid>
		<description>Ben, calm down, this is a topic about PHP and ip addresses, not MAC addresses. If you are coding licensed works using PHP you are indeed an even bigger arse hole! You rant how you keep track of IP addresses, both public and private combinations in order to keep track of licensing.... don&#039;t make me laugh! If that&#039;s your licensing security solution it&#039;s dumb in more ways than I can begin to break down. MAC codes I can see but IP, laughable!!!! Flame me all you like though kid as you obviously know more than someone with as much experienced as me ;) Commercial developer with PHP/Mysql/Linux/Apache since 1996.</description>
		<content:encoded><![CDATA[<p>Ben, calm down, this is a topic about PHP and ip addresses, not MAC addresses. If you are coding licensed works using PHP you are indeed an even bigger arse hole! You rant how you keep track of IP addresses, both public and private combinations in order to keep track of licensing&#8230;. don&#8217;t make me laugh! If that&#8217;s your licensing security solution it&#8217;s dumb in more ways than I can begin to break down. MAC codes I can see but IP, laughable!!!! Flame me all you like though kid as you obviously know more than someone with as much experienced as me <img src='http://roshanbh.com.np/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Commercial developer with PHP/Mysql/Linux/Apache since 1996.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Motyar</title>
		<link>http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html/comment-page-2#comment-5296</link>
		<dc:creator>Motyar</dc:creator>
		<pubDate>Tue, 23 Mar 2010 15:22:32 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/getting-real-ip-address-in-php/#comment-5296</guid>
		<description>@AnilKumarPanigrahi See they are using JAVA for it, download the class  http://www.find-ip-address.org/MyAddress.class  and use it as they are using. Its simple</description>
		<content:encoded><![CDATA[<p>@AnilKumarPanigrahi See they are using JAVA for it, download the class  <a href="http://www.find-ip-address.org/MyAddress.class" rel="nofollow">http://www.find-ip-address.org/MyAddress.class</a>  and use it as they are using. Its simple</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anil Kumar Panigrahi</title>
		<link>http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html/comment-page-2#comment-5292</link>
		<dc:creator>Anil Kumar Panigrahi</dc:creator>
		<pubDate>Tue, 23 Mar 2010 08:42:23 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/getting-real-ip-address-in-php/#comment-5292</guid>
		<description>Hi Rohan,

I got the real IP address, but i need Router IP Address (LAN IP) which is like http://www.find-ip-address.org/ , can you please suggest how to get the code using php code.

Thank you in advance.</description>
		<content:encoded><![CDATA[<p>Hi Rohan,</p>
<p>I got the real IP address, but i need Router IP Address (LAN IP) which is like <a href="http://www.find-ip-address.org/" rel="nofollow">http://www.find-ip-address.org/</a> , can you please suggest how to get the code using php code.</p>
<p>Thank you in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html/comment-page-2#comment-5291</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Mon, 22 Mar 2010 14:34:40 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/getting-real-ip-address-in-php/#comment-5291</guid>
		<description>TRAVIS is the kind of person that uses TEMPLATE MONSTER to do most of his work so that is why he would NEVER have to license something! IF ANYONE LISTENS TO TRAVIS YOU WILL FAIL HE IS AN DUMB A$$! 

Explain to us TRAVIS how you license you PHP web applications? You don&#039;t and you might script a little, but you are NOT a WEB APPLICATION DEVELOPER! I DO COLLECT THE PUBLIC IP AND THEN ALL THE LOCAL IP ADDRESSES AND MANAGE THE NUMBER OF TIMES A USER LOGS INTO MY APP USING A COMBINATION OF LOCAL IP, MAC ADDRESS AND USER INFO! MAN YOU ARE A DUMB A$$!</description>
		<content:encoded><![CDATA[<p>TRAVIS is the kind of person that uses TEMPLATE MONSTER to do most of his work so that is why he would NEVER have to license something! IF ANYONE LISTENS TO TRAVIS YOU WILL FAIL HE IS AN DUMB A$$! </p>
<p>Explain to us TRAVIS how you license you PHP web applications? You don&#8217;t and you might script a little, but you are NOT a WEB APPLICATION DEVELOPER! I DO COLLECT THE PUBLIC IP AND THEN ALL THE LOCAL IP ADDRESSES AND MANAGE THE NUMBER OF TIMES A USER LOGS INTO MY APP USING A COMBINATION OF LOCAL IP, MAC ADDRESS AND USER INFO! MAN YOU ARE A DUMB A$$!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html/comment-page-2#comment-5290</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Mon, 22 Mar 2010 14:23:33 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/getting-real-ip-address-in-php/#comment-5290</guid>
		<description>Yes, I see you say WEB PAGE OWNER and since you don&#039;t need to license the WEBSITE then it is no big deal! You must be ENTRY LEVEL!!!!</description>
		<content:encoded><![CDATA[<p>Yes, I see you say WEB PAGE OWNER and since you don&#8217;t need to license the WEBSITE then it is no big deal! You must be ENTRY LEVEL!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html/comment-page-2#comment-5289</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Mon, 22 Mar 2010 14:22:25 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/getting-real-ip-address-in-php/#comment-5289</guid>
		<description>That was for you TRAVIS! Someone told you it was useless so you repeated it! D@MN you  are STUPID!</description>
		<content:encoded><![CDATA[<p>That was for you TRAVIS! Someone told you it was useless so you repeated it! D@MN you  are STUPID!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html/comment-page-2#comment-5288</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Mon, 22 Mar 2010 14:20:51 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/getting-real-ip-address-in-php/#comment-5288</guid>
		<description>Actually your an idiot because if you have the public IP it licenses the entire site! So you must write really stupid code! your an idiot for not even knowing why someone would want the local IP! So you don&#039;t really write applications you just work with web sites! So shut up idiot and continue to to write you TRASH code!</description>
		<content:encoded><![CDATA[<p>Actually your an idiot because if you have the public IP it licenses the entire site! So you must write really stupid code! your an idiot for not even knowing why someone would want the local IP! So you don&#8217;t really write applications you just work with web sites! So shut up idiot and continue to to write you TRASH code!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oyunlar1</title>
		<link>http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html/comment-page-2#comment-5280</link>
		<dc:creator>oyunlar1</dc:creator>
		<pubDate>Sat, 20 Mar 2010 07:59:14 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/getting-real-ip-address-in-php/#comment-5280</guid>
		<description>thanks.. used this in my webpage. its worked for me.</description>
		<content:encoded><![CDATA[<p>thanks.. used this in my webpage. its worked for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html/comment-page-2#comment-5262</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Wed, 17 Mar 2010 08:33:12 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/getting-real-ip-address-in-php/#comment-5262</guid>
		<description>Thanks, very simple, fast and right way to get client`s ip adress. Got to use it in my scripts.</description>
		<content:encoded><![CDATA[<p>Thanks, very simple, fast and right way to get client`s ip adress. Got to use it in my scripts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: El Blog de JF &#187; Obtener Dirección ip en PHP</title>
		<link>http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html/comment-page-2#comment-5051</link>
		<dc:creator>El Blog de JF &#187; Obtener Dirección ip en PHP</dc:creator>
		<pubDate>Sat, 16 Jan 2010 20:38:48 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/getting-real-ip-address-in-php/#comment-5051</guid>
		<description>[...] Fuente &#124; http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html [...]</description>
		<content:encoded><![CDATA[<p>[...] Fuente | <a href="http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html" rel="nofollow">http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Travis</title>
		<link>http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html/comment-page-2#comment-4800</link>
		<dc:creator>Travis</dc:creator>
		<pubDate>Tue, 10 Nov 2009 03:49:32 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/getting-real-ip-address-in-php/#comment-4800</guid>
		<description>Ben:  You&#039;re an idiot, this script gets the physical location IP address for geostatistics.  The person&#039;s private IP (192.168.0.x) means absolutely nothing to a web page owner.</description>
		<content:encoded><![CDATA[<p>Ben:  You&#8217;re an idiot, this script gets the physical location IP address for geostatistics.  The person&#8217;s private IP (192.168.0.x) means absolutely nothing to a web page owner.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roger</title>
		<link>http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html/comment-page-2#comment-4799</link>
		<dc:creator>Roger</dc:creator>
		<pubDate>Tue, 10 Nov 2009 01:34:58 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/getting-real-ip-address-in-php/#comment-4799</guid>
		<description>I did the following, however, please note that I required the VPN detection and simply return VPN for local ips.

function getRealIP($fakeip=false) {
    	
		$ip = (!empty($_SERVER[&#039;HTTP_CLIENT_IP&#039;])) ? (!empty($_SERVER[&#039;HTTP_X_FORWARDED_FOR&#039;])) ? $_SERVER[&#039;HTTP_CLIENT_IP&#039;] : preg_replace(&#039;/(?:,.*)/&#039;, &#039;&#039;, $_SERVER[&#039;HTTP_X_FORWARDED_FOR&#039;]):$_SERVER[&#039;REMOTE_ADDR&#039;];
		$ip = (!$fakeip) ? $ip:$fakeip;
		
		// local check class b and c
		$patterns = array(&quot;/(192).(168).(\d+).(\d+)/i&quot;,&quot;/(10).(\d+).(\d+).(\d+)/i&quot;);
		foreach($patterns as $pattern) {
			if(preg_match($pattern,$ip)) {
				return &quot;VPN&quot;;
			}
		}
		// local check class a
		$parts = explode(&quot;.&quot;,$ip);
		if($parts[0]==172 &amp;&amp; ($parts[1]&gt;15 &#124;&#124; $parts[1]&lt;32)) {
			return &quot;VPN&quot;;
		}
		return trim($ip);
    }</description>
		<content:encoded><![CDATA[<p>I did the following, however, please note that I required the VPN detection and simply return VPN for local ips.</p>
<p>function getRealIP($fakeip=false) {</p>
<p>		$ip = (!empty($_SERVER['HTTP_CLIENT_IP'])) ? (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) ? $_SERVER['HTTP_CLIENT_IP'] : preg_replace(&#8216;/(?:,.*)/&#8217;, &#8221;, $_SERVER['HTTP_X_FORWARDED_FOR']):$_SERVER['REMOTE_ADDR'];<br />
		$ip = (!$fakeip) ? $ip:$fakeip;</p>
<p>		// local check class b and c<br />
		$patterns = array(&#8220;/(192).(168).(\d+).(\d+)/i&#8221;,&#8221;/(10).(\d+).(\d+).(\d+)/i&#8221;);<br />
		foreach($patterns as $pattern) {<br />
			if(preg_match($pattern,$ip)) {<br />
				return &#8220;VPN&#8221;;<br />
			}<br />
		}<br />
		// local check class a<br />
		$parts = explode(&#8220;.&#8221;,$ip);<br />
		if($parts[0]==172 &amp;&amp; ($parts[1]&gt;15 || $parts[1]&lt;32)) {<br />
			return &quot;VPN&quot;;<br />
		}<br />
		return trim($ip);<br />
    }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Goldendevelopersworld.com &#187; Blog Archive &#187; 10 code snippets for PHP developers</title>
		<link>http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html/comment-page-2#comment-4790</link>
		<dc:creator>Goldendevelopersworld.com &#187; Blog Archive &#187; 10 code snippets for PHP developers</dc:creator>
		<pubDate>Thu, 05 Nov 2009 17:20:20 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/getting-real-ip-address-in-php/#comment-4790</guid>
		<description>[...] Get IP address Returns the real IP address of a visitor, even when connecting via a proxy. Source : http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html [...]</description>
		<content:encoded><![CDATA[<p>[...] Get IP address Returns the real IP address of a visitor, even when connecting via a proxy. Source : <a href="http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html" rel="nofollow">http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bucabay</title>
		<link>http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html/comment-page-2#comment-4748</link>
		<dc:creator>bucabay</dc:creator>
		<pubDate>Wed, 28 Oct 2009 08:17:15 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/getting-real-ip-address-in-php/#comment-4748</guid>
		<description>&quot;is there a way in php of knowing if the email address supplied by the user is existing?&quot;

Yes, take a look at this PHP library - http://code.google.com/p/php-smtp-email-validation/
It validates email addresses through SMTP.</description>
		<content:encoded><![CDATA[<p>&#8220;is there a way in php of knowing if the email address supplied by the user is existing?&#8221;</p>
<p>Yes, take a look at this PHP library &#8211; <a href="http://code.google.com/p/php-smtp-email-validation/" rel="nofollow">http://code.google.com/p/php-smtp-email-validation/</a><br />
It validates email addresses through SMTP.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 2/19 queries in 0.023 seconds using disk: basic
Object Caching 405/405 objects using disk: basic

Served from: roshanbh.com.np @ 2012-02-09 05:53:08 -->
