<?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>PHP Freelancer &#187; PHP</title>
	<atom:link href="http://php-freelancer.in/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://php-freelancer.in</link>
	<description></description>
	<lastBuildDate>Mon, 14 May 2012 10:16:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>PHP Formatter &#8211; PHP Beautifier &#8211; PHP Pretty Printer &#8211; Format Your PHP Code</title>
		<link>http://php-freelancer.in/2011/06/16/php-formatter-php-beautifier-php-pretty-printer-format-your-php-code/</link>
		<comments>http://php-freelancer.in/2011/06/16/php-formatter-php-beautifier-php-pretty-printer-format-your-php-code/#comments</comments>
		<pubDate>Thu, 16 Jun 2011 20:34:34 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Format Your PHP Code]]></category>
		<category><![CDATA[PHP Beautifier]]></category>
		<category><![CDATA[PHP Formatter]]></category>
		<category><![CDATA[PHP Pretty Printer]]></category>

		<guid isPermaLink="false">http://php-freelancer.in/?p=270</guid>
		<description><![CDATA[Hi Friends, I am working from last 5 years on PHP and we all know that while make code we have to do so much debugging to make code work, So after complete project if we see our files then we found that files are having less code but comments and debugging code more . &#8230; <a href="http://php-freelancer.in/2011/06/16/php-formatter-php-beautifier-php-pretty-printer-format-your-php-code/">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hi Friends, I am working from last 5 years on PHP and we all know that while make code we have to do so much debugging to make code work, So after complete project if we see our files then we found that files are having less code but comments and debugging code more . I am using one tool to remove all comments, make proper commenting, remove spaces between lines etc.. which we can call PHP Formatter &#8211; PHP Beautifier &#8211; PHP Pretty Printer.<span id="more-270"></span></p>
<p>Below is URL of PHP Formatter :</p>
<p><a href="http://beta.phpformatter.com/" target="_blank">PHP Formatter - PHP Beautifier &#8211; PHP Pretty Printer</a></p>
<div id="in_post_ad_middle_1" style="text-align:center;margin: 5px;padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-8444019803708971";
/* Middleofpost */
google_ad_slot = "5399229243";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><p>This PHP Formatter having so many options like :</p>
<dt><label for="indent_style">- Indentation style</label></dt>
<dt><label for="indent_style">- Remove all comments<br />
- Remove empty lines<br />
- Align assignments statements nicely<br />
- Put a comment with the condition after if, while, for, foreach, declare and catch statements</label></dt>
<dt>- Remove lines with just a semicolon (;)<br />
- Make normal comments (//) from perl comments (#)<br />
- Make long opening tag (&lt;?php) from short one (&lt;?)</dt>
<dt>- Space inside brackets &#8211; ( )<br />
- Space inside empty brackets &#8211; ( )<br />
- Space inside block brackets &#8211; [ ]<br />
- Space inside empty block brackets &#8211; [ ]</dt>
<dt> </dt>
<dt>So this php formatter is best I ever used and above is features which is very useful by which you can make your file format according to your need.</dt>
<p>I hope this post helpful for someone. If you have any question then you can ask me anytime or post it in comment.</p>
<blockquote><p>Also I am <a href="http://php-freelancer.in">PHP Freelancer</a>, <a href="http://php-freelancer.in">Freelance PHP Developer</a> having more than  4 years of experience, So if you want to do any projects then you can <a href="http://php-freelancer.in/contact-me/" target="_blank">contact me</a>.</p></blockquote>
<blockquote><p><span style="color: #008000;"><a style="color: #008000;" href="http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=ankugandhi">Hostgator Hosting</a> in 1 Cent Coupon Code &#8211; &#8220;1CENTHECOUPON&#8221; (Without Quotes).</span></p></blockquote>
<div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://php-freelancer.in/2011/06/16/php-formatter-php-beautifier-php-pretty-printer-format-your-php-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To Change Different PHP Version By .htaccess</title>
		<link>http://php-freelancer.in/2011/04/30/how-to-change-different-php-version-by-htaccess/</link>
		<comments>http://php-freelancer.in/2011/04/30/how-to-change-different-php-version-by-htaccess/#comments</comments>
		<pubDate>Sat, 30 Apr 2011 10:14:50 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
				<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[use php 5 by htaccess]]></category>

		<guid isPermaLink="false">http://php-freelancer.in/?p=256</guid>
		<description><![CDATA[Hi Friends, In this article I will explain how can we change version of PHP by htaccess. Sometime some application need php version 5 instead of 4 and on server php4 version used by default but If php5 already installed on server then we can use php5 version by putting one line in .htaccess file. &#8230; <a href="http://php-freelancer.in/2011/04/30/how-to-change-different-php-version-by-htaccess/">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hi Friends, In this article I will explain how can we change version of PHP by htaccess. Sometime some application need php version 5 instead of 4 and on server php4 version used by default but If php5 already installed on server then we can use php5 version by putting one line in .htaccess file.<span id="more-256"></span></p>
<p>If you want to use php5 version for a particular application and on server php4 and php5 both are available and php4 is by default , So to use php5 for that application follow these rules :<br />
For e.g. our site application is in http://example.com/php5/ right now it is using php4 but you want to use php5 for this then,</p>
<p>1.  Make one .htaccess file in http://example.com/php5/ if not exists.</p>
<div id="in_post_ad_middle_1" style="text-align:center;margin: 5px;padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-8444019803708971";
/* Middleofpost */
google_ad_slot = "5399229243";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><p>2.  Now put one line given below in .htaccess file.</p>
<p><code>AddHandler application/x-httpd-php5 .php .php5 .php4 .php3</code><br />
Or<br />
<code>AddHandler x-httpd-php5 .php</code></p>
<p>You can try both one by one in case if any one is not working.</p>
<p>Now check your application site, It will use php5 version. Only this application will use php5 because we put htaccess which have php5 rule in this folder.</p>
<div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://php-freelancer.in/2011/04/30/how-to-change-different-php-version-by-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Upload Large Files Or Big Files In PHP Using htaccess</title>
		<link>http://php-freelancer.in/2011/04/28/how-to-upload-large-files-or-big-files-in-php-using-htaccess/</link>
		<comments>http://php-freelancer.in/2011/04/28/how-to-upload-large-files-or-big-files-in-php-using-htaccess/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 11:56:50 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[upload big files by htaccess]]></category>
		<category><![CDATA[upload big files in php by htaccess]]></category>
		<category><![CDATA[Upload large file by htaccess]]></category>
		<category><![CDATA[upload large files in php by htaccess]]></category>

		<guid isPermaLink="false">http://php-freelancer.in/?p=253</guid>
		<description><![CDATA[Hi Friends, Today in this article I am going to explain how can we upload big files in PHP via htaccess, Actually basically we can upload files via PHP having 2 MB in size but when file exceeded 2 MB size then it is not uploading files to server or in local because by default &#8230; <a href="http://php-freelancer.in/2011/04/28/how-to-upload-large-files-or-big-files-in-php-using-htaccess/">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hi Friends, Today in this article I am going to explain how can we upload big files in PHP via htaccess, Actually basically we can upload files via PHP having 2 MB in size but when file exceeded 2 MB size then it is not uploading files to server or in local because by default file size to be uploaded is set to 2 MB and when we try to upload big file or large file than in size than 2 MB then it is giving error and not uploading files, So to enable uploading large files in Size we have to make some configuration on server or local. We can increase this limit by two files on server, one is https.conf and second is .htaccess<span id="more-253"></span></p>
<p>When we work on localhost then we are having access to httpd.conf file, So from that file we can increase limit of uploading files, but when working on server mostly we dont have access to https.conf file, So we have to change or increase file size by htaccess file. So it is not difficult to increase file size by htaccess , you just have to add one line with increased file size in MB and your problem will solve. So below is htaccess rules by which you can use to upload a large file using file field of the form and copy() OR move_uploaded_file() function in PHP.</p>
<p><code>php_value upload_max_filesize 32M<br />
php_value post_max_size 32M<br />
php_value max_execution_time 360<br />
php_value max_input_time 360</code></p>
<div id="in_post_ad_middle_1" style="text-align:center;margin: 5px;padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-8444019803708971";
/* Middleofpost */
google_ad_slot = "5399229243";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><p>So by above rules you can uplaod files of 32 MB and below are explanation of other rules :</p>
<p><strong>Rule 1: </strong>upload_max_filesize sets maximum file size for uploading.<br />
<strong>Rule 2:</strong> post_max_size sets maximum size of the post data.<br />
<strong>Rule 3: </strong>max_execution_time sets maximum time in seconds a script is allowed to run before it is terminated.<br />
<strong>Rule 4: </strong>max_input_time sets maximum time in seconds a script is allowed to parse input data of HTML form.</p>
<p>So by this way we can increase uploading file size limit by htaccess. Alternatively, <a href="https://www.yousendit.com/">file upload</a> services are available for many uses.</p>
<div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://php-freelancer.in/2011/04/28/how-to-upload-large-files-or-big-files-in-php-using-htaccess/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To Check URL Protocol Is https by PHP</title>
		<link>http://php-freelancer.in/2011/03/18/how-to-check-url-protocol-is-https-by-php/</link>
		<comments>http://php-freelancer.in/2011/03/18/how-to-check-url-protocol-is-https-by-php/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 08:05:49 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[how to check https by php]]></category>

		<guid isPermaLink="false">http://php-freelancer.in/?p=243</guid>
		<description><![CDATA[Hi friends, Today in this article I am writing about how can we check or found that URL is using https protocol or not by PHP. It is very simple in PHP to find this but as this is small thing, So it is obvious that most of people dont have any attension on it. &#8230; <a href="http://php-freelancer.in/2011/03/18/how-to-check-url-protocol-is-https-by-php/">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hi friends, Today in this article I am writing about how can we check or found that URL is using https protocol or not by PHP. It is very simple in PHP to find this but as this is small thing, So it is obvious that most of people dont have any attension on it. Many programmer trying to find this thing by getting URL by $_SERVER veriable and then searching https in that url. But as I said it is very easy to check https is on or not in PHP.<span id="more-243"></span></p>
<p>We can find https is on or not by $_SERVER. There is one option in $_SERVER global array by which we can find that current URL having https or not. Below is code by which you can check URL using https or not.</p>
<div id="in_post_ad_middle_1" style="text-align:center;margin: 5px;padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-8444019803708971";
/* Middleofpost */
google_ad_slot = "5399229243";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><pre class="brush: php; title: ; notranslate">
if(isset($_SERVER['HTTPS']))
{
// code for https url go here
}
else
{
// code for http url go here
}</pre>
<p>In above code you can see that I have checked isset($_SERVER['HTTPS']) because if URL having https then it will return &#8216;on&#8217; and if URL will have http then it will not return anything. So I have checked isset($_SERVER['HTTPS'])), So If URL using https it will go to if condition and if it is not using https then it will go to else condition.</p>
<div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://php-freelancer.in/2011/03/18/how-to-check-url-protocol-is-https-by-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To Generate MySQL To RSS (XML) File Used In Google Product Search</title>
		<link>http://php-freelancer.in/2011/02/21/how-to-generate-mysql-to-rss-xml-file-used-in-google-product-search/</link>
		<comments>http://php-freelancer.in/2011/02/21/how-to-generate-mysql-to-rss-xml-file-used-in-google-product-search/#comments</comments>
		<pubDate>Mon, 21 Feb 2011 10:47:41 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[MySQL To RSS]]></category>
		<category><![CDATA[MySQL To XML]]></category>

		<guid isPermaLink="false">http://php-freelancer.in/?p=231</guid>
		<description><![CDATA[Hi Friends, Some days ago I got one requirement for my one client to make RSS or XML file from mysql table to submit into Google Product Search. Google Product Search helps shoppers find and buy products across the web. As a seller, you can submit your products to Google Product Search, allowing shoppers to &#8230; <a href="http://php-freelancer.in/2011/02/21/how-to-generate-mysql-to-rss-xml-file-used-in-google-product-search/">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hi Friends, Some days ago I got one requirement for my one client to make RSS or XML file from mysql table to submit into <a href="http://www.google.com/" class="kblinker" target="_blank" title="More about google &raquo;">Google</a> Product Search. Google Product Search helps shoppers find and buy products across the web. As a seller, you can submit your products to Google Product Search, allowing shoppers to quickly and easily find your site. So Google Product Search is very useful thing for people who have website of selling online products. Google Product Search supports .txt and .xml (RSS) file. Im my last article I already explained how we can generate <a href="http://php-freelancer.in/2011/02/21/script-to-convert-data-from-mysql-table-to-tab-formatted-txt-datafeed/" target="_blank">MySQL Table To Tab Formatted TXT Datafeed</a>.<span id="more-231"></span></p>
<p>For this you have to create one datafeed.xml and save this file where PHP script file is stored.So below is the script by which you can Generate MySQL To RSS (XML) File Used In Google Product Search:</p>
<div id="in_post_ad_middle_1" style="text-align:center;margin: 5px;padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-8444019803708971";
/* Middleofpost */
google_ad_slot = "5399229243";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><pre class="brush: php; title: ; notranslate">
&lt;?php $conn = mysql_connect('hostname', 'username', 'password') or die ('Error connecting to mysql');
mysql_select_db('DB name', $conn) or die ('Error connecting to database');?&gt;
&lt;?php function getXML($sql=&quot;Default Query&quot;)
{
$results = mysql_query($sql);

$count = 0;

$data = array();

while ( $row = mysql_fetch_array($results))

{

$result[$count] = $row;

$count++;

}

$columns=&quot;;

for($i=0;$i &lt; count($result);$i++)
{

$columns.='&lt;item&gt;';

$columns.='&lt;title&gt;';
$columns.=$result[$i]['name'];
$columns.='&lt;/title&gt;';

$columns.='&lt;link&gt;';
$columns.= &quot;http://www.example.com/&quot;.$result[$i]['link'];
$columns.='&lt;/link&gt;';

$columns.='&lt;description&gt;';
$columns.=$result[$i]['Description'];
$columns.='&lt;/description&gt;';

$columns.='&lt;g:image_link&gt;';
$columns.=&quot;http://www.example.com/&quot;.$result[$i]['image'];
$columns.='&lt;/g:image_link&gt;';

$columns.='&lt;g:price&gt;';
$columns.=$result[$i]['Price'];
$columns.='&lt;/g:price&gt;';

$columns.='&lt;g:condition&gt;';
$columns.='new';
$columns.='&lt;/g:condition&gt;';

$columns.='&lt;g:id&gt;';
$columns.=$result[$i]['id'];
$columns.='&lt;/g:id&gt;';

$columns.='&lt;/item&gt;';

}
$content='&lt;?xml version=&quot;1.0″?&gt;
&lt;rss version=&quot;2.0″ xmlns:g=&quot;http://base.google.com/ns/1.0″&gt;';
  $content.='
  &lt;channel&gt;';
    $content.='
    &lt;title&gt;Example&lt;/title&gt;
    ';
    $content.='
    &lt;link&gt;

http://www.example.com

    &lt;/link&gt;
    ';
    $content.='
    &lt;description&gt;Example&lt;/description&gt;
    ';
    $content.=$columns;
    $content.='&lt;/channel&gt;
  ';
  $content.='&lt;/rss&gt;
';

$res = update_xml_file($content);

}
getXML(&quot;SELECT id,name,description,price,link,image FROM tablename&quot;);

function update_xml_file($content)
{
global $HTTP_POST_VARS;
$filename = 'datafeed.xml';

if (is_writable($filename))
{
if (!$handle = fopen($filename, 'w')) {
echo &quot;Cannot open file ($filename)&quot;;
exit;
}
// Write $somecontent to our opened file.
if (fwrite($handle, $content) == FALSE) {
$action_msg = &quot;ER&quot;;
}

$action_msg = &quot;SC&quot;;
fclose($handle);
$handle=fopen($filename,&quot;r&quot;);
}
else
{
echo &quot;The file $filename is not writable&quot;;
}

}

?&gt;
</pre>
<p>If you are having any problems in this script then you can <a href="http://php-freelancer.in/contact-me/" class="kblinker" title="More about contact me &raquo;">contact me</a> or post problem in comment.</p>
<div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://php-freelancer.in/2011/02/21/how-to-generate-mysql-to-rss-xml-file-used-in-google-product-search/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To Change Object Into Array in PHP</title>
		<link>http://php-freelancer.in/2011/01/22/how-to-change-object-into-array-in-php/</link>
		<comments>http://php-freelancer.in/2011/01/22/how-to-change-object-into-array-in-php/#comments</comments>
		<pubDate>Sat, 22 Jan 2011 22:19:58 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Object to Array]]></category>

		<guid isPermaLink="false">http://php-freelancer.in/?p=210</guid>
		<description><![CDATA[Hi Friends, When I was working with one wordpress project I got one object array by get_posts method, But I want array instead of object array. So i search a lot for it and i found so many solutions and then finally i create one funtion in which you have to pass object only and &#8230; <a href="http://php-freelancer.in/2011/01/22/how-to-change-object-into-array-in-php/">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hi Friends, When I was working with one <a href="http://wordpress.org/" class="kblinker" title="More about wordpress &raquo;">wordpress</a> project I got one object array by get_posts method, But I want array instead of object array. So i search a lot for it and i found so many solutions and then finally i create one funtion in which you have to pass object only and it will return array from that object. So below is the function by which you can get array from that object<span id="more-210"></span>.</p>
<pre class="brush: php; title: ; notranslate">&lt;?php
function objectToArray( $objecttemp )
{
foreach($objecttemp as $object)
{
if( !is_object( $object ) &amp;amp;&amp;amp; !is_array( $object ) )
{
return $object;
}
if( is_object( $object ) )
{
$object = get_object_vars( $object );
}
$lastarray[] = $object;
//return array_map( 'objectToArray', $object );
}
return $lastarray;
}
?&gt;</pre>
<div id="in_post_ad_middle_1" style="text-align:center;margin: 5px;padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-8444019803708971";
/* Middleofpost */
google_ad_slot = "5399229243";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><p>Try to use it and if you cant understand it or not able to make it work then you can contact me.</p>
<pre><span style="font-family: Tahoma; line-height: 19px; white-space: normal; color: #191a1a;">Also I am <span style="font-family: inherit; color: #be2804;"><span style="border-style: initial; border-color: initial; font-style: inherit;"><span style="text-decoration: underline;"><a href="http://php-freelancer.in">Freelance PHP Developer</a></span></span></span> having more than  3 years of experience, So if you want to do any projects then you can <a class="kblinker" style="font-weight: inherit; font-style: inherit; font-size: 12px; font-family: inherit; vertical-align: baseline; color: #be2804; text-decoration: underline; padding: 0px; margin: 0px; border: 0px initial initial;" title="More about contact me »" href="http://php-freelancer.in/contact-me/">contact me</a>.</span></pre>
<div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://php-freelancer.in/2011/01/22/how-to-change-object-into-array-in-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FCKeditor Image Uploading Not Working</title>
		<link>http://php-freelancer.in/2010/10/01/fckeditor-image-uploading-not-working/</link>
		<comments>http://php-freelancer.in/2010/10/01/fckeditor-image-uploading-not-working/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 12:11:28 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[FCKeditor Image Upload problem]]></category>

		<guid isPermaLink="false">http://php-freelancer.in/?p=143</guid>
		<description><![CDATA[Hello Friends, Some days ago I was working on fckeditor because I was getting error in it that i was not able to upload image. When I uploading image it is telling me that image uploaded successfully, but when I was checking in images it was not exists. So I have started searching about it &#8230; <a href="http://php-freelancer.in/2010/10/01/fckeditor-image-uploading-not-working/">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hello Friends, Some days ago I was working on fckeditor because I was getting error in it that i was not able to upload image. When I uploading image it is telling me that image uploaded successfully, but when I was checking in images it was not exists. So I have started searching about it and finally found solution of it. I am telling you all ways which I used to solve this problem because may be in your case your error occurred due to other reason<span id="more-143"></span>.</p>
<p>First of all when you upload image and it is giving image uploaded successfully but it is not showing image in list it means image not uploaded successfully. So there are some things you have to check to solve this problem given below :</p>
<p>1. First of all while using fckeditor check folder permissions of userfiles folder (also for folders inside userfiles), check that it is 777 rights to that folder or not? you can check it by going to that folder via FTP by right clicking on it and then select properties. If all folders having 777 rights but it is still not uploading image then check that your server is linux or windows? you can check check that your server is windows or linux via phpinfo. If your server is linux then you can change folder permissions by right clicking on that folder from FTP but if it is windows then you have to email to your hosting to give permission to that folders. In my case I had windows server and I mailed to hosting and when they gave permissions to folder image uploading start working smoothly.</p>
<p>2. Open the config.php file. Here is the full path of this file (FCKeditor/editor/filemanager/connectors/php/config.php).</p>
<p><strong>Find: </strong><br />
$Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] ;<br />
$Config['QuickUploadAbsolutePath']['Image'] = $Config['UserFilesAbsolutePath'] ;</p>
<p><strong>Replace:</strong></p>
<p>$Config['QuickUploadPath']['Image'] = $Config['FileTypesPath']['Image'] ;<br />
$Config['QuickUploadAbsolutePath']['Image'] = $Config['FileTypesAbsolutePath']['Image'] ;</p>
<div id="in_post_ad_middle_1" style="text-align:center;margin: 5px;padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-8444019803708971";
/* Middleofpost */
google_ad_slot = "5399229243";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><p>3. Go through this file FCKeditor\editor\filemanager\connectors\php\config.php and set absolute path of your directory. I think you all are know about absolute and relative path. Please set below path in your config file.</p>
<p>$Config['UserFilesPath'] = ‘http://www.abcd.com/userfiles/’ ;</p>
<p>$Config['UserFilesAbsolutePath'] = ‘directody path of userfiles folder/’ ; // like home/htdocs/..</p>
<p>Using above step, your image upload problem and Image display problem will be solved. I have already faced these problems and also solved this problems.</p>
<p>4. Check that you are using latest version of fckeditor or not? you can find latest version <a href="http://ckeditor.com/download" target="_blank">here </a>.</p>
<p>After using all these steps if your fckeditor image upload working then you can <a href="http://php-freelancer.in/contact-me/" class="kblinker" title="More about contact me &raquo;">contact me</a> .</p>
<p>Also I am <a href="http://php-freelancer.in/">PHP Freelancer</a> having more than  3 years of experience, So if you want to do any projects then you can contact me.</p>
<div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://php-freelancer.in/2010/10/01/fckeditor-image-uploading-not-working/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How To Take Full Backup From cPanel By PHP Script</title>
		<link>http://php-freelancer.in/2010/03/12/how-to-take-full-backup-from-cpanel-by-php-script/</link>
		<comments>http://php-freelancer.in/2010/03/12/how-to-take-full-backup-from-cpanel-by-php-script/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 06:52:08 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[cpanle backup script]]></category>
		<category><![CDATA[Script to Take Full Backup From cPanel]]></category>
		<category><![CDATA[Take Full Backup From cPanel]]></category>
		<category><![CDATA[Take Full Backup From cPanel by script]]></category>

		<guid isPermaLink="false">http://www.phpzone.net/?p=48</guid>
		<description><![CDATA[Hello Friends, as a developer i am daily using cPanel and its features and in that features cPanel provide one feature to take full backup or to take backup of any folder from the server but sometimes in some circumstances we have to take daily/weekly/monthly full backup of files by PHP script by running cron &#8230; <a href="http://php-freelancer.in/2010/03/12/how-to-take-full-backup-from-cpanel-by-php-script/">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hello Friends, as a developer i am daily using cPanel and its features and in that features cPanel provide one feature to take full backup or to take backup of any folder from the server but sometimes in some circumstances we have to take daily/weekly/monthly full backup of files by PHP script by running cron job. Yesterday i was searching  for it to do in one of my project and i found this script which are very useful.So below is the script which take full backup from cPanel and make it .zip folder in root folder of your cPanel<span id="more-48"></span>.</p>
<p>Make one php file and give it to name whatever you want, for this instance i am giving it name details_cp.php, this file is just for details of your cPanel and FTP and other things. So the content of details_cp.php would be given below (Please change all details in  this file with your details):</p>
<blockquote><p>&lt;?php<br />
$cpuser = “cpanel username”; //cPanel Username<br />
$cppass = “cpanel Password”; //cPanel Username<br />
$domain = “yourdomain.com”; // Domain name you want to take backup<br />
$skin = “x2″; // no need to change</p>
<p>$ftpuser = “FTP username”; // FTP username<br />
$ftppass = “FTP password”; // FTP username<br />
$ftphost = “FTP host”; // FTP Host<br />
$ftpmode = “passiveftp”;<br />
$ftpdir = “/subdir”;</p>
<p>$notifyemail = “webmaster@mydomain.com”; // Email which will use in case of any error.</p>
<p>$delbackup = 1;</p>
<p>$secure = 0; // If you are using secure ssl connection</p>
<p>$debug = 0;<br />
?&gt;</p></blockquote>
<div id="in_post_ad_middle_1" style="text-align:center;margin: 5px;padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-8444019803708971";
/* Middleofpost */
google_ad_slot = "5399229243";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><p>After that you have to create second file, which is then main backup script, which will take backup from cPanel by using  details given in details_cp.php. So for this instance i am giving this file name backup_cp.php and content of backup_cp.php would be :</p>
<p><span style="color: #ff0000;">Note: in backup_cp.php we have included details_cp.php on second line so take care to change that name in backup_cp.php file if you are changing file names.</span></p>
<blockquote><p>&lt;?php<br />
<span style="color: #ff0000;">include(‘details_cp.php’);</span><br />
if ($secure) {<br />
$url = “ssl://”.$domain;<br />
$port = 2083;<br />
} else {<br />
$url = $domain;<br />
$port = 2082;<br />
}</p>
<p>if ($delbackup) {<br />
$conn_id = ftp_connect($ftphost);<br />
if ($conn_id) {<br />
$ok = ftp_login($conn_id, $ftpuser, $ftppass);<br />
if ($ok) {<br />
if (!empty($ftpdir)) {<br />
$ok = ftp_chdir($conn_id,$ftpdir);<br />
}<br />
if ($ok) {<br />
$dirlist = ftp_nlist($conn_id, “backup*”);<br />
if (!empty($dirlist[0])) @ftp_delete($conn_id,$dirlist[0]);<br />
}<br />
}<br />
ftp_close($conn_id);<br />
}<br />
}</p>
<p>$socket = fsockopen($url,$port);<br />
if (!$socket) { echo “Cannot connect to $url\n”; exit; }<br />
$authstr = $cpuser.”:”.$cppass;<br />
$pass = base64_encode($authstr);<br />
$request_data = “dest=”.urlencode($ftpmode).”&amp;email=”.urlencode($notifyemail);<br />
$request_data .= “&amp;server=”.urlencode($ftphost).”&amp;user=”.urlencode($ftpuser);<br />
$request_data .= “&amp;pass=”.urlencode($ftppass);<br />
if (!empty($ftpdir)) $request_data .= “&amp;rdir=”.urlencode($ftpdir);<br />
$request_data .= “&amp;submit=”.urlencode(‘Generate Backup’);</p>
<p>fputs($socket,”POST /frontend/”.$skin.”/backup/dofullbackup.html HTTP/1.1\r\n”);<br />
fputs($socket,”Host: $domain\r\n”);<br />
fputs($socket,”Authorization: Basic $pass\r\n”);<br />
fputs($socket,”Content-type: application/x-www-form-urlencoded\r\n”);<br />
fputs($socket,”Content-length: “.strlen($request_data).”\r\n\r\n”.$request_data);</p>
<p>while (!feof($socket)) {<br />
$response = fgets($socket,4096);<br />
if ($debug) echo $response;<br />
}<br />
fclose($socket);<br />
?&gt;</p></blockquote>
<p>After make this file simply run backup_cp.php in your browser, It will run process for sometime and then it will make .zip folder of backup in root folder of given domain.<br />
Hope this post helps you. If i am missing anything then let me know.</p>
<div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://php-freelancer.in/2010/03/12/how-to-take-full-backup-from-cpanel-by-php-script/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to:Start mails in local in Apache (Xampp or Wamp Server)</title>
		<link>http://php-freelancer.in/2010/02/23/how-to-start-mails-in-local-in-apache-xampp-or-wamp-server/</link>
		<comments>http://php-freelancer.in/2010/02/23/how-to-start-mails-in-local-in-apache-xampp-or-wamp-server/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 19:45:18 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[start mail in local]]></category>
		<category><![CDATA[start mail in wamp]]></category>
		<category><![CDATA[start mail in xampp]]></category>
		<category><![CDATA[Start mail on local]]></category>

		<guid isPermaLink="false">http://www.phpzone.net/?p=20</guid>
		<description><![CDATA[Hello Friends, Today i am writing this article for starting mails in xampp or wamp server whatever you are using for developing PHP based web application. By default xampp or wamp server don&#8217;t have mail facility (using SMTP) ON, So to do this we have to modify some settings to start mail functionality in local &#8230; <a href="http://php-freelancer.in/2010/02/23/how-to-start-mails-in-local-in-apache-xampp-or-wamp-server/">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hello Friends, Today i am writing this article for starting mails in xampp or wamp server whatever you are using for developing PHP based web application. By default xampp or wamp server don&#8217;t have mail facility (using SMTP) ON, So to do this we have to modify some settings to start mail functionality in local using SMTP. I have search a lot on internet and i found this thing very hardly. So if you want to start mail functionality in localhost by SMTP then below are the steps to do it<span id="more-20"></span>.</p>
<p>1. First make one file(you can name it anything) anywhere in htdocs or www folder having code shown below.for instance i named this file phpinfo.php.</p>
<blockquote><p>&lt;?php</p>
<p>phpinfo();</p>
<p>?&gt;</p></blockquote>
<p>2. After that write URL in browser to see this file. When you open this file in browser then you will see so many settings like shown below :</p>
<p>3. Find location of your php.ini file like shown below in image :</p>
<div id="in_post_ad_middle_1" style="text-align:center;margin: 5px;padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-8444019803708971";
/* Middleofpost */
google_ad_slot = "5399229243";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><p>4. After finding php.ini file , open php.ini file from that path, for me it is &#8220;E:\xampp\php\php.ini&#8221;, in your case it can be different then me because i have installed it in E drive and also i have installed xampp. If you use wamp then this path must be different then mine, So from that path open php.ini file.</p>
<p>5. After opening php.ini file try to find out &#8220;SMTP&#8221; (without quotes) in that file.</p>
<p>6. After finding SMTP , you will find like shown below:</p>
<blockquote><p>[mail function]<br />
; For Win32 only.<br />
SMTP = localhost<br />
smtp_port = 25<br />
; For Win32 only.<br />
sendmail_from = me@localhost.com</p></blockquote>
<p>7. Change localhost to your with your SMTP server name. for example for gmail smtp server is smtp.gmail.com(like gmail you have smtp server address for you domain name) and change sendmail_from to your email address for that server. for example if we are talking about phpzone.net then smtp server will be smtp.phpzone.net and sendmail_from will be any email address of phpzone.net like abcxyz@phpzone.net. So after adding it will look like shown below ;</p>
<blockquote><p>[mail function]<br />
; For Win32 only.<br />
SMTP = smtp.phpzone.net<br />
smtp_port = 25<br />
; For Win32 only.<br />
sendmail_from = abcxyz@phpzone.net</p></blockquote>
<p>Save this file and close it, then restart your xampp or wamp server then try to send mail from local by PHP mail() function. It will start working and you will never get this type of error :</p>
<p>&#8220;Warning: mail() [function.mail]: Failed to connect to mailserver at &#8220;localhost&#8221; port 25, verify your &#8220;SMTP&#8221; and &#8220;smtp_port&#8221; setting in <a title="PHP Programming" href="http://www.programmingfacts.com/2009/11/23/facts-of-php-programming-language/">php</a>.ini or use ini_set() in&#8221;</p>
<div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://php-freelancer.in/2010/02/23/how-to-start-mails-in-local-in-apache-xampp-or-wamp-server/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

