Tuesday, February 23, 2010

PHP cURL - An Insight

It has been quite some since I shared something useful. Here it is…
The piece of code I give here is a Black Hat SEO hack and I take no responsibility if you use it for spamming purposes. You can use it to spam though but do NOT credit me :)
With no further ado, let’s begin!
If you are a blogger or Black Hat SEO Enthusiast, you would have wanted to blast comments on more than 1Lac blogs in literally no time, yeah? (If you are new to Blogging and ask WHY I would want to comment on that many blogs then the simple answer is – BACKLINKS. Yeah! When you comment on someone’s blog post, you have the option to leave your Blog/Website URL there thus getting a FREE, One-Way Backlink)
Here is the code for you… I hope that I have given enough comments for even beginners to understand and also I have used fake details so do not try to spam me back using this script haha.
Obviously, I have coded this in PHP - cURL. I just started learning cURL library and thought why not try something to SPAM others. The result is this little devil... I mean the script
$postfields = array();
$postfields["action"] = "submit";
$postfields["author"] = "Bhavani";
$postfields["email"] = "Bhavani_is_a_spammer@gmail.com";
$postfields["url"] = "http://www.BhavaniKannan.com/";
$postfields["comment"] = "WoW! What a cool post. I am sure gonna bookmark this.";
$postfields["comment_post_ID"] = "123";
$postfields["_wp_unfiltered_html_comment"] = "0d870b294b";
//Url of the form submission
$url = "http://www.SomeBlogThatDoesNotExist.com/blog/suggerer_site.php?action=meta_pass&id_cat=0";
$useragent = "Mozilla/5.0";
$referer = $url; 
//Initialize CURL session
$ch = curl_init($url);
//CURL options
curl_setopt($ch, CURLOPT_POST, 1);
//We post $postfields data
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
//We define an useragent (Mozilla/5.0)
curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
//We define a refferer ($url)
curl_setopt($ch, CURLOPT_REFERER, $referer);
//We get the result page in a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//We exits CURL
$result = curl_exec($ch);
//Finally, we display the result
echo $result;
How to use this?
Make a .php script out of the above code I have given and host it in your server. Point the hosted URL at your web browser and there you go… “Someone got a SPAMMy comment on their blog” J
Tested and Validated by me both in my Local Host and Web Host. I use LAMP at home. No matter what you use – LAMP, XAMP or WAMP just make sure you have the cURL library balue set ON (value=1) for this script to run.
Also, try variations by having a list of URL’s in an EXCEL sheet where you want to make a comment. Instead of passing one single URL using the $url variable, make your script read the .XLS sheet and spam on… I mean comment on all those victim blogs.
I hope you find this useful J
Next: I am now in the process of making a Twitter bot that will automatically add friends, send auto tweets, etc. I know there is one such tool available in the Market but it costs hell a lot ($199). I am planning to create a remake of it with minimal yet essential features and make it available for free. The use of my Twitter bot would be to increase my CTR (Click Through Rate – Refer Wiki for more) and also to bring in more traffic to my site.
Have a great day guys!

If you are a Web Designer/Developer, you will love this…
You must be aware of Lorem Ipsum. It is not some dumb random text like many of us think. It is intentionally designed to mimic the size and spacing of English text.
How many times have you longed for an Image Version of it? Well I did J
While designing templates especially for Wordpress, I try to fill the 125x125 ad spaces with self-made images. Are you of my kind? – Gone are those days!
Here comes DummyImage Comes to saves us!
How to use it?
Now you get the idea, yeah? :)

The creator of this must have great sense of humor :)

It can be awkward asking for honest feedback from the people around you, but knowing how others perceive us is important to self improvement. New service BetterMe helps you solicit advice from others without putting them on the spot.
Is the entire office annoyed at the team member who yaps away loudly on her cell phone all day? Use BetterMe to send a gentle—and anonymous—email to call her attention to the issue.
Source: Make Use Of
Check out Better Me