Beginning June 20, 2011 My Tiny Lab LLC will not accept new clients.


Web Development

Everything to your specifications. Get an instant free estimate.

  • websites
  • online forms
  • newsletters, email marketing
  • blogs
  • photo gallery
  • databases
  • issue tracker
  • calendar
  • Flash animation
  • web development

Online Marketing

online marketing

Use Facebook and Google AdWords to advertise online to your specific demographic.

Social Media

Use social media to market your brand and turn your customers into fans. Use Facebook Pages to communicate with your customers and drive traffic to your website. A Facebook application can make customer interaction with your business more memorable. Use Twitter to inform your followers of upcoming sales and special events.

On the right, you can see a Facebook box that displays content from my facebook page. It's used to drive people to my blog. Below is a sample Facebook applications from my portfolio. It's in Spanish:

hola logo Hola Se acabaron los mensajes aburridos. EnvĂ­a mensajes con animaciones o juegos divertidos.

Migrating from ASPTear to MSXML2.ServerXMLHTTP

So I had to migrate some classic ASP code that uses ASPTear to instead use MSXML2.ServerXMLHTTP. ASPTear was used to get some HTML newsletters and email them. The problem was that there were strange characters returned by MSXML2.ServerXMLHTTP for any character above 127. After some digging online, turns out we have to get the data as binary and not as text and then convert the binary data into a string. I also decided to convert characters above 127 into this representation, &#127, to be sure they will display well in the emails. Hopefully this will help someone out there who's also migrating to MSXML2.ServerXMLHTTP.

ASPTear example code:

Dim objTear, myResponse
Dim myURL, Request_POST, Request_GET, strQueryStringOrPostData, strUsername, strPassword

Set objTear = CreateObject("SOFTWING.ASPtear")
myURL = ""
Request_POST = 1
Request_GET = 2
strQueryStringOrPostData = "&param=value"
strUsername = "theusername"
strPassword = "thepassword"

myResponse = objTear.Retrieve(myURL, Request_GET, strQueryStringOrPostData, strUsername, strPassword)

MSXML2 example code:
So be aware that responseText in MSXML2.ServerXMLHTTP assumes data is ASCII, so chars above 127 come back as 255. To solve that problem get the data using responseBody and then convert binary to a string. Below is an example:

Dim objTear, myResponse,
Dim myURL

Set objTear = CreateObject("MSXML2.ServerXMLHTTP.6.0")
myURL = ""
objTear.Open "GET", myURL, False
objTear.send ""

' Convert binary result to string.
myResponse = Stream_BinaryToString(objTear.responseBody, "iso-8859-1")

Sub Save2File (sText, sFile)
Dim oStream
Set oStream = CreateObject("ADODB.Stream")
With oStream
.CharSet = "iso-8859-1"
.WriteText sText
.SaveToFile sFile, 2
End With
Set oStream = Nothing
End Sub

'Code from
'Stream_BinaryToString Function
'2003 Antonin Foller,
'Binary - VT_UI1 | VT_ARRAY data To convert To a string
'CharSet - charset of the source binary data - default is "us-ascii"
Function Stream_BinaryToString(Binary, CharSet)
Const adTypeText = 2
Const adTypeBinary = 1

'Create Stream object
Dim BinaryStream 'As New Stream
Set BinaryStream = CreateObject("ADODB.Stream")

'Specify stream type - we want To save text/string data.
BinaryStream.Type = adTypeBinary

'Open the stream And write text/string data To the object
BinaryStream.Write Binary

'Change stream type To binary
BinaryStream.Position = 0
BinaryStream.Type = adTypeText

'Specify charset For the source text (unicode) data.
If Len(CharSet) > 0 Then
BinaryStream.CharSet = CharSet
BinaryStream.CharSet = "us-ascii"
End If

'Open the stream And get binary data from the object
Stream_BinaryToString = BinaryStream.ReadText
End Function