<?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>Altmint Blog &#187; PHP</title>
	<atom:link href="http://blog.altmint.com/category/php/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.altmint.com</link>
	<description></description>
	<lastBuildDate>Mon, 24 Oct 2011 09:11:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>PHP FAQs</title>
		<link>http://blog.altmint.com/php-faqs</link>
		<comments>http://blog.altmint.com/php-faqs#comments</comments>
		<pubDate>Sun, 21 Aug 2011 08:59:18 +0000</pubDate>
		<dc:creator>Kongoti</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.altmint.com/?p=332</guid>
		<description><![CDATA[What is PHP? PHP is an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web developers to write dynamically generated pages quickly. What does PHP stand for? PHP stands for PHP: Hypertext <a href="http://blog.altmint.com/php-faqs">Continue Reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<h2>What is PHP?</h2>
<p>PHP is an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web developers to write dynamically generated pages quickly.</p>
<h2>What does PHP stand for?</h2>
<p>PHP stands for PHP: Hypertext Preprocessor. This confuses many people because the first word of the acronym is the acronym. This type of acronym is called a recursive acronym. For more information, the curious can visit » Free On-Line Dictionary of Computing or the » Wikipedia entry on recursive acronyms.</p>
<h2>What is the relation between the versions?</h2>
<p>PHP/FI 2.0 is an early and no longer supported version of PHP. PHP 3 is the successor to PHP/FI 2.0 and is a lot nicer. PHP 5 is the current generation of PHP, which uses the » Zend engine 2 which, among other things, offers many additional OOP features.</p>
<h2>Can I run several versions of PHP at the same time?</h2>
<p>Yes. See the INSTALL file that is included in the PHP source distribution.</p>
<h2>What are the differences between PHP 4 and PHP 5?</h2>
<p>While PHP 5 was purposely designed to be as compatible as possible with previous versions, there are some significant changes. Some of these changes include:</p>
<p>A new OOP model based on the Zend Engine 2.0<br />
A new extension for improved MySQL support<br />
Built-in native support for SQLite<br />
A new error reporting constant, E_STRICT, for run-time code suggestions<br />
A host of new functions to simplify code authoring (and reduce the need to write your own functions for many common procedures)</p>
<h2>I think I found a bug! Who should I tell?</h2>
<p>You should go to the PHP Bug Database and make sure the bug isn&#8217;t a known bug. If you don&#8217;t see it in the database, use the reporting form to report the bug. It is important to use the bug database instead of just sending an email to one of the mailing lists because the bug will have a tracking number assigned and it will then be possible for you to go back later and check on the status of the bug. The bug database can be found at » http://bugs.php.net/.</p>
<p>Source: <a href="http://www.php.net/manual/en/faq.general.php" rel="nofollow" target="_blank">http://www.php.net/manual/en/faq.general.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.altmint.com/php-faqs/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Php Frameworks</title>
		<link>http://blog.altmint.com/php-frameworks</link>
		<comments>http://blog.altmint.com/php-frameworks#comments</comments>
		<pubDate>Sat, 20 Aug 2011 03:31:05 +0000</pubDate>
		<dc:creator>Kongoti</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.altmint.com/?p=324</guid>
		<description><![CDATA[Php Frameworks Zend                http://www.zend.com/en/ Code Igniter   http://codeigniter.com/ Yii                    http://www.yiiframework.com/ CakePHP        http://cakephp.org/ Symfony         http://symfony.com/ Silex                http://silex-project.org/ FuelPHP         http://fuelphp.com/ Kohana           http://kohanaframework.org/ ThinkPHP       http://www.thinkphp.cn/ (Chinese) phpRaise        http://code.google.com/p/phpraise Tlalokes          http://tlalokes.org]]></description>
			<content:encoded><![CDATA[<p>Php Frameworks</p>
<p>Zend                http://www.zend.com/en/<br />
Code Igniter   http://codeigniter.com/<br />
Yii                    http://www.yiiframework.com/<br />
CakePHP        http://cakephp.org/<br />
Symfony         http://symfony.com/<br />
Silex                http://silex-project.org/<br />
FuelPHP         http://fuelphp.com/<br />
Kohana           http://kohanaframework.org/<br />
ThinkPHP       http://www.thinkphp.cn/ (Chinese)<br />
phpRaise        http://code.google.com/p/phpraise<br />
Tlalokes          http://tlalokes.org</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.altmint.com/php-frameworks/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP vs. Ruby on Rails</title>
		<link>http://blog.altmint.com/php-vs-ruby-on-rails</link>
		<comments>http://blog.altmint.com/php-vs-ruby-on-rails#comments</comments>
		<pubDate>Tue, 01 Feb 2011 11:28:47 +0000</pubDate>
		<dc:creator>Kongoti</dc:creator>
				<category><![CDATA[Altmint]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php vs ror]]></category>
		<category><![CDATA[ruby on rails vs php]]></category>
		<category><![CDATA[ruby vs php]]></category>

		<guid isPermaLink="false">http://blog.altmint.com/?p=258</guid>
		<description><![CDATA[Is it really worth my while to compare Ruby on Rails(RoR) and php?  They are completely different technologies.  PHP is a glorified scripting language.  Ruby on Rails is a frame work for the Ruby language. The question should be Ruby vs PHP or  RoR Vs CakePhP/ZEND/Yii. PHP logo RoR logo PHP and Ruby on Rails <a href="http://blog.altmint.com/php-vs-ruby-on-rails">Continue Reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Is it really worth my while to compare Ruby on Rails(RoR) and php?  They are completely different technologies.  PHP is a glorified scripting language.  Ruby on Rails is a frame work for the Ruby language. The question should be <strong>Ruby vs PHP</strong> or  <strong>RoR Vs CakePhP/ZEND/Yii.</strong></p>
<div class="mceTemp" style="text-align: justify;">
<dl id="attachment_260" class="wp-caption alignleft" style="width: 245px;">
<dt class="wp-caption-dt"><a href="http://blog.altmint.com/wp-content/uploads/2011/02/php.jpg1.gif"><img class="size-medium wp-image-260" title="php.jpg" src="http://blog.altmint.com/wp-content/uploads/2011/02/php.jpg1-300x223.gif" alt="PHP logo for PHP VS ROR" width="235" height="147" /></a></dt>
<dd class="wp-caption-dd">PHP logo</dd>
</dl>
</div>
<div class="mceTemp" style="text-align: justify;">
<dl id="attachment_262" class="wp-caption alignright" style="width: 233px;">
<dt class="wp-caption-dt"><a href="http://blog.altmint.com/wp-content/uploads/2011/02/ruby1.jpg"><img class="size-medium wp-image-262 " title="RoR" src="http://blog.altmint.com/wp-content/uploads/2011/02/ruby1-300x297.jpg" alt="ror logo for php vs ror" width="223" height="151" /></a></dt>
<dd class="wp-caption-dd">RoR logo</dd>
</dl>
</div>
<p style="text-align: justify;">PHP and Ruby on Rails both have their very dedicated followers.  It really depends on what sort of development you would like to do. Having experience with both, anyone can say go with what you are more familiar with, and with what your developers are capable of.  It is much easier to find PHP programmers than Ruby/Rails developers.  Deployment and server configuration are easy with Php.</p>
<p style="text-align: justify;">Many argue that RoR performs better,  but then again Facebook and google uses PHP, so it can’t be that great. My preference lays in favour of PHP, because I prefer the C style syntax, although Ruby has many great advantages in its code (namely many shortcuts for iterations).</p>
<p style="text-align: justify;">It is difficult to compare both but we can conclude &#8220;While Ruby on Rails has some great features; the market has already declared the winner to be PHP.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.altmint.com/php-vs-ruby-on-rails/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to check Link popularity or back links for a domain in php</title>
		<link>http://blog.altmint.com/how-to-check-link-popularity-or-back-links-for-a-domain-in-php</link>
		<comments>http://blog.altmint.com/how-to-check-link-popularity-or-back-links-for-a-domain-in-php#comments</comments>
		<pubDate>Tue, 20 Apr 2010 10:06:04 +0000</pubDate>
		<dc:creator>Kongoti</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[back links]]></category>
		<category><![CDATA[back links in google]]></category>
		<category><![CDATA[back links in yahoo]]></category>
		<category><![CDATA[check back links script in php]]></category>
		<category><![CDATA[link popularity]]></category>
		<category><![CDATA[links popularity in yahoo and google]]></category>

		<guid isPermaLink="false">http://blog.altmint.com/?p=147</guid>
		<description><![CDATA[How to check Link popularity or back links for a given domain in php? Link popularity is a measure of the quantity and quality of other web sites that link to a specific site on the World Wide Web. It is an example of the move by search engines towards off-the-page-criteria to determine quality content. <a href="http://blog.altmint.com/how-to-check-link-popularity-or-back-links-for-a-domain-in-php">Continue Reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><strong>How to check Link popularity or back links for a given domain in php?</strong></p>
<p style="text-align: justify;"><strong>Link popularity</strong> is a measure of the quantity and quality of other web sites that link to a specific site on the World Wide Web. It is an example of the move by search engines towards off-the-page-criteria to determine quality content. In theory, off-the-page-criteria adds the aspect of impartiality to search engine rankings. Link popularity plays an important role in the visibility of a web site among the top of the search results. Indeed, some search engines require at least one or more links coming to a web site, otherwise they will drop it from their index.</p>
<p style="text-align: justify;">Search engines such as Google use a special link analysis system to rank web pages. Citations from other WWW authors help to define a site&#8217;s reputation. The philosophy of link popularity is that important sites will attract many links. Content-poor sites will have difficulty attracting any links. Link popularity assumes that not all incoming links are equal, as an inbound link from a major directory carries more weight than an inbound link from an obscure personal home page. In other words, the quality of incoming links counts more than sheer numbers of them.<sup id="cite_ref-Wiep.net_8-0"><a href="http://en.wikipedia.org/wiki/Link_popularity#cite_note-Wiep.net-8"></a></sup></p>
<p style="text-align: justify;"><span>We can know Link popularity in google and Yahoo for given domain name in PHP. </span></p>
<p style="text-align: justify;"><span>It can be achievd by some simple logic and here is that logic for you.</span></p>
<p style="text-align: justify;"><span>
<pre class="brush: php">&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;?php
// Setting the URL variable
$link = $_POST[&#039;url&#039;];&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;// Google Backlinks
function fetch_google($uri) {
$uri = trim(eregi_replace(&#039;http://&#039;, &#039;&#039;, $uri)); $uri = trim(eregi_replace(&#039;http&#039;, &#039;&#039;, $uri));
$url = &#039;http://www.google.com/search?hl=en&amp;amp;amp;amp;lr=&amp;amp;amp;amp;ie=UTF-8&amp;amp;amp;amp;q=links:&#039;.$uri;
$v = file_get_contents($url);
preg_match(&#039;/of about \&lt;b\&gt;(.*?)\&lt;\/b\&gt;/si&#039;,$v,$r);
return ($r[1]) ? $r[1] : &#039;0&#039;;
}&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;// Yahoo Inlinks
function fetch_yahoo($uri) {
$uri = trim(eregi_replace(&#039;http://&#039;, &#039;&#039;, $uri)); $uri = trim(eregi_replace(&#039;http&#039;, &#039;&#039;, $uri));
$url = &#039;http://siteexplorer.search.yahoo.com/search?p=http://&#039;.$uri.&#039;&amp;amp;amp;amp;bwm=i&amp;amp;amp;amp;bwmf=s&amp;amp;amp;amp;bwmo=&amp;amp;amp;amp;fr2=seo-rd-se&#039;;
$v = file_get_contents($url);&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;preg_match(&#039;/Inlinks \((.*?)\)/si&#039;,$v,$r);
return ($r[1]) ? $r[1] : &#039;0&#039;;
}&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;// Alexa Rating
function fetch_alexa($uri){
$uri = trim(eregi_replace(&#039;http://&#039;, &#039;&#039;, $uri)); $uri = trim(eregi_replace(&#039;http&#039;, &#039;&#039;, $uri));
$url = &#039;http://data.alexa.com/data?cli=10&amp;amp;amp;amp;dat=snbamz&amp;amp;amp;amp;url=&#039; . urlencode($uri);
$v = file_get_contents($url);
preg_match(&#039;/\&lt;popularity url\=&quot;(.*?)&quot; TEXT\=&quot;([0-9]+)&quot;\/\&gt;/si&#039;, $v, $r);
return ($r[2]) ? $r[2] : &#039;0&#039;;
}&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;// Page Header
echo &quot;&lt;h2&gt;Search Engine Popularity&lt;/h2&gt;&quot;;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;// Display Links and Information
if (isset($link)) {
echo &quot;&lt;strong&gt;URL:&lt;/strong&gt; &quot; . $link . &quot;&lt;br /&gt;&quot;;
echo &quot;&lt;strong&gt;Google Backlinks:&lt;/strong&gt; &quot; . fetch_google($link) . &quot;&lt;br /&gt;&quot;;
echo &quot;&lt;strong&gt;Yahoo Backlinks:&lt;/strong&gt; &quot; . fetch_yahoo($link) . &quot;&lt;br /&gt;&quot;;
echo &quot;&lt;strong&gt;Alexa Rating:&lt;/strong&gt; &quot; . fetch_alexa($link) . &quot;&lt;br /&gt;&quot;;
}&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;// Search Form
echo &quot;&lt;br /&gt;
&lt;form action=\&quot;&lt;?=$_SERVER[&#039;PHP_SELF&#039;];?&gt;\&quot; method=\&quot;POST\&quot;&gt;
&lt;input type=\&quot;text\&quot; name=\&quot;url\&quot; /&gt;
&lt;input type=\&quot;submit\&quot; /&gt;
&lt;/form&gt;&quot;;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;?&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span&gt;</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.altmint.com/how-to-check-link-popularity-or-back-links-for-a-domain-in-php/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Get a domain name&#8217;s IP address with PHP</title>
		<link>http://blog.altmint.com/get-a-domain-names-ip-address-with-php</link>
		<comments>http://blog.altmint.com/get-a-domain-names-ip-address-with-php#comments</comments>
		<pubDate>Fri, 09 Apr 2010 12:36:04 +0000</pubDate>
		<dc:creator>Kongoti</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[domain's Ip address]]></category>
		<category><![CDATA[Ip address]]></category>
		<category><![CDATA[IP Address using php]]></category>

		<guid isPermaLink="false">http://blog.altmint.com/?p=107</guid>
		<description><![CDATA[How to get Domain name&#8217;s IP address with PHP ?. It&#8217;s very easy to get the IP address for a domain name using PHP. We have two powerful functions in php to get the IP address of a domain name. Those functions are gethostbyname() gethostbynamel() The first one will returnÂ  IP address corresponding to a <a href="http://blog.altmint.com/get-a-domain-names-ip-address-with-php">Continue Reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><strong>How to get Domain name&#8217;s IP address with PHP ?.</strong></p>
<p>It&#8217;s very easy to get the IP address for a domain name using PHP. We have two powerful functions in php to get the IP address of a domain name.</p>
<p>Those functions are</p>
<ol>
<li> gethostbyname()</li>
<li> gethostbynamel()</li>
</ol>
<p>The first one will returnÂ  IP address corresponding to a given Internet host name</p>
<p>The second one will return a list of IP addresses corresponding to a given Internet host name in the form of an array.</p>
<p>We will see some examples using the both functions</p>
<p><strong>Using gethostbyname()</strong></p>
<p>The PHP function gethostbyname() is very simple to use. Simply pass it the domain name you would like to look up and it will either return the IP address for that domain or the unmodified domain back again if it failed. If the domain has more than one IP address associated with it (as with www.cnn.com) then just a single IP address will be passed back.</p>
<p><strong>Example 1</strong></p>
<pre class="brush: php">

&lt;?php

$x = gethostbyname(&#039;www.altmint.com&#039;);
var_dump($x);
// outputs string(13) &quot;96.0.1.231&quot;

?&gt;
</pre>
<p><strong>Example 2</strong></p>
<pre class="brush: php">

&lt;?php

$x = gethostbyname(&#039;www.cnn.com&#039;);
var_dump($x);
// string(14) &quot;157.166.255.19&quot;
// OR string(14) &quot;157.166.255.18&quot;
// OR string(14) &quot;157.166.224.26&quot;
// OR string(14) &quot;157.166.224.25&quot;

?&gt;
</pre>
<p><strong>Example 3</strong></p>
<p>This example is for a non-existant domain and returns the domain itself instead of an IP address:</p>
<pre class="brush: php">

&lt;?php
$x = gethostbyname(&#039;www.blah.foo&#039;);
var_dump($x);
// outputs string(12) &quot;www.blah.foo&quot;

?&gt;
</pre>
<p>If you needed to do something based on the IP address not being found, you could do something like this:</p>
<pre class="brush: php">

&lt;?php
$domain = &#039;www.blah.foo&#039;;
$ip = gethostbyname($domain);
if($domain != $ip) {
// do something
}

?&gt;
</pre>
<p>Note that not being able to find an IP address for the domain does not mean the domain does not exist, or even that a record does not exist for this (sub)domain. The DNS lookup may simply have failed.</p>
<p><strong>Using gethostbynamel()</strong></p>
<p>The PHP gethostbynamel() function returns a list of IP addresses for a domain and Take a look at the following Example.</p>
<p><strong>Example</strong></p>
<pre class="brush: php">

&lt;?php
$hosts = gethostbynamel(&#039;www.example.com&#039;);
print_r($hosts);

//Possible out put will be like this.

Array
(
[0] =&gt; 192.0.34.166
)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.altmint.com/get-a-domain-names-ip-address-with-php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to know Mysql Version Using PHP</title>
		<link>http://blog.altmint.com/how-to-know-mysql-version-using-php</link>
		<comments>http://blog.altmint.com/how-to-know-mysql-version-using-php#comments</comments>
		<pubDate>Thu, 08 Apr 2010 07:11:58 +0000</pubDate>
		<dc:creator>Kongoti</dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[know mysql version using php]]></category>
		<category><![CDATA[mysql vesion]]></category>

		<guid isPermaLink="false">http://blog.altmint.com/?p=86</guid>
		<description><![CDATA[How to know Mysql Version Using PHP ?. We can know the mysql version in the phpinfo. But if we want to display the mysql version in any web page dynamically, how we are you going to deal with that ?. A little bit logic and a liitle bit manipulation on the phpinfo information we <a href="http://blog.altmint.com/how-to-know-mysql-version-using-php">Continue Reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><strong>How to know Mysql Version Using PHP ?.</strong></p>
<p>We can know the mysql version in the phpinfo. But if we want to display the mysql version in any web page dynamically, how we are you going to deal with that ?.</p>
<p>A little bit logic and a liitle bit manipulation on the phpinfo information we can achieve that.</p>
<p>Create a file like this and name it as phpinfo.php</p>
<pre class="brush: php">
&lt;?php
phpinfo();
?&gt;
</pre>
<p>Create another file mysql_version.php with the following code</p>
<pre class="brush: php">
&lt;?php
$file = @file_get_contents(&quot;http://DOMAINNAME/phpinfo.php&quot;);
$start = explode(&quot;&lt;h2&gt;&lt;a name=\&quot;module_mysql\&quot;&gt;mysql&lt;/a&gt;&lt;/h2&gt;&quot;,$file,1000);
if(count($start) &lt; 2){
echo &quot;MySQL is not on this server.&quot;;
}else{
$again = explode(&quot;&lt;tr&gt;&lt;td class=\&quot;e\&quot;&gt;Client API version &lt;/td&gt;&lt;td class=\&quot;v\&quot;&gt;&quot;,$start[1],1000);
$last_time = explode(&quot; &lt;/td&gt;&lt;/tr&gt;&quot;,$again[1],1000);
echo &quot;MySQL Version: &lt;b&gt;&quot;.$last_time[0].&quot;&lt;/b&gt;&quot;;
}
?&gt;
</pre>
<p>replace &#8220;DOMAINNAME&#8221; with your domain name.</p>
<p>This is one of the solution.</p>
<p>You can also know the mysql version if you are using a linuxÂ  server and you have the permission to execute the shell commands, the following code will work.</p>
<pre class="brush: php">
&lt;?php
function find_SQL_Version() {
$output = shell_exec(&#039;mysql -V&#039;);
preg_match(&#039;@[0-9]+\.[0-9]+\.[0-9]+@&#039;, $output, $version);
return $version[0];
}
echo &#039;Your SQL version is &#039; . find_SQL_Version();
?&gt;
</pre>
<p>If any one know other than these methods please feel free to share with us.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.altmint.com/how-to-know-mysql-version-using-php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to connect to FTP and upload file using php code?</title>
		<link>http://blog.altmint.com/how-to-connect-to-ftp-and-upload-file-using-php-code</link>
		<comments>http://blog.altmint.com/how-to-connect-to-ftp-and-upload-file-using-php-code#comments</comments>
		<pubDate>Sat, 03 Apr 2010 08:15:44 +0000</pubDate>
		<dc:creator>Kongoti</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[file upload using php]]></category>
		<category><![CDATA[ftp file upload]]></category>

		<guid isPermaLink="false">http://blog.altmint.com/?p=72</guid>
		<description><![CDATA[How to connect to FTP and upload file using php code? The following code will connect to the ftp and upload the file to the server using php code &#60;?php $ftp_server=â€HOST NAMEâ€; $ftp_user_name=â€USER NAMEâ€; $ftp_user_pass=â€PASSWORDâ€; $conn_id = ftp_connect($ftp_server); // login with username and password $login_result = ftp_login($conn_id, â€œ$ftp_user_nameâ€, â€œ$ftp_user_passâ€); if ((!$conn_id) &#124;&#124; (!$login_result)) { echo <a href="http://blog.altmint.com/how-to-connect-to-ftp-and-upload-file-using-php-code">Continue Reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><strong>How to connect to FTP and upload file using php code?</strong></p>
<p>The following code will connect to the ftp and upload the file to the server using php code</p>
<pre class="brush: php">
&lt;?php

$ftp_server=â€HOST NAMEâ€;
$ftp_user_name=â€USER NAMEâ€;
$ftp_user_pass=â€PASSWORDâ€;
$conn_id = ftp_connect($ftp_server);

// login with username and password

$login_result = ftp_login($conn_id, â€œ$ftp_user_nameâ€, â€œ$ftp_user_passâ€);

if ((!$conn_id) || (!$login_result)) {
echo â€œauthentication failedâ€;
}
else
{

$source_file=â€uploads/â€.$fileName;
$destination_file=â€/htdocs/â€.$fileName;
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);

}

ftp_quit($conn_id);

?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.altmint.com/how-to-connect-to-ftp-and-upload-file-using-php-code/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Display all PHP Errors and Warnings</title>
		<link>http://blog.altmint.com/display-all-php-errors-and-warnings</link>
		<comments>http://blog.altmint.com/display-all-php-errors-and-warnings#comments</comments>
		<pubDate>Sat, 20 Mar 2010 06:14:21 +0000</pubDate>
		<dc:creator>Kongoti</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[display warnings]]></category>
		<category><![CDATA[error display]]></category>

		<guid isPermaLink="false">http://blog.altmint.com/?p=27</guid>
		<description><![CDATA[How do i display errors in php if error display setting is off in my server configuration? Here are the two simple things to display errors even if the error display setting is off in server. error_reporting(E_ALL); ini_set(&#8216;display_errors&#8217;, &#8217;1&#8242;);]]></description>
			<content:encoded><![CDATA[<p><strong>How do i display errors in php if error display setting is off in my server configuration?</strong></p>
<p>Here are the two simple things to display errors even if the error display setting is off in server.</p>
<blockquote><p>
error_reporting(E_ALL);<br />
ini_set(&#8216;display_errors&#8217;, &#8217;1&#8242;);
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.altmint.com/display-all-php-errors-and-warnings/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Redirect from Your Root Domain to the WWW Subdomain</title>
		<link>http://blog.altmint.com/how-to-redirect-from-your-root-domain-to-the-www-subdomain</link>
		<comments>http://blog.altmint.com/how-to-redirect-from-your-root-domain-to-the-www-subdomain#comments</comments>
		<pubDate>Wed, 17 Feb 2010 07:14:02 +0000</pubDate>
		<dc:creator>Kongoti</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.altmint.com/?p=10</guid>
		<description><![CDATA[How to Redirect from Your Root Domain to the WWW Subdomain and Vice Versa Using mod_rewrite? Most websites stick to one form of their domain name when they refer to their own site, be it the plain domain name, like example.com, or the www form, like www.example.com. Unfortunately others linking to you don&#8217;t always follow <a href="http://blog.altmint.com/how-to-redirect-from-your-root-domain-to-the-www-subdomain">Continue Reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><strong>How to Redirect from Your Root Domain to the WWW Subdomain and Vice Versa Using mod_rewrite?</strong></p>
<p>Most websites stick to one form of their domain name when they refer to their own site, be it the plain domain name, like <code>example.com</code>, or the www form, like <code>www.example.com</code>. Unfortunately others linking to you don&#8217;t always follow your preferred style. If some sites link to you with just the domain name, and others link using the www subdomain, then your site may face issues with the search engines. This article shows you how you can work around the problem by automatically redirecting all URL requests of one form to the other in a search engine friendly way.</p>
<p><span id="more-10"></span></p>
<p>To redirect (say) <code>example.com</code> to <code>www.example.com</code>, add the following code to your <code>.htaccess</code> file.</p>
<blockquote><p>
RewriteEngine on<br />
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]<br />
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]</pre>
</blockquote>
<p>The above code causes the server to check that the hostname in the URL is <code>example.com</code>. If it is, the visitor will be sent to <code>www.example.com</code> instead.</p>
<p>If you also own, say <code>example.co.uk</code>, <code>example.de</code> and/or some other domain, and want them to be redirected to <code>www.example.com</code> as well, you may prefer to use the following code instead:</p>
<blockquote><p>
RewriteEngine on<br />
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]<br />
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
</p></blockquote>
<p>To redirect any URL starting with (say) <code>www.example.com</code> to <code>example.com</code>, add the following code to your <code>.htaccess</code> file.</p>
<blockquote><p>
RewriteEngine on<br />
RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]<br />
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]</pre>
</blockquote>
<p>The above rules checks if the hostname in a URL contains <code>www.example.com</code>. If it does, the visitor is sent to <code>example.com</code> instead.</p>
<p>To use the rule, change all instances of "example.com" to your actual domain name. For the line beginning with <code>RewriteCond</code>, add a backslash ("\") before each of the full stops (or "periods") in your domain name.</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.altmint.com/how-to-redirect-from-your-root-domain-to-the-www-subdomain/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>404 redirect using htaccess</title>
		<link>http://blog.altmint.com/404-redirect-htaccess</link>
		<comments>http://blog.altmint.com/404-redirect-htaccess#comments</comments>
		<pubDate>Wed, 17 Feb 2010 07:05:49 +0000</pubDate>
		<dc:creator>Kongoti</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[404 error]]></category>
		<category><![CDATA[404 page not found redirect]]></category>
		<category><![CDATA[404 redirect]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[redirect]]></category>

		<guid isPermaLink="false">http://blog.altmint.com/?p=6</guid>
		<description><![CDATA[How do I make it so instead of a 404, the home page or any specified page comes up? Here is simple trick for that .. You will probably want to create an error document for codes 404 and 500, at the least 404 since this would give you a chance to handle requests for <a href="http://blog.altmint.com/404-redirect-htaccess">Continue Reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><strong>How do I make it so instead of a 404, the home page or any specified page comes up?</strong></p>
<p>Here is simple trick for that ..</p>
<p>You will probably want to create an error document for codes 404 and        500, at the least 404 since this would give you a chance to handle        requests for pages not found. 500 would help you out with internal server        errors in any scripts you have running. You may also want to consider        ErrorDocuments for 401 &#8211; Authorization Required (as in when somebody tries        to enter a protected area of your site without the proper credentials),        403 &#8211; Forbidden (as in when a file with permissions not allowing it to be        accessed by the user is requested) and 400 &#8211; Bad Request, which is one of        those generic kind of errors that people get to by doing some weird stuff        with your URL or scripts.</p>
<p><span id="more-6"></span></p>
<p>In order to specify your own customized error documents, you simply        need to add the following command, <em>on one line</em>, within your        htaccess file:</p>
<blockquote><p><strong>ErrorDocument code /directory/filename.ext</strong><br />
or<br />
<strong>ErrorDocument 404 /errors/notfound.html</strong><br />
This would cause any error codeÂ  resulting in 404 to be forward to          yoursite.com/errors/notfound.html</p>
<p>Likewise with:<br />
<strong>ErrorDocument 500 /errors/internalerror.html</strong></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.altmint.com/404-redirect-htaccess/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

