Category: Tech Posts

PHP Lessons Part 3: Conditional Statements

by
Guest-GS

Today we will have a look at what Conditional Statements are.

Conditional Statements allow you to perform different kinds of actions based on a given condition. It can either return true or false.

A little Non-Programming example to give you an idea of Conditional Statement Below:

Let’s consider a guy named John, is 16 years old and wants to go to a casino. Unfortunately, casinos doesn’t allow Minors.

So basicaly, the condition is:

If John is less than 18 years old, then don’t let him inside the casino, else, let him in.

Now there are two words that are always used in PHP Conditional Statement. They are “IF” and “ELSE”. Before going on, you should know we are using caps here for emphasis. When using these keywords in code, they are lowercase! PHP is case-sensitive. “IF” and “if” are different things for PHP. Use “if” in code.

Continue Reading »

Some Spams

by
Guru

Introducing the spammers messages.

Your blog is very new, I like! I would like you to update it often! I like your recent posts. You obviously have a natural ability to blog!

– By some s.o.a.b*

Good post! I plan to move into this stuff after I’m done with school, as most of it is time consuming. It’s a great post to reference back to. My blog needs more time to gain in popularity anyway

-By another s.o.a.b*

This is a great article. I’m new to blogging but still learning. Thanks for the great resource.

-By another s.o.a.b*

This is great! It really shows me where to expand my blog. I think that sometime in the future I might try to write a book to go along with my blog, but we will see…Good post with useful tips and ideas

-By another s.o.a.b*

*s.o.a.b = Son of a female dog 🙂

Checking the comments I saw 4 new comments and they were all spams. I need to activate Akismet to deal with the spammers. Do not forget to share your spam comments.

Edit by Inf: redacted the swears! 😀

Also, it seems we have new kinds of spam comments now. Those s.o.b of spammers are very crafty! They put a legit message in the body, and then, put their links as the URL field. This effectively kills the protection offered by most spam-detection plugins.

I’ll put Akismet up today, to see what it can do. Let’s hope for the best. And my greatest F.U to all the spammers out there! F.U S.O.B’s!

PHP Lessons Part 2: Operators

by
Guest-GS

Welcome to Part 2 of the PHP lessons.

In the previous lesson, we talked about how to get started with PHP, setting up a local environment to develop in PHP. We also talked about Variables and how they can be very useful when developing.

Just to refresh yourself up, the way we write a variable is like so:


$myVariable = "This is some fancy text";
echo $myVariable;
?>

Continue Reading »

PHP Lessons Part 1: Introduction to PHP and Variables

by
Guest-GS

What is php?

PHP is a powerful programming language for programmers to add interactivity to web pages, making them dynamic. What does “dynamic” mean? Simply “not static”! It may seem strange, but this is exactly what it is. Traditionally, web pages were “static”, coded in HTML. Nowadays, these pages are filled contents that change over time. Think about a blog, if you’re starting one then get managed wordpress hosting with knownhost. Aren’t new articles added from time to time? Well in the past, someone had to go edit a webpage, add code and add the article there manually. Nowadays, the article is pulled from a database, and dynamically added to a page as it is posted. That’s what PHP does: generating pages on the fly with content, with the help of HTML and other languages of course.

PHP is free (as in no cash needed, and open source – you can download and view the PHP source code) and is among the most popular programming languages used for Website Developement, to do processing.

What does PHP stands for?

PHP means: Hypertext Pre-Processor (HP, right? It’s a recursive acronym! It originally meant, Personal Home Page). It is a server side language and are executed on a server (Not on a local machine like Javascript, HTML and CSS). PHP can interact with Many databases out there such as MySql, Oracle, etc. To fully make use of PHP, a minimum knowledge of HTML is required, as well as some basic CSS if you wish to make things look nicer, but CSS is not directly required.

Continue Reading »

How many spam comments do you get?

by
Guru

Today is my last day at work at Vinivi. Kind of I have completed everything I had to do albeit I took more time I normally would have done these “things”. Just approved 2 comments and I thought, “lets see the stats for the number of spam comments blocked”.

21,257 Spam Comments Blocked

What are your current spam count?

A definition of spam from Wikipedia.

Spam is the abuse of electronic messaging systems (including most broadcast media, digital delivery systems) to send unsolicited bulk messages indiscriminately. While the most widely recognized form of spam is e-mail spam, the term is applied to similar abuses in other media: instant messaging spam, Usenet newsgroup spam, Web search engine spam, spam in blogs, wiki spam, online classified ads spam, mobile phone messaging spam, Internet forum spam, junk fax transmissions, social networking spam, and file sharing network spam.

Source: Wikipedia

An example of a Spam Comment as outlined by the SecuriTeam Blog

<strong>malware blocker…</strong>

Your topic %TITLE% was interesting when I found it on %DAY% searching for %KEYWORD%. Thanks, %URL%…

Some Links of Interest:

  1. What is Comment Spam
  2. Preventing Comment Spam (From Google)
  3. How to Stop Comment Spam
  4. Comment Spam (Six Apart)

You might also be interested in Protecting yourself against Plagiarism.

Note: This is in no way material to protect yourself against comment spam.

Seacom goes live, connects Mauritius?

by
Inf

That’s the latest news on submarine cables that come near Africa.

I have read before that there was some buzz about the Seacom cable connecting Mauritius in 2009, and will offer even higher speed internet to our small island.

The BBC reports that the Seacom cable has gone live! What does this mean to Mauritius? Higher internet speed soon? Lower costs?

But first things first. Are we even connected to the cable? From the picture, it connects to the SAFE cable that connects to Mauritius. Does that mean we are connected? I haven’t heard any news about this. I’ve looked in the newspapers I have available, and haven’t found anything recently, unless I missed some small article somewhere.

The last I heard about Seacom cable was that it was having some troubles because of the pirates in the region. Nothing on Mauritius getting connected to it so far.

The most relevant article I found was from L’Express, dated 15 January 2009. It does mention that there are 5 submarine cables being laid in our region, and that we will “benefit” from those cables. There’s another article with nearly same content, again from L’Express, for those who want reading material.

For now, we’ll patiently wait for the next speed boost while keeping the price same.

What are your views on this matter? Do you think we’ll see any boost or benefit anytime soon?

Africa Submarine Cables

ThePirateBay for Sale: The death of a symbol?

by
Inf

ThePirateBay Logo

If you are not aware of it yet, it seems that The Pirate Bay (TPB) is up for sale, and as already acquired a potential buyer in the name of the Global Gaming Factory X AB (GGF). The price tag was set up at $7.7 million. What now follows is my personal opinion on the matter.

I think that, if TPB is indeed sold, it’ll mark the death of a symbol in the fight against major labels, Hollywood and whoever wants to make the most money out of customers as it is possible. TPB was a major fighter, often disgracing the people who intended to bring it down. By TPB, I mean the collective running the site, including Peter Sunde. On its website, it often mocked their legal threats and did not take any actions to comply in any way whatsoever. People saw in TPB, a revolution, a rebellion. They took TPB’s side, and identified themselves with the tracker. They wanted content cheap or free, and TPB could provide it. TPB getting sold means that these folks lose their avatar.

However, TPB going down does not mark the end of piracy on the Internet. Torrents are small files, and as TorrentFreak says, one can simply move all the torrents to another tracker, and a clone of TPB would have been born. Technically yes, another TPB would have risen. However, the black-sails-pirate-ship symbol that many associate with piracy nowadays will be gone. I bet that the labels are already rejoicing and are eager to do business with GGF! Wherever there’s money to be made, you will find labels and the usual guys.

GGF wants to make TPB into a legal venture, which instantly defeats the philosophy of the site, that is promoting illegal file-sharing; an image that it has painstakingly preserved over the years. The ship was battered, but never sunk even in a deluge of legal threats. No label, no Hollywood firm could claim the head of the tracker. Seems GFF will be able to, soon.

As if this was not enough, GGF has even more plans for TPB. It plans on taking over the 20 million plus users of the tracker. How? By monetizing the uploads and downloads. Sounds familiar? This is exactly what “legal napster” tried to do, and if you don’t know how it ended, better check it out. In a few short words:no MP3s, DRM.

What will happen to TPB? I don’t know. It depends on how things turn out. There are a number of possible outcomes, the most prominent ones being that the site becomes even more popular with users. Seeders get paid to upload the content they just downloaded (the content they PAID to download). Artists and others get paid to put their content on the tracker. And the site makes money via advertising. Basically, it’s all about money. Think iTunes, but using Bittorrent technology. I guess that is what GFF wants to make TPB into.

The other, darker alternative is that the bulk of the faithful users of the sites move on to other trackers, or another tracker rises to claim the rank of TPB as No.1 notorious tracker, and acquires the users of TPB. This one seems most plausible to me. I don’t think that people who were used to get stuff for free at TPB will now want to pay to get it. They’d just prefer to move on to some other tracker. Not that there’s a scarcity of those anyway.

Also, this sale does not concern the by-products that TPB spawned, most notably, that Youtube alternative that TPB staff were talking about launching recently.

Now, the first part may have sounded a bit dark, but alternatively, there may be an upside to this story. It may be that the Industry has finally seen the light and have acknowledged the Bittorrent technology as the future of media distribution, and will adapt to it, instead of trying to fight it. This too, is a possible outcome of the sale. The problem in this is whether people will stick it it. But I guess that if the price is right, the service will manage to find customers.

Moreover, ISPs will probably want a role in this scheme too. Which ISP wouldn’t like to see Bittorrent traffic reduced on its network. If the content is legal, they may introduce local caching for the most accessed files, which in turn reduces international traffic and boosts speed for users.

I don’t want to sound negative, but I believe that the “darker” outcome is the one most probable. Already, a number of users are demanding that their accounts be closed at TPB, if the sale concludes. This shows that TPB users don’t actually want to buy content. They want it for free: they want it the way TPB has always provided it. And free cannot be beaten by any offer whatsoever.

For now, let’s just stand by and watch what happens. If TPB goes, it’s a symbol destroyed. It’s as if a general is killed in battle, but is in no way the end of the war. Others will replace it, just as Oink was replaced. Just like Kazaa was replaced by Torrents. If the sales is indeed concluded, the TPB war would have ended, but the people behind it would be $7.7 million richer to fight their legal battle, and possibly buy Sealand? Or some other small island and build their own pirate colony? Who knows where this matter is going.

Have your say! The comment box is below.

Sources: TorrentFreak, TorrentFreak, Wired