Thursday, December 3, 2009

I use google voice with php

I have figured out how to send make a php page use my google voice web widget dynamically! I wanted to pull numbers out of a database to call if I wanted to instead of just using it manually. I could call someone at any time programatically and they would pick up the phone and wonder who was calling them and it would be my voice mail giving them my custom message or I could tell it to call me if I want to talk to them when they pick up. I could use it to talk to someone that has a busy phone and as soon as they actually pick up it will call me. here is the php code I used to make it call someone to call me.

it worked great!! I got it to work with the php code and each time I refresh the page it calls again. This is nice!

$url = 'https://clients4.google.com/voice/embed/webButtonConnect';
//person wanted to call me
$phone = '2089991234';
$postVars = array(
'showCallerNumber' => '1',
'callerNumber' => "$phone",
'buttonId' => '9ea ... 91d3166',
'name' => 'mike'
);
$t = http_build_query($postVars);

$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_POST,count($postVars));
curl_setopt($ch,CURLOPT_POSTFIELDS,$t);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>

Tuesday, November 10, 2009

Using Excel to read a database

I am going to make excel get data from a database.
First you need a driver called MyODBC that will interface between excel and the mysql server
http://dev.mysql.com/downloads/connector/odbc/5.1.html#win32

Tuesday, October 27, 2009

Etherpad collaboration for coders

Here is a great tool that lets programmers and other people share their code among anyone in a team.
http://etherpad.com/
I shall try it and report back.

Sunday, October 25, 2009

Lego land on street view

So google is now mapping places like Lego land and not just on the streets.

http://www.google.com/trike

here are some places they are mapping
They are accepting suggestions for places to map until Wednesday October 28, 2009

rome Catacombs in 3d

Very cool 3d mapping of underground catacombs.

But, until now, they have never been fully documented, their vast scale only recorded with handmade maps.

That is now changing, following a three-year project to create the first fully comprehensive three-dimensional image using laser scanners.


http://news.bbc.co.uk/2/hi/europe/8027650.stm

Tuesday, October 13, 2009

Creating html emails

I have learned how to use php to put html into emails!
This will be useful.
$admin= "emailfrom@gmail.com";
$email = "emailto@gmail.com";
$subject = "HTML in email";
$message = "

";
$headers = "MIME-Version: 1.0\nContent-type: text/html; charset=UTF-8\n";
//$headers = "To: $firstname $lastname <$email>\n";
$headers .= "From: Your Agri-med Perscription <$admin>\n";
$mail = mail($email, $subject, $message, $headers);
if($mail) echo "The email has been send.";
?>

So that is all that is required. There are many email clients out there such as yahoo, gmail, hotmail, outlook
and they all see html in emails differently. They all have different support for html and css. Test your emails out with as many of these as you can to make sure your email styles are supported.

look at this page to learn what your emails look like in different clients and what features each support.
http://www.email-standards.org/clients/

Wednesday, October 7, 2009

Google Barcodes

Today we had a barcode that said google on the home page.I learned that there is a really cool project google has been working on.


This is a cool new type of barcode I have not heard of before. The QR code is a way to put up to 4000 letter characters and 10000 numbers in a barcode. I love the fact that you can control the level of accuracy. You can make it so between 7 and 30% of the barcode could be covered and unreadable and no data will be lost because the data is redundant like RAR files can be. It is like stiped harddrives in the way that if one of them is destroyed the others still have the files that were lost on the harddrive that failed. Read about how google charts API works to let you make these cool barcodes.
http://code.google.com/apis/chart/types.html#qrcodes

You can also use it to store a contact including about 10 different parts to it.
It can store a geographic location including how many meters above the area.
It can also store a SMS message, or an e-mail or a calendar event. Try out generating these barcodes and more in the following online demo.
http://zxing.appspot.com/generator/

These barcodes will someday be used more as maybe something that can add events to your google calendar or add anyones contact info from a book into your email profile. Mobile phones can read these barcodes and so it is a pretty new technology that will be helpful to someone someday.