There’s been a lot of discussion about the value of Digg traffic (Problogger, Neil Patel, etc). This analysis aims to use the data culled from the Chitika logs over a 31 day period to put an actual number to this theory. Since pretty much everyone receives Google traffic, this analysis uses Google as a base to compare against.
read more | digg story
Monday, April 9, 2007
Don't want to forget this code that should output an new .xml file from PHP
http://www-128.ibm.com/developerworks/library/x-xmlphp1.html
//Creates XML string and XML document using the DOM
$dom = new DomDocument('1.0');
//add root -
$books = $dom->appendChild($dom->createElement('books'));
//addelement to
$book = $books->appendChild($dom->createElement('book'));
//add element to
$title = $book->appendChild($dom->createElement('title'));
//add text node element to
$title->appendChild(
$dom->createTextNode('Great American Novel'));
//generate xml
$dom->formatOutput = true; // set the formatOutput attribute of
// domDocument to true
// save XML as string or file
$test1 = $dom->saveXML(); // put string in test1
$dom->save('test1.xml'); // save as file
?>
Sunday, April 8, 2007
PHP Dynamic Google Base Shipping Costs based on rules
Use the code below to connect to your database containing your prices and then use a bit of hard coded PHP to pick the correct shipping cost to include in the google base XML feed. Comment away on how you could do it better. Below is based on a Price Level shipping structure, but it could be modified to use weights or a dynamic allocation of shipping charges.
mysql_connect("urdatabase","xxx","pass");
//select which database you want to connect
mysql_select_db("urdatabase");
$result = mysql_query("select
Replace(Price, '$', '') as Price from urproductstable;");;
// i like always having numrows available even though I'm not using it here
$num_rows = mysql_num_rows($result);
while($r=mysql_fetch_array($result))
{
//skip the rest of the xml attributes to get directly to the shipping cost code
if ( $r["Price"] <= 24.99 ) { $shippingcost = "3.95"; } elseif ( $r["Price"] >= 25 and $r["Price"] <= 49.99 ){ $shippingcost = "4.95"; } elseif ( $r["Price"] >= 50 and $r["Price"] <= 74.99 ){ $shippingcost = "5.95"; } elseif ( $r["Price"] >= 75 and $r["Price"] <= 99.99 ){ $shippingcost = "6.95"; } echo '
US
Ground
'.$shippingcost.'
';}
mysql_connect("urdatabase","xxx","pass");
//select which database you want to connect
mysql_select_db("urdatabase");
$result = mysql_query("select
Replace(Price, '$', '') as Price from urproductstable;");;
// i like always having numrows available even though I'm not using it here
$num_rows = mysql_num_rows($result);
while($r=mysql_fetch_array($result))
{
//skip the rest of the xml attributes to get directly to the shipping cost code
if ( $r["Price"] <= 24.99 ) { $shippingcost = "3.95"; } elseif ( $r["Price"] >= 25 and $r["Price"] <= 49.99 ){ $shippingcost = "4.95"; } elseif ( $r["Price"] >= 50 and $r["Price"] <= 74.99 ){ $shippingcost = "5.95"; } elseif ( $r["Price"] >= 75 and $r["Price"] <= 99.99 ){ $shippingcost = "6.95"; } echo '
';}
PHP Add Date
To add 7 days to today's date in PHP do this,
$somevariable = mktime(0, 0, 0, date("m") , date("d")+7, date("Y"));
$datevariable = date('Y-m-d', $somevariable)
*Change what is in bold to suit your needs
Wednesday, April 4, 2007
Ipod use while driving might be as bad as cellphone usage
There is a good article about Ipod use while driving located here. It equates Ipod use with using your cell phone while driving.
One suggestion is to use the random or shuffle feature while driving. Or, you could use a radio frequency remote designed to be used with your ipod that might be a tad safer than looking at the screen and using the click wheel while driving. You can check out the ijet RF remote for the ipod at specialtyshack.com.
One suggestion is to use the random or shuffle feature while driving. Or, you could use a radio frequency remote designed to be used with your ipod that might be a tad safer than looking at the screen and using the click wheel while driving. You can check out the ijet RF remote for the ipod at specialtyshack.com.
Wednesday, March 28, 2007
Great Car Charger for Ipod use in car and at home
I bought this ipod charger recently, and I've found it very useful in both my car and at my house. I can plug my ipod into it while I'm driving, and it charges my ipod up. Then, when I get to my house or office, I can take the charger with me and use it on any standard household electrical outlet.
There are a bunch of other cool ipod cases, chargers, remotes, and more here.
There are a bunch of other cool ipod cases, chargers, remotes, and more here.
Wednesday, March 14, 2007
Japan Subway Biological attack
Not Quite News: Footage from a past Japanese Subway Biological attack, watch the terrorists at work here.
Subscribe to:
Posts (Atom)