Tensor is a sleek template that can fit many different websites. It can have a…
Shopping/Ecommerce Plugin Solutions For WordPress
Here is a list of Shopping/Ecommerce Plugin Solutions For WordPress. I thought i would start this post purely because i spent most of the day trying to find a ecommerce plugin that actually works. So hopefully it helps you too! Jigoshop Jigoshop is an eCommerce plugin for WordPress developed by...
06
Jul
2011
1 Comment
Read More
Good SEO practices – How to beat Google panda
Last week we did a post on Google panda “Has your site been Google Panda slapped?”. This week I want to share with you some ideas and practice that you can apply to your website to help improve and beat the panda! Google has released Panda update 2.2, just as...
27
Jun
2011
No comments
Read More
Sliding login panel with jQuery
Came across this great script for slide down login This script is based on a previous script “Show/Hide Login Panel with Mootools 1.2″ but now works with jQuery 1.3.2 instead of Mootools 1.2. Please note the Login and Register forms in this demo will not work “out of the box”...
22
Feb
2011
No comments
Read More
YouTube Clone Script
http://www.clipsharetemplates.com clone script allows you to run your own video sharing portal like YouTube.com, Metacafe, DailyMotion, and others The ClearWater template is a stunning and light design featuring stylish mouseover effects and will be a great addition to any video sharing website using Clipshare 4.1 Professional. The Clearwatter template utilizes...
10
Oct
2010
1 Comment
Read More
PHP Coupon Clone Script
Easy-to-use SEO friendly coupon script which allow you to create Discounts/Promotion Coupons web site. Earn affiliate commissions while offering discounts for your visitors! With 9 different designs you will be able to create perfect coupon web site in any niche! Add website/store with Seo title, keywords and affiliate url Activate...
23
Sep
2010
No comments
Read More
Image Sharing Script
Create your own popular image sharing website. Allow users to share their picture and photos with everyone. Host images instantly with this image hosting script. Features Rate Images Users can rate images with the 5 star rating system (ajax). Rate Images Security Users are only allowed to vote once per...
14
Jul
2010
1 Comment
Read More
Yahoo answers clone scriptYahoo answers clone script
Looking to create your own Yahoo Answer Website. Well here is the script that will help you achieve that goal! Question Answer Script with a large and highly customizable set of key features makes it the best of php answer script available. Question answer script has the question & answer...
30
May
2010
No comments
Read More
Domain Auctions Script Flippa clone script
This fantastic script can be used to create your very own Flippa website. Not only can it be used as a flippa type website, but it’s great for any marketplace niche. With this Clone Script you will be able to produce a marketplace website within minutes. PRICE: $57 DEMO...
29
May
2010
2 Comments
Read More
Being experimenting with the API of Twitter. I started out playing with curl to send updates from a joomla directory, once a user added a listing. The concept was to have followers follow the updates live via twitter. Tools used: Joomla , Sobi2 and some basic PHP.
Firstly make sure your server supports curl and that the extension is active. A simple install to linux would look something like this.
Now you have PHP cURL installed, the next thing you need to do is to restart apache2, run the following command in your terminal:
In the command terminal run the following command to test the connection to twitter. You can use the -v dump method to post any errors on the screen if connection fails. example curl -u -v ( and then the command )
I then used the PHP curl features to do the same thing from PHP:
<span class="pun"><?</span><span class="pln">php
</span><span class="com">// Set username and password</span><span class="pln">
$username </span><span class="pun">=</span><span class="pln"> </span><span class="str">'username'</span><span class="pun">;</span><span class="pln">
$password </span><span class="pun">=</span><span class="pln"> </span><span class="str">'password'</span><span class="pun">;</span><span class="pln">
</span><span class="com">// The message you want to send</span><span class="pln">
$message </span><span class="pun">=</span><span class="pln"> </span><span class="str">'is twittering from php using curl'</span><span class="pun">;</span><span class="pln">
</span><span class="com">// The twitter API address</span><span class="pln">
$url </span><span class="pun">=</span><span class="pln"> </span><span class="str">'http://twitter.com/statuses/update.xml'</span><span class="pun">;</span><span class="pln">
</span><span class="com">// Alternative JSON version</span><span class="pln">
</span><span class="com">// $url = 'http://twitter.com/statuses/update.json';</span><span class="pln">
</span><span class="com">// Set up and execute the curl process</span><span class="pln">
$curl_handle </span><span class="pun">=</span><span class="pln"> curl_init</span><span class="pun">();</span><span class="pln">
curl_setopt</span><span class="pun">(</span><span class="pln">$curl_handle</span><span class="pun">,</span><span class="pln"> CURLOPT_URL</span><span class="pun">,</span><span class="pln"> </span><span class="str">"$url"</span><span class="pun">);</span><span class="pln">
curl_setopt</span><span class="pun">(</span><span class="pln">$curl_handle</span><span class="pun">,</span><span class="pln"> CURLOPT_CONNECTTIMEOUT</span><span class="pun">,</span><span class="pln"> </span><span class="lit">2</span><span class="pun">);</span><span class="pln">
curl_setopt</span><span class="pun">(</span><span class="pln">$curl_handle</span><span class="pun">,</span><span class="pln"> CURLOPT_RETURNTRANSFER</span><span class="pun">,</span><span class="pln"> </span><span class="lit">1</span><span class="pun">);</span><span class="pln">
curl_setopt</span><span class="pun">(</span><span class="pln">$curl_handle</span><span class="pun">,</span><span class="pln"> CURLOPT_POST</span><span class="pun">,</span><span class="pln"> </span><span class="lit">1</span><span class="pun">);</span><span class="pln">
curl_setopt</span><span class="pun">(</span><span class="pln">$curl_handle</span><span class="pun">,</span><span class="pln"> CURLOPT_POSTFIELDS</span><span class="pun">,</span><span class="pln"> </span><span class="str">"status=$message"</span><span class="pun">);</span><span class="pln">
curl_setopt</span><span class="pun">(</span><span class="pln">$curl_handle</span><span class="pun">,</span><span class="pln"> CURLOPT_USERPWD</span><span class="pun">,</span><span class="pln"> </span><span class="str">"$username:$password"</span><span class="pun">);</span><span class="pln">
$buffer </span><span class="pun">=</span><span class="pln"> curl_exec</span><span class="pun">(</span><span class="pln">$curl_handle</span><span class="pun">);</span><span class="pln">
curl_close</span><span class="pun">(</span><span class="pln">$curl_handle</span><span class="pun">);</span><span class="pln">
</span><span class="com">// check for success or failure</span><span class="pln">
</span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">empty</span><span class="pun">(</span><span class="pln">$buffer</span><span class="pun">))</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
echo </span><span class="str">'message'</span><span class="pun">;</span><span class="pln">
</span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
echo </span><span class="str">'success'</span><span class="pun">;</span><span class="pln">
</span><span class="pun">}</span><span class="pln">
</span><span class="pun">?></span>
This is just a basic layout, the twitter API allows you to do so much more. Now comes the fun part. If you are using joomla and sobi2 as a directory component, here is a way to place the above code to your sobi2 directory and receive live updates once a user adds a listing.
Open the sobi2.class file , then scroll down to line 533 and insert the above code just above the sql query. You can then use the variables within the sobi2 framework to display to twitter. Here is another sample of this:
$chars = 140;
$text = $text." ";
$text = substr($text,0,$chars);
$text = substr($text,0,strrpos($text,' '));
$text = $text."...";
return $text;
}</em></span></strong>
$password = 'password';
curl_setopt($curl_handle, CURLOPT_URL, "$url");
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_POST, 1);
curl_setopt($curl_handle, CURLOPT_POSTFIELDS, "status=$twitmessage");
curl_setopt($curl_handle, CURLOPT_USERPWD, "$username:$password");
$buffer = curl_exec($curl_handle);
curl_close($curl_handle);
// check for success or failure
if (empty($buffer)) {
$twitresponse = 'Deal not posted to Twitter';
} else {
$twitresponse = 'Deal posted to Twitter';
}</em></span></strong>
Just adapt it as you need to. you can go as far as adding the url to the post. ( incorporate tiny url to keep the url short ). Will post a seperate tutorial on this shortly.

Very nice code there. If I get some spare time might have to change it into asp.net.
Very good code, might be worth just getting a PHP server for!
How to get the followers information
anyone can give the url to get the followers information from twitter.com
$url = ‘http://twitter.com/statuses/update.xml’;