Sunday, July 29, 2012

Texting from Excel

I have figured out how to send a text from Excel. It is really sending a POST request to my website using VBA and passing the phone number and message from 2 cells in the spreadsheet. Put the phone number in A2 and the message in B2. Then press Alt F11 to open the VBA code editor. Under Microsoft Excel Object on the left pane open the current spreadsheet. Or you could add the code to a new module by right clicking on Modules and choosing insert module. Next put this code in it.
Private Sub GetWebRequestButton1_Click()
    'get the numbers to send to the website to get a response
    Number = Sheets("texting").Range("A2").Value
    Message = Sheets("texting").Range("B2").Value
    
    'This sends a post to the website and put the response in the range supplied
    With ActiveSheet.QueryTables.Add(Connection:="URL;http://yourwebsite.com/VBAtexting.php", Destination:=Range("C2"))
        .PostText = "sendtext=1&number=" & Number & "&message=" & Message
        .RefreshStyle = xlOverwriteCells
        .SaveData = True
        .Refresh
    End With
End Sub
It works great.
You will also need the code for texting using google voice on your website but it is pretty simple and I use it all the time to send automated texts.

Friday, March 16, 2012

Send text to remote server using an Iframe

Here is an example to post text to a remote server. And you can print javascript in the remote server if you want to change the page you have the Iframe on to say something like success. Or a popup saying it finished. On the remote server you can print this to make a popup: <script> parent.document.getElementById('postmessage').style.display='block'; parent.alert('Successfully posted');</script> On the webpage you want to send information from make a form and Iframe like this.
<span id="postmessage" style="display:none">Success Message</span>
<form action="http://www.remoteserver.com/upload_test.php" method="post" target="post_to_iframe">
  <input type="hidden" value="the text to send to remote server" />
  <input type="submit" value="Submit" />
</form>

<!-- When you submit the form it will submit to this iFrame without refreshing the page and it will make the popup and display the message. -->
<iframe name="post_to_iframe" style="width: 600px; height: 500px;"></iframe>

Sunday, January 22, 2012

Password strength

Recently I joined Lastpass.com for free password management. It is great to have this secure website help keep my passwords safe while using a different password for every site I have registered at. I the past I had used the same password but now they are all 30 characters using letters, numbers and special characters. Here is a sample password that lastpass will generate for you: z$7cAP%#Ak%r39x!PU5e2Nq1As*2Np I have changed 35 or so different sites passwords to different passwords and it was simple. Now if one site stores the passwords in plain text and a hacker gets it then I will just change that one password to a different one using lastpass in a minute. And the hacker won't be able to get into any of my other sites. One thing I liked was how secure you can make lastpass forum for instance. They allow your password to be upto 255 characters. But while I was changing passwords I found something surprising. The only 2 sites that I wasn't able to use my 30 character password on was financial sites. Wellsfargo forces it to be 14 or less and paypal.com forces the password to be 20 or less. How come all the biggest sites on the internet let you use a 30 character password and then where you want a stronger password it has to be half the size? I think they should allow 255 character passwords. It isn't something that should use more computer power to store a longer password. It's just one line of code usually to change the length allowed in login systems.