DirectoryInternetBlog Details for "Pink is the New Black"

Pink is the New Black


Pink is the New Black
Variety blog focused on programming, PHP, MySQL, Ruby, and random entries on life and humor. Blog also contains themes and wallpaper
Articles: 1, 2, 3, 4, 5

Articles

Keep People from Jacking your Images
2007-03-19 22:06:00
I get this question a lot, so I figured I’d post it here. For those of you who don’t have the convenience of a cPanel-based system, you can block image hotlinking in your .htaccess. Image hotlinking is basically when someone uses an image from your website on their site, but has your ...
More About: People , Images , Your , Jack , Keep
My Puppy?s Cuter than Yours
2007-03-19 01:59:00
For anyone who hasn’t met the newest addition to the Vasilé family, I’d like to introduce you to Capone. He’s a purebred pitbull currently at 12 weeks, 25 lbs. His vet estimated that based on his genes he’s probably going to reach about 80-90 lbs by the time he’s a year ...
More About: Cute , Your , Puppy
Preventing DOS Attacks with mod_evasive
2007-03-18 06:07:00
I recently had to deal with a guy whos VPS was constantly being hit by the same IPs over and over until the server crapped out and refused to do anything…it was royally a pain in the ass because I literally had about 10 seconds between starting up the server and having it crash ...
More About: Event , With , Attacks , Vent , Tacks
Increase Your Blog Traffic
2007-03-16 01:00:00
Yes, it’s another one of those. It seems that every blog has its own tips for increasing traffic, so I decided to add my own tips that seem to have worked for my site
More About: Blog Traffic , Traffic , Blog , Your , Ease
Wordpress 2.1.1 is Dirty
2007-03-03 11:51:01
So I found out today from Paul that wordpress.org got hackedwordpress.org got hacked and their new 2.1.1 release is tainted. Yes, I said tainted. Someone hacker got down and dirty with the wordpress.org servers and altered the code in the new 2.1.1 release that apparently allows for a remote PHP file execution…then bundled it up for everyone to download and infect their servers with. So now this means that I have to back up my site, disable my 20-some wordpress plugins, delete my files, download the new version, put the files back in place, then watch as my life slowly fades away.  Damn Paul for paying attention to the tidbits of info the wp-admin dashboard. Read the full article here To my fellow bloggers, please upgrade your upgrade your Word press installation to v2.1.2. Ahhhh, now doesn’t that feel better?
More About: Press , Dirty , Dirt
Christina Aguilera Might be Crazy
2007-02-27 05:46:01
I don’t really know if I like it or not…I mean, the song has a little jingle to it, but it’s not something I would rock to in my car with the windows down where people can hear it. I’m liking the three Chris t ina’s though, since she’s one of the people on my PHF list. See her new video “Candyman” below.
More About: Christina Aguilera , Crazy , Tina
How to Install PHP6
2007-02-26 11:44:01
This was a little experiment gone somewhat wrong, when I tried to upgrade my VPS to PHP6. I swear it worked, but I should have known that nothing works on it — Wordpress just crapped out a bunch of errors. On a higher note though, it seems to be hella secure as you can no longer use magic quotes or globals, otherwise Apache will fail. So if you really want to be on the bleeding edge, here’s how you install PHP6: I didn’t really need to install a whole bunch of stuff, but depending on how your webserver is already set up you may need to install extra dependencies, but this will become obvious during the compile. 1) Make sure your autoconf version is up to date with version 2.13 or higher: autoconf -V 2) Install ICU…you can find your version here. wget ftp://ftp.software.ibm.com/software/globa lization/icu/3.6/icu4c-3_6-src.tgz tar -xzvf icu4c-3_6-src.tgz cd icu*/source mkdir /usr/local/icu ./configure --prefix=/usr/local/icu && make && mak...
More About: How To , Php , Tall
How to Make a Sexy Tag Cloud with PHP and MySQL
2007-02-25 23:43:02
Well it seems that everyone has one, and I’d have to admit that a tag cloud is a good way to spice up your site a little bit. I first thought of this when setting up a friend’s site… he wasn’t using a CMS like Wordpress or anything that I could find a quick tag cloud plugin for, so I figured I could probably just make my own. Well, I did and now I shall share it. This tutorial will show you how to set up a simple tag cloud using PHP and MySQL, with a little bit of Ajax effects Before we get started, take a quick look at the sample cloud. (more…)
More About: How To , Php , With , Sexy , Mysql
I?m So Smart
2007-02-25 23:43:02
So I learned today that electric can openers have little magnets in the top that apparently hold on to the lid while the can is being opened.  And get this — apparently you’re supposed to take the stuff out of the can before you put it in the microwave because I guess metal and microwaves don’t go together.  I wonder why they don’t put this kind of stuff of the labels.  I mean, good thing I’m a genious and I figured that out before I could have killed myself.
More About: Smart , Mart
Modx Makes Me Drool
2007-02-25 23:43:02
I never thought I’d say that about a CMS, but then again I said the same thing about Scott and look what happened there. Anywho, one of my friends showed me this new CMS that is purely Ajax on PHP, and I decided to give it a whirl. I might even switch my site over once I figure out how it works. See it here.
More About: Make
Script Kiddy Killjoy
2007-02-25 23:43:02
If your site has ever been hacked, it will have most likely showed up in the zone-h database. This is the site where all the little script kiddies get together to brag about their “hacking” skills and such. Basically, whenever they deface a site they report it to zone-h, who then check to make sure they aren’t full of shizit. Well, in efforts to keep the script-kiddies from getting credit, I’ve devised discovered a way to make sure that zone-h’s bots can’t check the submissions. All you have to do is add this to your root .htaccess file: <Files 403.shtml> order allow,deny allow from all </Files> # zone-h deny from .zone-h.org deny from .zone-h.com deny from 213.219.122. # cyber-warrior.org deny from .cyber-warrior.org deny from .cyber-security.org deny from 80.237.211.8
More About: Script , Kill , Kidd
The Basic MySQL Injection
2007-02-25 23:43:02
Ahhhh the classic hack that doesn’t work anymore… which is why I’m posting it here. I always thought it was kind of an interesting concept but no one ever made it simple for me, so I shall post it here. How to do a simple MySQL Injection Ok, so this is your basic PHP login script that asks for your username and password, which would then query the database to authenticate you: $user = $_POST[”username”]; $pass = $_POST[”password”]; $query = mysql_query(”SELECT * FROM users WHERE user=’$user’ AND password=’$password’”); $rows = mysql_fetch_row($query); if ($rows == 0) { die (’Login Incorrect!’); } Assuming that register_globals are enabled on the server, this script will work and in return use the POST variable to query the database for an already-defined row to see if both conditions are being met, which are obviously the username/password fields. If the input does not meet this requirement,...
More About: Basic , Mysql
Messing with PHP and MySQL
2007-02-25 23:43:02
This just a simple tutorial on how to connect to MySQL with PHP, as well as using a MySQL query to create simple database. The first thing you would want to do is create the database so PHP can access it. My preferred method is through phpMyAdmin or cPanel (if your host provides this)…or you can run a simple query via MySQL command line: CREATE DATABASE `liquor`; USE `liquor`; CREATE TABLE `brands` ( `id` int UNIQUE NOT NULL, `brand` varchar(40), `type` varchar(50), PRIMARY KEY(id) ); INSERT INTO cars VALUES(1,'skyy','vodka'); INSERT INTO cars VALUES(2,'cpt. morgan','rum'); INSERT INTO cars VALUES(3,'ice 101','schnapps'); This code will basically create a database named “liquor” with the table “brands” that lists three of my favorite liquors in order with the type of liquor that they are. From here, you’ll want to create a database user and add it to the database with the appropriate privileges. You can usually do this in your MySQL...
More About: Php , With , Messi , Mysql , Sing
Radiant CMS is Gorgeous
2007-02-25 23:43:02
If you haven’t heard the news, Radiant CMS is finally making its presence on the internet. Of course, you wouldn’t have heard the news unless you’re a dork like me. Anyways, I thought it would be worth mentioning as this is probably one of the sexiest content management systems I’ve seen yet. But really, I just like the color. And the logo’s nice too. Check out Chris and Luke’s sites, which are currently running Radiant with Ruby on Rails.
More About: Gorge , Dian , Gorgeous , Adia
Installing Ruby on cPanel
2007-02-25 23:43:02
Here’s how to install Ruby on Rails on a cPane l system: First install Ruby: wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8 .5-p12.tar.gz tar -xvzf ruby-1.8.5-p12.tar.gz cd ruby-1.8.5-p12 ./configure make make install Now, install the Gems and Rails: wget http://rubyforge.org/frs/download.php/112 89/rubygems-0.9.0.tgz tar -xvzf rubygems-0.9.0.tgz cd rubygems-0.9.0 ruby setup.rb gem install rails Install Fast CGI wget fastcgi.com/dist/fcgi-2.4.0.tar.gz tar -xvzf fcgi-2.4.0.tar.gz cd fcgi-2.4.0 ./configure make make install wget fastcgi.com/dist/mod_fastcgi-2.4.2.tar.gz tar -xvzf mod_fastcgi-2.4.2.tar.gz cd mod_fastcgi-2.4.2 /usr/local/apache/bin/apxs -o mod_fastcgi.so -c *.c /usr/local/apache/bin/apxs -i -a -n fastcgi mod_fastcgi.so gem install fcgi Edit the Apache config file and add the fcgi module: pico /usr/local/apache/conf/httpd.conf LoadModule fastcgi_module libexec/mod_fastcgi.so FastCgiIpcDir /tmp/fcgi_ipc/ AddHandler fastcgi-script .fcgi Then restart Apache Install RMa...
More About: Alli , Panel , Tall
Hotlink Block
2007-02-25 23:43:02
So I finally figured out what caused the huge bandwidth spike on my site last month.  Seems some idiot was hotlinking my MP3s and old images from the Jukebox and gallery on my previous site…I guess he’s out of luck now that they’re gone.  Anywho, for those who don’t have the luxury of cPanel, here’s a simple Apache rewrite to keep people from jacking your images and stuff:   RewriteEngine on RewriteCond %{HTTP_REFERER} . RewriteCond %{HTTP_REFERER} !^http://(www.)?site.com [NC] RewriteRule .(jpe?g|gif|png|bmp|mp3)$ - [NC,F] 
More About: Link , Bloc , Block , Lock
Setting up an Access Log with PHP
2007-02-25 23:43:02
I set this up back in July when my site was hosted with H-Insiders and I didn’t have direct access to my Apache logs. I figured that I could do this myself with a few basic PHP functions, and by doing so I was able to set up my own access log in a static text file that I could download whenever I wanted. This first example is to log unique visitors to your site as well as gather some important information about them. Here is the code: <?php session_start(); if(!session_is_registered('counted')){ $agent = $_SERVER['HTTP_USER_AGENT']; $uri = $_SERVER['REQUEST_URI']; $user = $_SERVER['PHP_AUTH_USER']; $ip = $_SERVER['REMOTE_ADDR']; $ref = $_SERVER['HTTP_REFERER']; $dtime = date('r'); if($ref == ""){ $ref = "None"; } if($user == ""){ $user = "None"; } $entry_line = "$dtime - IP: $ip | Agent: $agent | URL: $uri | Referrer: $ref | Username: $user n"; $fp = fopen("access_log.txt", "a"); fputs($fp, $entry_line); fclose($fp); session_register('counted'); } ?&...
More About: Php , With , Access
More articles from this author:
1, 2, 3, 4, 5
113933 blogs in the directory.
Statistics resets every week.


Contact | About
© Blog Toplist 2012 - Supported by Web Catalog - SEO by FeWorks
eXTReMe Tracker