Archive for the ‘Web Development’ Category

FACTORY DIRECT CAPS IN 10 DAYS

Monday, December 5th, 2011

TCB CORP / TCB VIETNAM will deliver your approved custom order of caps to your door in approximately 10 days. Nothing new to our well established customers. Yet a concept until you have experienced it for yourself might seem too good to be true. IT IS TRUE! We have been doing it for 10 years. Bar none had brought on board more new clients than any other single feature. Custom start to finish faster and more options than Domestic. 144-1152 (larger orders we must check committed production) delivered in 10 days from approval from our Vietnam dock to your USA address.

Try us because you need a miracle. Stay because we have shown you that we are the best!

DST Viewer on Ipad

Tuesday, June 1st, 2010

With over 526 visitors since opening, we have decided that you shouldn’t have to wait to get home before viewing your embroidery.

So for all you Ipad users out there.. Here you go…

USING – Jeff Geerling’s Work around : http://www.lifeisaprayer.com/articles/web-design/post-photos-from-ipad-to-drupal

What you need:

  • DropBox – “software that syncs your files online and across your computers.” – DropBox
  • Embroidery .DST File – TCB_ELITE_files

What you do:

Step 1-4: Follow Jeff’s well illustrated Tutorial up to Step 4 using the .dst files instead of images.
Step 5: In Mobile Safari goto http://dst.tcbcorp.com
Step 6: Tap on ‘File,’ and select “URL”.

Step 7: Then, tap in the URL field. Tap once again to paste the URL you copied from Dropbox, then click ‘Retrieve…’ to load your file..

Robot Sticky Tape update

Friday, March 12th, 2010

Moved this content back to the main Robot Stick Tape post: http://journal.tcbcorp.com/index.php/2010/03/11/robot-sticky-tape/

Robot Sticky Tape

Thursday, March 11th, 2010

Download

Ok, So website analytics are getting fowled up buy the hundreds(thousands?) of robots trolling the web while recording every thing they see posing are real problem for web developers and enthusiasts who set up analytic services like woopra to track their users.. Well in the obvious a robot does not want to read our blog, use our services or even stay on the site for any longer than it takes to load and record.

So I and a whole lot of other people don’t want these robots to be filtered and here is my proposal:
Robot Sticky Tape, a php script added to the robot.txt that records the ip and reverseDNS host into a mysql database and then RSS Fed to others.. There is plenty of room for development but this can be phase 1..

Here are the quickly written instructions:

ROBOT STICKY TAPE RSS

This PHP Script built to display database entries that are collected but a PHP enabled robots.txt.
Credits:

Requirements:
PHP 4+
MySQL

Databse Stucture:
CREATE TABLE `system_robots` (
`id` int(11) NOT NULL auto_increment,
`ip_addr` varchar(20) collate utf8_unicode_ci NOT NULL,
`ip_host` varchar(255) collate utf8_unicode_ci NOT NULL,
`dt` timestamp NOT NULL default CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `ip_addr` (`ip_addr`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=48 ;

ROBOTS.TXT INSTALL (Windows2003 Internet Information Service)
Goto properties of the disired website
Select ‘Home Directory’ Tab
Click on “Configuration” Button
Click on “Add”
Browse to find your php executable (php-cgi.php)
Input into “extension” field “.txt”

After that,
Add the following PHP to Robots.txt ( make sure to have the same database settings ):
//////// PHP
//DATBASE SETTINGS
$DB_USER = ‘root’;
$DB_PASS = ”;
$DB_HOST = ‘localhost’;
$DB_DATABASE = ‘RST_DB’;
$DB_TABLE = ‘robots’;

/////////////////
// ____________________ EDIT AT YOUR OWN RISK __________ //
$ip = $_SERVER['REMOTE_ADDR'];
$host = gethostbyaddr($ip);

if (!$link = mysql_connect($DB_HOST, $DB_USER, $DB_PASS)) {
die(‘Could not connect to mysql’);
exit;
}else if (!mysql_select_db($DB_DATABASE, $link)) {
die(‘Could not connect to database’);
exit;
}

$sql= “INSERT IGNORE INTO `{$DB_TABLE}` ( `id` , `ip_addr`,`ip_host` )
VALUES (
NULL , ‘{$ip}’ , ‘{$host}’
);”;
$result = mysql_query($sql, $link);
/////// END PHP

_____________________________________ UPDATE 3/12/10
Added this code to the robot.txt to help filter some spoofing and label ips:

$wanIP =file_get_contents(“http://www.whatismyip.com/automation/n09230945.asp”);

//Spoofing and local servers
if($host == gethostbyaddr($_SERVER['LOCAL_ADDR'])){
if($ip != $wanIP){
$host = ‘Spoofed Reverse DNS’;
}else{
$host = ‘Localhost’;
}
}else if($host == $ip){
$host = ‘No Reverse DNS Specified’;
}

_____________________________________ UPDATE 3/15/10

  • Noticed that every entry was return as AM so i went in and sure enough my DATE() format was in 12 hour time not 24 so I change the code in robots.php (line 134 & 146) to show this:

    $last_update = date(“D, d M Y H:m:s O”, strtotime($line['dt']));

  • Updated table definition of in the “database structure” text:
  • Updated Download

Tuesday, February 16th, 2010

Today I found an addon that would allow me to hide certain parts of our posts.. Registered and screened users will be the only ones who can see certain information, such as pricing and programs.

tcbcorp.com is now IE8 Compatible!!

Tuesday, September 8th, 2009

IE 8 and its strict script policies have been causing our users to not be able to get past our new version of the home page.. I made some adjustments after noticing a client switch from IE8 to firefox in order to proceed.. So now our Custom Promotional caps are available to those of you using IE8.

Many apologies for the previous inconvenience,
Nicholas

Home Page 2.0

Monday, August 24th, 2009

Our website at one time was devoted to serving strictly our current customers. So we designed our homepages to be simple, give a little bit of information while locking the public out and allowing invited persons to access the interface.

As seasons have changed we have opened our doors by allowing the public see what we offer through guest access.. This has been effective as clients and public has logged in and browsed our inventory our archive of produced promotional baseball caps, Beanies, durags, bucket caps, etc. But, still we have had a lot of people that come to our “locked door” home page, and turn around and go somewhere else..

So, to resolve this I am redisigning the homepage to be more dynamic with the stuff people are looking for in the first place. Such as:
Recently Added Products (50 items)
Catalog Navigation
Latest Newsletter post from Clark Fessler himself
Contact information
Recent Promotion

As like the rest of tcbcorp.com this page will be designed with the ability to be masked.

Items listed

Thursday, August 20th, 2009

After viewing some data of our recent visitors I found that many were missing a lot of our products by selecting categories of lesser quantities. So to help our users I have implemented a “Listed Items Hover”.. This means when you hover above the category it displays how many items are listed.

example of the new "Listed Items Hover"

example of the new "Listed Items Hover"

Setting Up twitter to the catalog

Thursday, August 6th, 2009

Yesterday I was talking about setting up twitter to reach out to our users.. Where the twitter API is working here in Wordpress using a neat little plugin called wp_to_twitter. The website is a little more complicated as I don’t have a world of opensource developers to through me a plugin..

I take that back.. I do since we have PHP::PEAR installed and running fine.. and there is a little package out there called ’services/twitter.php’ … I installed the packkage and added the code to make a function to run this globally and it worked:)…..

Kinda… :( it is throwing me a 408 server timed out error… So that is another reason I am posting this message is to see if Wordpress gets through to twitter.. or it is just timed out..

wordpress 2.8

Thursday, June 11th, 2009

I installed wordpress 2.8 today which caused MailPress newsletter category selections to fail.. hopefuly I will see this tomorrow in my inbox and I can deal with updating MailPress as arne gets it up and goin..