<?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>Asia Web Developing Services</title>
	<atom:link href="http://www.asiawebdevservices.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.asiawebdevservices.com</link>
	<description>Affordable Professional Website Design</description>
	<lastBuildDate>Sat, 24 Apr 2010 03:20:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Remove the index.php on WordPress permalink</title>
		<link>http://www.asiawebdevservices.com/remove-the-index-php-on-wordpress-permalink/</link>
		<comments>http://www.asiawebdevservices.com/remove-the-index-php-on-wordpress-permalink/#comments</comments>
		<pubDate>Sat, 24 Apr 2010 03:19:33 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[How-to]]></category>

		<guid isPermaLink="false">http://www.asiawebdevservices.com/?p=246</guid>
		<description><![CDATA[Using FTP go to the main directory of your website. public_html folder.
Download .htaccess .. Back it up.
Then delete .htaccess on your directory.
Then go back to the PERMALINK setting, and change it.
Then upload your .htaccess again.
Everything should work.
BUT If it doesn&#8217;t work&#8230;
Put this code on your .htaccess file

&#60;IfModule mod_rewrite.c&#62;
 RewriteEngine On
 RewriteBase /
 RewriteCond %{REQUEST_FILENAME} !-f
 [...]]]></description>
			<content:encoded><![CDATA[<p>Using FTP go to the main directory of your website. <strong>public_html</strong> folder.</p>
<p>Download <strong>.htaccess</strong> .. Back it up.</p>
<p>Then delete <strong>.htaccess</strong> on your directory.</p>
<p>Then go back to the PERMALINK setting, and change it.<br />
Then upload your <strong>.htaccess</strong> again.</p>
<p>Everything should work.</p>
<p>BUT If it doesn&#8217;t work&#8230;</p>
<p>Put this code on your <strong>.htaccess</strong> file</p>
<blockquote>
<pre>&lt;IfModule mod_rewrite.c&gt;
 RewriteEngine On
 RewriteBase /
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule . /index.php [L]
 &lt;/IfModule&gt;</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.asiawebdevservices.com/remove-the-index-php-on-wordpress-permalink/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Tips: How to query post title and excerpt using PHP</title>
		<link>http://www.asiawebdevservices.com/wordpress-tips-how-to-query-post-title-and-excerpt-using-php/</link>
		<comments>http://www.asiawebdevservices.com/wordpress-tips-how-to-query-post-title-and-excerpt-using-php/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 16:18:52 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[How-to]]></category>

		<guid isPermaLink="false">http://www.asiawebdevservices.com/?p=243</guid>
		<description><![CDATA[I was working on a client&#8217;s website, which was running on WordPress and he was using ShopperPress on that site.
And he also have one separate website for his main website.
Now he wanted me to pull some data on the other site (with the ShopperPress) and put it on the home page of his main website.
Now [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on a client&#8217;s website, which was running on WordPress and he was using ShopperPress on that site.<br />
And he also have one separate website for his main website.</p>
<p>Now he wanted me to pull some data on the other site (with the ShopperPress) and put it on the home page of his main website.</p>
<p>Now what I did is pretty simple, I just wanted to share this..</p>
<p>Here&#8217;s what I did:</p>
<blockquote>
<pre>&lt;?php
if (!$link = mysql_connect('localhost', 'DBUSER', 'DBPASS')) {
echo 'Could not connect to mysql';
exit;
} if (!mysql_select_db('DATABASE NAME HERE', $link)) {
echo 'Could not select database';
exit;
}
$delrev = "DELETE FROM wp_posts WHERE post_type = 'revision'";
$sql = "SELECT * FROM `wp_posts` ORDER BY `wp_posts`.`post_type` DESC LIMIT 0, 3 ";
$w = mysql_query($delrev);
$result = mysql_query($sql, $link);
if (!$result) {
echo "DB Error, could not query the database\n";
echo 'MySQL Error: ' . mysql_error();
exit;
}

if (!$w) {
echo "DB Error, could not query the database\n";
echo 'MySQL Error: ' . mysql_error();
exit;
}

if ($row['post_type'] = "post" ) {

while ($row = mysql_fetch_assoc($result)) {
echo "&lt;a href=\"";
echo $row['guid'];
echo "\"&gt;";
echo substr($row['post_title'], 0, 46);
echo "&lt;/a&gt;";

echo substr($row['post_excerpt'], 0, 160);

}

}
mysql_free_result($result);
mysql_close();
?&gt;</pre>
</blockquote>
<p>Just Replace the DBUSER with your Database Username, DBPASS with your Database Password and of course for the DATABASE NAME for your database name. (Obviously)</p>
<p>Now I added this code to avoid duplication of the post that we are going to query.</p>
<blockquote>
<pre>$delrev = "DELETE FROM wp_posts WHERE post_type = 'revision'";</pre>
</blockquote>
<p>That will actually tell the database to delete all autosave files that are on our database because we want to avoid duplication.</p>
<blockquote>
<pre>$sql = "SELECT * FROM `wp_posts` ORDER BY `wp_posts`.`post_type` DESC LIMIT 0, 3 ";</pre>
</blockquote>
<p>And also DESC LIMIT 0, 3 &#8230; Just means that we are limiting it only to 3 data.<br />
You can actually just figure out everything for yourself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asiawebdevservices.com/wordpress-tips-how-to-query-post-title-and-excerpt-using-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hide Your Online Status on Facebook Chat from a Selected Contacts</title>
		<link>http://www.asiawebdevservices.com/hide-your-online-status-on-facebook-chat-from-a-selected-contacts/</link>
		<comments>http://www.asiawebdevservices.com/hide-your-online-status-on-facebook-chat-from-a-selected-contacts/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 02:15:46 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[How-to]]></category>

		<guid isPermaLink="false">http://www.asiawebdevservices.com/?p=235</guid>
		<description><![CDATA[If you are connected with too many people on Facebook and need to hide  your online status on Facebook Chat from certain contacts, here’s some  help.

Facebook has  integrated friends list with Chat and you can also choose which of  these list members get to see you online.

So you can stay visible [...]]]></description>
			<content:encoded><![CDATA[<p>If you are connected with too many people on Facebook and need to hide  your online status on Facebook Chat from certain contacts, here’s some  help.</p>
<p><img class="alignleft size-full wp-image-236" title="facebookchat" src="http://www.asiawebdevservices.com/wp-content/uploads/2010/04/facebookchat.png" alt="facebookchat" width="516" height="296" /></p>
<p>Facebook <a href="http://blog.facebook.com/blog.php?post=84283397130&amp;_fb_noscript=1">has  integrated</a> friends list with Chat and you can also choose which of  these list members get to see you online.</p>
<p><a href="http://img.labnol.org/di/ab4b5054fce1_9562/offlinechat.png"><img style="border-width: 0px; display: inline; margin-left: 0px; margin-right: 0px;" title="go offline chat" src="http://img.labnol.org/di/ab4b5054fce1_9562/offlinechat_thumb.png" border="0" alt="go offline chat" width="203" height="179" align="right" /></a></p>
<p>So you can stay visible to your family members and close friends  while the rest of your Facebook friends won’t know if you are logged  into Facebook.</p>
<p>Earlier you had to completely <a href="http://www.labnol.org/internet/disable-facebook-chat-permanently/4572/">turn  off Facebook chat</a> in order to hide your online status from other  contacts.</p>
<p>The Facebook chat window has easy sliders so you can easily toggle  your online status for any friends list in a click.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asiawebdevservices.com/hide-your-online-status-on-facebook-chat-from-a-selected-contacts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Tips: Shorten the title of posts</title>
		<link>http://www.asiawebdevservices.com/wordpress-tips-shorten-the-title-of-posts/</link>
		<comments>http://www.asiawebdevservices.com/wordpress-tips-shorten-the-title-of-posts/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 14:01:42 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://www.asiawebdevservices.com/?p=230</guid>
		<description><![CDATA[Create or open the functions.php in your wordpress templates folder.  We will add a function which makes all the work for us everytime we will  need it.
FIND

&#60;?php

ADD BENEATH

function ShortenText($text)

{

$chars_limit = 100;

$chars_text = strlen($text);

$text = $text." ";

$text = substr($text,0,$chars_limit);

$text = substr($text,0,strrpos($text,' '));

if ($chars_text &#62; $chars_limit)

{

$text = $text."...";

}

return $text;

}

Now we add a little code to [...]]]></description>
			<content:encoded><![CDATA[<p>Create or open the functions.php in your wordpress templates folder.  We will add a function which makes all the work for us everytime we will  need it.</p>
<p><strong>FIND</strong></p>
<blockquote>
<pre>&lt;?php</pre>
</blockquote>
<p><strong>ADD BENEATH</strong></p>
<blockquote>
<pre>function ShortenText($text)

{

$chars_limit = 100;

$chars_text = strlen($text);

$text = $text." ";

$text = substr($text,0,$chars_limit);

$text = substr($text,0,strrpos($text,' '));

if ($chars_text &gt; $chars_limit)

{

$text = $text."...";

}

return $text;

}</pre>
</blockquote>
<p>Now we add a little code to the place within the loop for example to cut  the title. It will call the function and short the title. Take  attention to the title function: get_the_title() instead of the_title(),  because the_title() would give out the title directly.</p>
<p><strong>FIND</strong></p>
<blockquote>
<pre>&lt;?php the_title(); ?&gt;</pre>
</blockquote>
<p><strong>REPLACE WITH</strong></p>
<blockquote>
<pre>&lt;?php echo ShortenText(get_the_title()); ?&gt;</pre>
</blockquote>
<p>Source: http://www.knowtebook.com/wordpress-shorten-the-title-of-posts-or-everything-else-you-want-872.htm</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asiawebdevservices.com/wordpress-tips-shorten-the-title-of-posts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The_Excerpt Length</title>
		<link>http://www.asiawebdevservices.com/controlling-the_excerpt-length-on-wordpress/</link>
		<comments>http://www.asiawebdevservices.com/controlling-the_excerpt-length-on-wordpress/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 09:18:45 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://www.asiawebdevservices.com/?p=223</guid>
		<description><![CDATA[I found a small yet very useful code for controlling the length of the_excerpt on WordPress.
&#60;?php if ($post-&#62;post_excerpt != &#8220;&#8221; ) {
the_excerpt();
}
else {
the_content_rss(&#8221;, FALSE, &#8221;, 26);
}
?&#62;
Replace 26 for the numbers of  words to display on your excerpt.
Also check out Word Count Tool .
]]></description>
			<content:encoded><![CDATA[<p>I found a small yet very useful code for controlling the length of the_excerpt on WordPress.</p>
<blockquote><p>&lt;?php if ($post-&gt;post_excerpt != &#8220;&#8221; ) {<br />
the_excerpt();<br />
}<br />
else {<br />
the_content_rss(&#8221;, FALSE, &#8221;, 26);<br />
}<br />
?&gt;</p></blockquote>
<p>Replace 26 for the numbers of  words to display on your excerpt.</p>
<p>Also check out <a href="http://www.wordcounttool.com/">Word Count Tool</a> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.asiawebdevservices.com/controlling-the_excerpt-length-on-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cURL Page Scraping Script</title>
		<link>http://www.asiawebdevservices.com/curl-page-scraping-script/</link>
		<comments>http://www.asiawebdevservices.com/curl-page-scraping-script/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 09:06:24 +0000</pubDate>
		<dc:creator>webmaster</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://www.asiawebdevservices.com/?p=220</guid>
		<description><![CDATA[Using cURL and page scraping for specific data is one of the most important things I do when creating databases. I’m not just talking about scraping pages and reposting here, either.
You can use cURL to grab the HTML of any viewable page on the web and then, most importantly take that data and pick out [...]]]></description>
			<content:encoded><![CDATA[<p>Using cURL and page scraping for specific data is one of the most important things I do when creating databases. I’m not just talking about scraping pages and reposting here, either.</p>
<p>You can use cURL to grab the HTML of any viewable page on the web and then, most importantly take that data and pick out the bits you need. This is the basis for link analysis scripts, training scripts, compiling databases from sources around the web, there’s almost limitless things you can do.</p>
<p>I’m providing a simple PHP class here, which will use cURL to grab a page then pull out any information between user specified tags, into an array. So for instance, in our example you can grab all of the links from any web page.</p>
<p>The class is quite simple – I had to get rid of the lovely indententation to make it fit nicely onto the blog, but it’s fairly well commented.</p>
<p>In a nutshell, it does this:</p>
<p>1) Goes to specified URL</p>
<p>2) Uses cURL to grab the HTML of the URL</p>
<p>3) Takes the HTML and scans for every instance of the start and end tags you provide (e.g. &lt; a &gt; &lt; / a &gt;)</p>
<p>4) Returns these in an array for you.</p>
<p>Download <a href="http://www.digeratimarketing.co.uk/lab/taggrab/taggrab.class.zip">taggrab.class.zip</a></p>
<blockquote>
<pre>&lt;?php

class tagSpider
{

// set variable to hold curl instance
var $crl;

// this is where we dump the html we get
var $html; 

// set for binary type transfer
var $binary; 

// this is the url we are going to do a pass on
var $url;

// automatically executed on class call to clear variables
function tagSpider()
{
$this-&gt;html = "";
$this-&gt;binary = 0;
$this-&gt;url = "";
}

// takes url passed to it and.. can you guess?
function fetchPage($url)
{

// set the URL to scrape
$this-&gt;url = $url;

if (isset($this-&gt;url)) {

// start cURL instance
$this-&gt;ch = curl_init ();

// this tells cUrl to return the data
curl_setopt ($this-&gt;ch, CURLOPT_RETURNTRANSFER, 1);

// set the url to download
curl_setopt ($this-&gt;ch, CURLOPT_URL, $this-&gt;url); 

// follow redirects if any
curl_setopt($this-&gt;ch, CURLOPT_FOLLOWLOCATION, true); 

// tell cURL if the data is binary data or not
curl_setopt($this-&gt;ch, CURLOPT_BINARYTRANSFER, $this-&gt;binary); 

// grabs the webpage from the internets
$this-&gt;html = curl_exec($this-&gt;ch); 

// closes the connection
curl_close ($this-&gt;ch);
}

}

// function takes html, puts the data requested into an array
function parse_array($beg_tag, $close_tag)

{
// match data between specificed tags
preg_match_all("($beg_tag.*$close_tag)siU", $this-&gt;html, $matching_data); 

// return data in array
return $matching_data[0];
}

}
?&gt;</pre>
</blockquote>
<p>So that is your basic class, which should be fairly easy to follow  (you can ask questions in comments if needed).</p>
<p>To use this, we need to call it from another PHP file to pass the  variables we need to it.</p>
<p>Below is tag-example.php which demonstrates how to pass the URL,  start/end tag variables to the class and pump out a set of results.</p>
<p>Download <a href="http://www.digeratimarketing.co.uk/lab/taggrab/tag-example.zip">tag-example.zip</a></p>
<blockquote>
<pre>&lt;?php

// Inlcude our tag grab class
require("taggrab.class.php"); // class for spider

// Enter the URL you want to run
$urlrun="http://www.techcrunch.com/";

// Specify the start and end tags you want to grab data between
$stag="&lt;a href=";
$etag="&lt;/a&gt;";

// Make a title spider
$tspider = new tagSpider();

// Pass URL to the fetch page function
$tspider-&gt;fetchPage($urlrun);

// Enter the tags into the parse array function
$linkarray = $tspider-&gt;parse_array($stag, $etag); 

echo "&lt;h2&gt;Links present on page: ".$urlrun."&lt;/h2&gt;&lt;br /&gt;";
// Loop to pump out the results
foreach ($linkarray as $result) {

echo $result;

echo "&lt;br/&gt;";
}

?&gt;</pre>
</blockquote>
<p>So this code will pass the Techcrunch website to the class, looking  for any standard a href links. It will then simply echo these out. You  could use this in conjunction with <a rel="nofollow" href="http://www.quirk.biz/searchstatus/" target="_blank">SearchStatus Firefox Plugin</a> to quickly see what links Techcrunch is showing bots and what they are  following and nofollowing.</p>
<p>You can <a rel="nofollow" href="http://www.digeratimarketing.co.uk/lab/taggrab/tag-example.php" target="_blank">view  a working example of the code here</a>.</p>
<p>As I said, there’s so much you can do from a base like this, so have a  think. I might post some proper tutorials on extracting data  methodically, saving it to a database then manipulating it to get some  interesting results.</p>
<p>Enjoy.</p>
<p><strong>Edit:</strong> You’ll of course need cURL library installed  on your server for this to work!<br />
Source: <a href="http://www.digeratimarketing.co.uk/2008/12/16/curl-page-scraping-script/">http://www.digeratimarketing.co.uk/2008/12/16/curl-page-scraping-script/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.asiawebdevservices.com/curl-page-scraping-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
