Bohack

Check In and Tune Out!
 
 

Archive for the ‘Programming’ Category

A Simple PHP mail() Function For Testing SMTP Delivery

Saturday, January 9th, 2010

Making sure mail is sent properly from a PHP website is a bit difficult when it’s not your server, like shared hosting. You never have access to the mail logs, so you can’t see mail moving. I host several websites on shared hosting and recently found my CMS was not sending emails to me. So I opened a ticket and I concluded it to be a SNAFU.

(more…)

Bookmark and Share

Tags: php, Web
Posted in Programming, Scripts | 1 Comment »

How To Save A Webpage In HTML To A File In VBScript

Monday, December 14th, 2009

I had just finished working on a project where I needed to programmatically get a web page and save the HTML to a file. I started toying around with some code I used for parsing XML and totally rewrote the code. I found that I kept getting an error of “Microsoft VBScript runtime error: Invalid procedure call or argument”. I couldn’t understand what was going on. I was passing the parameters correctly to the File System Object, but I kept getting the error. All FSO was doing was creating a file and writing the string out. So I checked the length and then started writing the left(string,number) and found it was a character that was in Unicode. So I wrote a Unicode to Ascii function that is not all that efficient, but it is very effective. The sample code below will get a webpage from Google and save it to a file.

(more…)

Bookmark and Share

Posted in Programming, Scripts | 1 Comment »

Get the URL from a hyperlink in Excel

Sunday, June 14th, 2009

Recently I needed to extract a links from a web page; normally I would use some Linux commands ported to windows and get the job done. In the end I needed to format the relative link to a full URL, so I decided to use Excel. However when I imported the web page into excel I found that the URL was embedded in the friendly name of the hyperlink.

(more…)

Bookmark and Share

Tags: Excel, Windows
Posted in Programming | 2 Comments »

  • Author

    • About Bohack
    • Contact Info
  • Channels

    • Blog (1)
    • Exchange (2)
    • Ham Radio (1)
    • Homebrew (2)
    • Linux / Unix (2)
    • Mods (2)
    • Programming (3)
    • Recipes (2)
    • Scripts (5)
    • Spam (1)
    • Telco (3)
    • Virtual PC (1)
    • VMware (2)
    • Windows (11)
  • Archives

    • February 2010
    • January 2010
    • December 2009
    • November 2009
    • June 2009
    • May 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
  • Misc

    • More Links
 

 

Copyright - Bohack 2009i