<?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>How To PHP - PHP Technology, PHP Tutorial, Database Tutorials, CMS System &#187; PHP</title>
	<atom:link href="http://www.phpmind.com/blog/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpmind.com/blog</link>
	<description>Future of web development</description>
	<lastBuildDate>Tue, 10 Aug 2010 07:19:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to test HTTPS CURL in development server?</title>
		<link>http://www.phpmind.com/blog/2010/07/how-to-test-https-curl-in-development-server/</link>
		<comments>http://www.phpmind.com/blog/2010/07/how-to-test-https-curl-in-development-server/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 01:31:07 +0000</pubDate>
		<dc:creator>om</dc:creator>
				<category><![CDATA[CURL]]></category>

		<guid isPermaLink="false">http://www.phpmind.com/blog/?p=776</guid>
		<description><![CDATA[HTTPS is secure HTTP communication based on SSL protocol (HTTP over SSL). Generally all sensitive info (like passwords, financial details, etc.) are sent over this transport. Common example: your gmail login is done through HTTPS channel and different payment gateway. So here in this deal - View Code PHP$postfields = array&#40;'field1'=&#38;gt;'value1', 'field2'=&#38;gt;'value2'&#41;; $ch = curl_init&#40;&#41;; [...]]]></description>
			<content:encoded><![CDATA[<p>HTTPS is secure HTTP communication based on SSL protocol (HTTP over SSL). Generally all sensitive info (like passwords, financial details, etc.) are sent over this transport. Common example: your gmail login is done through HTTPS channel and different payment gateway.<br />
So here in this deal -</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p776code2'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p7762"><td class="code" id="p776code2"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$postfields</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'field1'</span><span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span><span style="color: #0000ff;">'value1'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'field2'</span><span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span><span style="color: #0000ff;">'value2'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$ch</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/curl_init"><span style="color: #990000;">curl_init</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_URL<span style="color: #339933;">,</span> <span style="color: #0000ff;">'https://foo.com'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_RETURNTRANSFER<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_FOLLOWLOCATION<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_POST<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_POSTFIELDS<span style="color: #339933;">,</span> <span style="color: #000088;">$postFields</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_SSL_VERIFYHOST<span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/curl_exec"><span style="color: #990000;">curl_exec</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>CURLOPT_SSL_VERIFYHOST is off. This allows you to test the CURL in your dev server without having HTTPS. PHP/Curl will handle the http request.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.phpmind.com%2Fblog%2F2010%2F07%2Fhow-to-test-https-curl-in-development-server%2F&amp;linkname=How%20to%20test%20HTTPS%20CURL%20in%20development%20server%3F"><img src="http://www.phpmind.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.phpmind.com/blog/2010/07/how-to-test-https-curl-in-development-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to display XML output in Browser?</title>
		<link>http://www.phpmind.com/blog/2009/08/how-to-display-xml-output-in-browser/</link>
		<comments>http://www.phpmind.com/blog/2009/08/how-to-display-xml-output-in-browser/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 20:28:36 +0000</pubDate>
		<dc:creator>om</dc:creator>
				<category><![CDATA[PHP-XML]]></category>

		<guid isPermaLink="false">http://www.phpmind.com/blog/?p=416</guid>
		<description><![CDATA[To display XML file on browser use this header. View Code PHP&#160; &#60;?php header&#40;&#34;Content-type: text/xml&#34;&#41;; &#160; ?&#62;]]></description>
			<content:encoded><![CDATA[<p>To display XML file on browser use this header.</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p416code4'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p4164"><td class="code" id="p416code4"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<a href="http://www.php.net/header"><span style="color: #990000;">header</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-type: text/xml&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.phpmind.com%2Fblog%2F2009%2F08%2Fhow-to-display-xml-output-in-browser%2F&amp;linkname=How%20to%20display%20XML%20output%20in%20Browser%3F"><img src="http://www.phpmind.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.phpmind.com/blog/2009/08/how-to-display-xml-output-in-browser/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to post XML using socket ?</title>
		<link>http://www.phpmind.com/blog/2009/08/how-to-post-xml-using-socket/</link>
		<comments>http://www.phpmind.com/blog/2009/08/how-to-post-xml-using-socket/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 19:47:35 +0000</pubDate>
		<dc:creator>om</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP-XML]]></category>

		<guid isPermaLink="false">http://www.phpmind.com/blog/?p=412</guid>
		<description><![CDATA[I had discussed posting XML over HTTP using CURL in last post. Remember that was first method. As I had promised on earlier post I would like to share second method with you. That is socket!! Use this code and send your XML file. View Code PHP&#60;?php function postXMLToURL &#40;$server, $path, $xmlDocument&#41; &#123; $contentLength = [...]]]></description>
			<content:encoded><![CDATA[<p>I had discussed posting XML over HTTP using CURL in last post. Remember that was first method.<br />
As I had promised on earlier post I would like to share second method with you. That is socket!!<br />
Use this code and send your XML file.</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p412code6'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p4126"><td class="code" id="p412code6"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">function</span> postXMLToURL <span style="color: #009900;">&#40;</span><span style="color: #000088;">$server</span><span style="color: #339933;">,</span> <span style="color: #000088;">$path</span><span style="color: #339933;">,</span> <span style="color: #000088;">$xmlDocument</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$contentLength</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/strlen"><span style="color: #990000;">strlen</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$xmlDocument</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$fp</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/fsockopen"><span style="color: #990000;">fsockopen</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$server</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">80</span><span style="color: #339933;">,</span> <span style="color: #000088;">$errno</span><span style="color: #339933;">,</span> <span style="color: #000088;">$errstr</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">30</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://www.php.net/fputs"><span style="color: #990000;">fputs</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;POST <span style="color: #006699; font-weight: bold;">$path</span> HTTP/1.0rn&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://www.php.net/fputs"><span style="color: #990000;">fputs</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Host: <span style="color: #006699; font-weight: bold;">$serverrn</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://www.php.net/fputs"><span style="color: #990000;">fputs</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Content-Type: text/xmlrn&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://www.php.net/fputs"><span style="color: #990000;">fputs</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Content-Length: <span style="color: #006699; font-weight: bold;">$contentLengthrn</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://www.php.net/fputs"><span style="color: #990000;">fputs</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Connection: closern&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<a href="http://www.php.net/fputs"><span style="color: #990000;">fputs</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;rn&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// all headers sent</span>
<a href="http://www.php.net/fputs"><span style="color: #990000;">fputs</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #339933;">,</span> <span style="color: #000088;">$xmlDocument</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><a href="http://www.php.net/feof"><span style="color: #990000;">feof</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$result</span> <span style="color: #339933;">.=</span> <a href="http://www.php.net/fgets"><span style="color: #990000;">fgets</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">128</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">return</span> <span style="color: #000088;">$result</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> getBody <span style="color: #009900;">&#40;</span><span style="color: #000088;">$httpResponse</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$lines</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/preg_split"><span style="color: #990000;">preg_split</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/(rn|r|n)/'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$httpResponse</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$responseBody</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$lineCount</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/count"><span style="color: #990000;">count</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$lines</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$lineCount</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$lines</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$j</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> <span style="color: #000088;">$j</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$lineCount</span><span style="color: #339933;">;</span> <span style="color: #000088;">$j</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$responseBody</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$lines</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$j</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;n&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">return</span> <span style="color: #000088;">$responseBody</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000088;">$xmlpacket</span> <span style="color: #339933;">=</span><span style="color: #0000ff;">'&lt;AATHtlDispReq1&gt;
&lt;Agency&gt;
&lt;Iata&gt;1234567890&lt;/Iata&gt;
&lt;Agent&gt;lgsoftwares&lt;/Agent&gt;
&lt;Password&gt;myapassword&lt;/Password&gt;
&lt;Brand&gt;phpmind.com&lt;/Brand&gt;
&lt;/Agency&gt;
&lt;Passengers&gt;
&lt;Adult AGE=&quot;&quot; ID=&quot;1&quot;&gt;&lt;/Adult&gt;
&lt;Adult AGE=&quot;&quot; ID=&quot;2&quot;&gt;&lt;/Adult&gt;
&lt;/Passengers&gt;
&lt;DestCode&gt;OGG&lt;/DestCode&gt;
&lt;CheckInDate&gt;101009&lt;/CheckInDate&gt;
&lt;/AATHtlDispReq1&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> postXMLtoURL<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;www.yourdomain.com&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;/path/&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$xmlpacket</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$responseBody</span> <span style="color: #339933;">=</span> getBody<span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$responseBody</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.phpmind.com%2Fblog%2F2009%2F08%2Fhow-to-post-xml-using-socket%2F&amp;linkname=How%20to%20post%20XML%20using%20socket%20%3F"><img src="http://www.phpmind.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.phpmind.com/blog/2009/08/how-to-post-xml-using-socket/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to post XML using CURL?</title>
		<link>http://www.phpmind.com/blog/2009/08/how-to-post-xml-using-curl/</link>
		<comments>http://www.phpmind.com/blog/2009/08/how-to-post-xml-using-curl/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 19:34:33 +0000</pubDate>
		<dc:creator>om</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP-XML]]></category>

		<guid isPermaLink="false">http://www.phpmind.com/blog/?p=409</guid>
		<description><![CDATA[Recently I was working in a hotel booking engine and found a couple of methods to post XML to server; I thought this might be good to share with my friends who want to post xml via HTTP POST method. There are several ways to Send XML requests via HTTP POST. I am going to [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was working in a hotel booking engine and found a couple of methods to post XML to server; I thought this might be good to share with my friends who want to post xml via HTTP POST method.</p>
<p>There are several ways to Send XML requests via HTTP POST.<br />
I am going to show you two ways. Both are very simple and easy.</p>
<p>As first approach I have used a small xml file with CURL.</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p409code8'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p4098"><td class="code" id="p409code8"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> 
<span style="color: #000088;">$xml_data</span> <span style="color: #339933;">=</span><span style="color: #0000ff;">'&lt;AATAvailReq1&gt;'</span><span style="color: #339933;">.</span>
    <span style="color: #0000ff;">'&lt;Agency&gt;'</span><span style="color: #339933;">.</span>
        <span style="color: #0000ff;">'&lt;Iata&gt;1234567890&lt;/Iata&gt;'</span><span style="color: #339933;">.</span>
        <span style="color: #0000ff;">'&lt;Agent&gt;lgsoftwares&lt;/Agent&gt;'</span><span style="color: #339933;">.</span>
        <span style="color: #0000ff;">'&lt;Password&gt;mypassword&lt;/Password&gt;'</span><span style="color: #339933;">.</span>
        <span style="color: #0000ff;">'&lt;Brand&gt;phpmind.com&lt;/Brand&gt;'</span><span style="color: #339933;">.</span>
    <span style="color: #0000ff;">'&lt;/Agency&gt;'</span><span style="color: #339933;">.</span>
    <span style="color: #0000ff;">'&lt;Passengers&gt;'</span><span style="color: #339933;">.</span>
        <span style="color: #0000ff;">'&lt;Adult AGE=&quot;&quot; ID=&quot;1&quot;&gt;&lt;/Adult&gt;'</span><span style="color: #339933;">.</span>
        <span style="color: #0000ff;">'&lt;Adult AGE=&quot;&quot; ID=&quot;2&quot;&gt;&lt;/Adult&gt;'</span><span style="color: #339933;">.</span>
    <span style="color: #0000ff;">'&lt;/Passengers&gt;'</span><span style="color: #339933;">.</span>
<span style="color: #0000ff;">'&lt;HotelAvailReq1&gt;'</span><span style="color: #339933;">.</span>
<span style="color: #0000ff;">'&lt;DestCode&gt;JHM&lt;/DestCode&gt;'</span><span style="color: #339933;">.</span>
        <span style="color: #0000ff;">'&lt;HotelCode&gt;OGGSHE&lt;/HotelCode&gt;'</span><span style="color: #339933;">.</span>
        <span style="color: #0000ff;">'&lt;CheckInDate&gt;101009&lt;/CheckInDate&gt;'</span><span style="color: #339933;">.</span>
        <span style="color: #0000ff;">'&lt;CheckOutDate&gt;101509&lt;/CheckOutDate&gt;'</span><span style="color: #339933;">.</span>
        <span style="color: #0000ff;">'&lt;UseField&gt;1&lt;/UseField&gt;'</span><span style="color: #339933;">.</span>
  <span style="color: #0000ff;">'&lt;/HotelAvailReq1&gt;'</span><span style="color: #339933;">.</span>  
  <span style="color: #0000ff;">'&lt;/AATAvailReq1&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #000088;">$URL</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;https://www.yourwebserver.com/path/&quot;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #000088;">$ch</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/curl_init"><span style="color: #990000;">curl_init</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$URL</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_MUTE<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_SSL_VERIFYHOST<span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_SSL_VERIFYPEER<span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_POST<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_HTTPHEADER<span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-Type: text/xml'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_POSTFIELDS<span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$xml_data</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_RETURNTRANSFER<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/curl_exec"><span style="color: #990000;">curl_exec</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<a href="http://www.php.net/curl_close"><span style="color: #990000;">curl_close</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.phpmind.com%2Fblog%2F2009%2F08%2Fhow-to-post-xml-using-curl%2F&amp;linkname=How%20to%20post%20XML%20using%20CURL%3F"><img src="http://www.phpmind.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.phpmind.com/blog/2009/08/how-to-post-xml-using-curl/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>New PHP e-books</title>
		<link>http://www.phpmind.com/blog/2009/08/new-php-e-books/</link>
		<comments>http://www.phpmind.com/blog/2009/08/new-php-e-books/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 17:19:20 +0000</pubDate>
		<dc:creator>om</dc:creator>
				<category><![CDATA[Free PHP Books]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.phpmind.com/blog/?p=402</guid>
		<description><![CDATA[If you are looking for any other specific book of php and mysql contact me! Beginning PHP4 Integrating PHP and XML Object Oriented Programming with PHP5 PHP5 MySQL Programming for the Absolute Beginner Php Mysql Programming For The Absolute Beginner PHP MySQL Programming]]></description>
			<content:encoded><![CDATA[<p>If you are looking for any other specific book of php and mysql contact me!</p>
<ol>
<li><a href="http://rapidshare.com/files/115655778/Beginning_PHP4.rar">Beginning PHP4</a></li>
<li> <a href="http://rapidshare.com/files/115656526/Integrating_PHP_and_XML.rar">Integrating PHP and XML</a></li>
<li> <a href="http://rapidshare.com/files/115656763/Packt_Publishing_Object_Oriented_Programming_with_PHP5.rar">Object Oriented Programming with PHP5</a></li>
<li><a href="http://rapidshare.com/files/115657723/PHP_5_-_MySQLProgramming_for_the_Absolute_Beginner.rar">PHP5 MySQL Programming for the Absolute Beginner</a></li>
<li> <a href="http://rapidshare.com/files/115657933/Php_Mysql_Programming_For_The_Absolute_Beginner.rar">Php Mysql Programming For The Absolute Beginner</a></li>
<li> <a href="http://rapidshare.com/files/115659506/Premier_Press_-_PHP.MySQL_Programming_.rar">PHP MySQL Programming</a></li>
</ol>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.phpmind.com%2Fblog%2F2009%2F08%2Fnew-php-e-books%2F&amp;linkname=New%20PHP%20e-books"><img src="http://www.phpmind.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.phpmind.com/blog/2009/08/new-php-e-books/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Stop SQL Injection in MYSQL?</title>
		<link>http://www.phpmind.com/blog/2009/08/how-to-stop-sql-injection-in-mysql/</link>
		<comments>http://www.phpmind.com/blog/2009/08/how-to-stop-sql-injection-in-mysql/#comments</comments>
		<pubDate>Sun, 09 Aug 2009 18:50:21 +0000</pubDate>
		<dc:creator>om</dc:creator>
				<category><![CDATA[Easy PHP]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.phpmind.com/blog/?p=365</guid>
		<description><![CDATA[Every PHP-MYSQL programmer need to know Anti-SQL Injection. Please take a look at very simple function which can save your database!! View Code PHP&#60;?Php &#160; function ClearInput&#40;$dirty&#41;&#123; &#160; if &#40;get_magic_quotes_gpc&#40;&#41;&#41; &#123; &#160; $clean = mysql_real_escape_string&#40;stripslashes&#40;$dirty&#41;&#41;; &#160; &#125;else&#123; &#160; $clean = mysql_real_escape_string&#40;$dirty&#41;; &#160; &#125; return $clean; &#160; &#125; &#160; ?&#62;]]></description>
			<content:encoded><![CDATA[<p>Every PHP-MYSQL programmer need to know Anti-SQL Injection. </p>
<p>Please take a look at very simple function which can save your database!!</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p365code10'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p36510"><td class="code" id="p365code10"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?Php</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> ClearInput<span style="color: #009900;">&#40;</span><span style="color: #000088;">$dirty</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/get_magic_quotes_gpc"><span style="color: #990000;">get_magic_quotes_gpc</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000088;">$clean</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/mysql_real_escape_string"><span style="color: #990000;">mysql_real_escape_string</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/stripslashes"><span style="color: #990000;">stripslashes</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dirty</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000088;">$clean</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/mysql_real_escape_string"><span style="color: #990000;">mysql_real_escape_string</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dirty</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$clean</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.phpmind.com%2Fblog%2F2009%2F08%2Fhow-to-stop-sql-injection-in-mysql%2F&amp;linkname=How%20to%20Stop%20SQL%20Injection%20in%20MYSQL%3F"><img src="http://www.phpmind.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.phpmind.com/blog/2009/08/how-to-stop-sql-injection-in-mysql/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Redirect with PHP?</title>
		<link>http://www.phpmind.com/blog/2009/07/how-to-redirect-with-php/</link>
		<comments>http://www.phpmind.com/blog/2009/07/how-to-redirect-with-php/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 00:13:18 +0000</pubDate>
		<dc:creator>om</dc:creator>
				<category><![CDATA[Easy PHP]]></category>

		<guid isPermaLink="false">http://www.phpmind.com/blog/?p=334</guid>
		<description><![CDATA[You need to replace the URL above with the URL you wish to direct to. Use this simple PHP script to redirect a user from the page they entered to a different web page. View Code PHP&#60;?php header&#40; 'Location: http://www.phpmind.com.com/blog/' &#41; ; ?&#62;]]></description>
			<content:encoded><![CDATA[<p>You need to replace the URL above with the URL you wish to direct to.<br />
Use this simple PHP script to redirect a user from the page they entered to a different web page.</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p334code12'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p33412"><td class="code" id="p334code12"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<a href="http://www.php.net/header"><span style="color: #990000;">header</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'Location: http://www.phpmind.com.com/blog/'</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.phpmind.com%2Fblog%2F2009%2F07%2Fhow-to-redirect-with-php%2F&amp;linkname=How%20to%20Redirect%20with%20PHP%3F"><img src="http://www.phpmind.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.phpmind.com/blog/2009/07/how-to-redirect-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to display certain number of words from a record?</title>
		<link>http://www.phpmind.com/blog/2009/05/how-to-display-certain-number-of-words-from-a-record/</link>
		<comments>http://www.phpmind.com/blog/2009/05/how-to-display-certain-number-of-words-from-a-record/#comments</comments>
		<pubDate>Fri, 15 May 2009 17:49:44 +0000</pubDate>
		<dc:creator>om</dc:creator>
				<category><![CDATA[Easy PHP]]></category>

		<guid isPermaLink="false">http://www.phpmind.com/blog/?p=332</guid>
		<description><![CDATA[I got good php tutorial to display certain number of words from database; in place of Database record you can use any other regular string. View Code PHP&#60;?php $text = $row_recap&#91;'text'&#93;; if &#40;strlen&#40;$text&#41; &#62; 300&#41; &#123; $ext = &#34;... &#60;a href='readmore.php'&#62;read more&#60;/a&#62;&#34;; &#125; else &#123; $ext = &#34;&#34;; &#125; function elliStr&#40;$s,$n&#41; &#123; for &#40; $x [...]]]></description>
			<content:encoded><![CDATA[<p>I got good php tutorial to display certain number of words from database; in place of Database record you can use any other regular string.</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p332code14'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p33214"><td class="code" id="p332code14"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row_recap</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'text'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/strlen"><span style="color: #990000;">strlen</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">300</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$ext</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;... &lt;a href='readmore.php'&gt;read more&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$ext</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">function</span> elliStr<span style="color: #009900;">&#40;</span><span style="color: #000088;">$s</span><span style="color: #339933;">,</span><span style="color: #000088;">$n</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$x</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$x</span> <span style="color: #339933;">&lt;</span> <a href="http://www.php.net/strlen"><span style="color: #990000;">strlen</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$s</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$x</span><span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$o</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$n</span><span style="color: #339933;">+</span><span style="color: #000088;">$x</span> <span style="color: #339933;">&gt;=</span> <a href="http://www.php.net/strlen"><span style="color: #990000;">strlen</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$s</span><span style="color: #009900;">&#41;</span>? <span style="color: #000088;">$s</span> <span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$s</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$n</span><span style="color: #339933;">+</span><span style="color: #000088;">$x</span><span style="color: #009900;">&#125;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot; &quot;</span>?
<a href="http://www.php.net/substr"><span style="color: #990000;">substr</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$s</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #000088;">$n</span><span style="color: #339933;">+</span><span style="color: #000088;">$x</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;...&quot;</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$o</span><span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">return</span> <span style="color: #000088;">$o</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #009900;">&#40;</span>elliStr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$text</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">300</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$ext</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.phpmind.com%2Fblog%2F2009%2F05%2Fhow-to-display-certain-number-of-words-from-a-record%2F&amp;linkname=How%20to%20display%20certain%20number%20of%20words%20from%20a%20record%3F"><img src="http://www.phpmind.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.phpmind.com/blog/2009/05/how-to-display-certain-number-of-words-from-a-record/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to remove HTML Tags from string?</title>
		<link>http://www.phpmind.com/blog/2009/05/how-to-remove-html-tags-from-string/</link>
		<comments>http://www.phpmind.com/blog/2009/05/how-to-remove-html-tags-from-string/#comments</comments>
		<pubDate>Fri, 15 May 2009 16:12:04 +0000</pubDate>
		<dc:creator>om</dc:creator>
				<category><![CDATA[Easy PHP]]></category>

		<guid isPermaLink="false">http://www.phpmind.com/blog/?p=327</guid>
		<description><![CDATA[If your strings have image code, any html code or DIV code you can easily remove using this code. View Code PHP&#60;?Php $str = preg_replace&#40;&#34;/&#60;.*?&#62;/&#34;, &#34;&#34;, $str&#41;; ?&#62; Hope this little code will be useful for you.]]></description>
			<content:encoded><![CDATA[<p>If your strings have image code, any html code or DIV code you can easily remove using this code.</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p327code16'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p32716"><td class="code" id="p327code16"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?Php</span>
<span style="color: #000088;">$str</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/preg_replace"><span style="color: #990000;">preg_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/&lt;.*?&gt;/&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$str</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Hope this little code will be useful for you. </p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.phpmind.com%2Fblog%2F2009%2F05%2Fhow-to-remove-html-tags-from-string%2F&amp;linkname=How%20to%20remove%20HTML%20Tags%20from%20string%3F"><img src="http://www.phpmind.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.phpmind.com/blog/2009/05/how-to-remove-html-tags-from-string/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to display limited characters?</title>
		<link>http://www.phpmind.com/blog/2009/05/how-to-display-limited-characters/</link>
		<comments>http://www.phpmind.com/blog/2009/05/how-to-display-limited-characters/#comments</comments>
		<pubDate>Fri, 15 May 2009 16:05:52 +0000</pubDate>
		<dc:creator>om</dc:creator>
				<category><![CDATA[Easy PHP]]></category>

		<guid isPermaLink="false">http://www.phpmind.com/blog/?p=321</guid>
		<description><![CDATA[To display limited characters from database or from string there is a ready made function available in php it is called &#8211; substr ( string string, int start [, int length]) View Code PHP&#60;?php $mysite = &#34;phpmind.com&#34;; $string = substr&#40;$mysite, 0,7&#41;; echo $string; ?&#62; Out put will be &#8211; phpmind]]></description>
			<content:encoded><![CDATA[<p>To display limited characters from database or from string there is a ready made function available in php it is called  &#8211; substr ( string string, int start [, int length])</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p321code18'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p32118"><td class="code" id="p321code18"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$mysite</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;phpmind.com&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$string</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/substr"><span style="color: #990000;">substr</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mysite</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">7</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$string</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>
Out put will be &#8211;  phpmind</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.phpmind.com%2Fblog%2F2009%2F05%2Fhow-to-display-limited-characters%2F&amp;linkname=How%20to%20display%20limited%20characters%3F"><img src="http://www.phpmind.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.phpmind.com/blog/2009/05/how-to-display-limited-characters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
