Tuesday, February 27, 2007

Call Romania for 1 cent / minute

If you are after calling deals to Romania then InternetCalls may bring you good news. For a limited time they have a rate of 1 cent / minute with Romania’s landline phones. This method of promoting services is common along all Finarea/Betamax companies.

Attract visitors by offering free content

One of the best marketing tips to attract visitor to your site/blog is to give away free content. Internet visitors like free content!

You can offer as free content: articles, books or software. Also remember that general interest content will attract more visitors than niche content. Don’t try to steal content from other sites but instead create unique e-books or small freeware applications that will be available only through your website/blog.

If you are a good writer try also to publish a few articles on specialized websites. For instance, if you have a programming blog, an article posted on codeproject.com, for sure will raise the traffic to your site. The article should offer valuable information and not look like an advertisement. A discrete short biography and web address at the end of the article is enough to divert interested visitors to your site.

You can offer free content like a bonus to site visitors or to stimulate them to subscribe to certain site features. For instance, ITObserver blog offers for free valuable software applications to all site visitors that choose to subscribe to the free blog newsletter. By subscribing to the free newsletter not only that you get recent blog posts delivered to your email box (without advertisements) but you also get free software.

Call Romania from a PSTN phone using SmartCall

This article shows how to call your family and friends from Romania using SmartCall VoIP provider and a PSTN phone (eg. your landline phone). This method was not yet fully validated and may not work in all situations. Of course the usage of hardware IP Phone or ATA is still the recommended method.

Step 1: Call one of the SIPBroker PSTN access numbers, eg: (630) 405-0745.

Step 2: At voice prompt dial *466 followed immediately by one of these numbers: 5693570 or 5695000

Step 3: Enter your phone card 10 digit number.

If the above dialing sequence seems complicated, you may simplify it by either using a SIP Broker alias or an IPKall personal number as showed in previous article.

See also the other article about how to call Romania from a PSTN phone using TelefonIP.

Comments welcomed!

Call Romania from a PSTN phone using TelefonIP

This article shows how to call your family and friends from Romania using TelefonIP VoIP provider and a PSTN phone (eg. your landline phone). Of course the usage of hardware IP Phone or ATA is still the recommended method.

Method 1

Use one of the official listed PSTN access numbers.
While very easy to use, sometime these numbers may not work properly.

Method 2

Use a SIPBroker PSTN access number. For instance, US callers may pick (630) 405-0745. Next use any of the following 2 solutions:

2a) Dial: (630) 405-0745, and after voice prompt type: *011401#
2b) Dial: (630) 405-0745, and after voice prompt type: *7576 0215897373

If you dialed the numbers correctly you should here now the TelefonIP voice prompt asking you for a destination number.

Method 3

Allocate your own US PSTN number using IPKall. If not used this number will expire in one month, but the advantage is that the dialing is simplified.

First open a free account with IPKall, then put the following information:

SIP Proxy: sip.telefonip.org
SIP Phone Number: 0215897373

Please remember to put exactly the above SIP phone number, no matter what’s your telefonip number. In about 1 hour you should receive an email from IPKall with your personal US phone number.

See also the other article about how to call Romania from a PSTN phone using SmartCall.

Comments welcomed!

Call any SmartCall number from a PSTN phone

This article shows how to call any SmartCall number from a PSTN phone (eg. your landline phone).

1) Call one of the following PSTN access numbers:

USA
(630) 405-0745

Canada
418-948-3307

Spain
+34-91-771-17-20

2) At voice prompt enter: *466 xxx-xxx-xxxx, where xxx-xxx-xxxx is SmartCall phone number you wish to call.

Wednesday, February 21, 2007

Prevent content stealing by protecting web pages

This article shows you how to implement different protections for a web page to prevent content stealing. For sake of understanding all examples were implemented in VBScript.

1. Display a message on right mouse click

You need to handle onmousedown event and check which mouse button was pressed. This method doesn’t offer any protection is users press Win-ContextMenu system key.

Sub document_onmousedown
If window.event.button = 2 Then MsgBox "This page is protected."
End Sub


2. Disable context menu

This protection method works only on IE but is nicer than the previous method. You need to handle the event that is fired on context menu popup.

Sub document_oncontextmenu
window.event.returnValue = False
End Sub


3. Disable F5 and Backspace keys

This method is especially useful if you indent the user to navigate your site only through navigation controls you implement. Of course, the user can press the Back button on the toolbar, but this inconvenient can also be solved by opening the site in a window without toolbars.

Sub document_onkeydown
Dim key

key = window.event.keyCode

If key = 116 or key = 8 Then
window.event.keyCode = 0
window.event.returnValue = False
End If
End Sub


The above code snippet is just for demo purpose only. In a real world scenario you should check the context where the user presses a key. For instance you should allow Backspace if the user is in an INPUT type field.

4. Protect scripts

This method works only in IE5+. First you need to download script scrambling tool, srcenc.exe from Microsoft.

Let’s say we have the following script in a web page:

<script language=vbscript>
Sub ShowMsg
MsgBox "This is a message"
End Sub
</script>


The result of running the presented tool on this script is the following:

<script language=VBScript.Encode>#@~^MBcAAA==@#@&P~1WswV6sGN'Wl
... dgGAA==^#~@</script>


IE5+ browsers will know how to run scripts written in “VBScript.Encode”. Older browsers will just ignore these encoded scripts. You should know that this method is good only to scare beginners because experienced hackers can easily revert the encryption.

5. Protect entire web page content

For this you need to use one of the many protection tools available on Internet. Usually these tools are removing all white spaces from HTML pages, the result being an unintelligible block of tags.

6. Protect discrete page elements

The following paragraphs will show you how to protect different page elements against incorrect user actions. These are not security protections but more protections against incorrect usage that would otherwise trigger a non-planned behavior.

6.1. Create unelectable paragraphs

<body UNSELECTABLE="on">
...

<div UNSELECTABLE="on" style="cursor:default;">This text cannot be selected using mouse</div>
...
</body>


6.2. Disable automatic field’s fill up

This method is useful for fields used for typing username or address. Normally after a few letters types, IE will suggest you a previously entered text. This is not a very good idea especially if a web application will be used on public computers.

7. A complex protection for IE browsers

In IE5+ you can combine the above described protection methods in one single “behavior”. The following example shows such method (write the first code in application.htc file and the second in test.htm file).

application.htc

<PUBLIC:ATTACH EVENT="onkeydown" ONEVENT="HandleKeyDown"/>
<PUBLIC:ATTACH EVENT="oncontextmenu" ONEVENT="HandleContextMenu"/>

<script language=vbscript>
Sub HandleKeyDown
Dim key

key = window.event.keyCode

if key = 116 then ‘ F5 does nothing
CancelKeyEvent
elseif key = 8 then ' For Backspace check where is pressed
If CancelInElement(window.event.srcElement) then CancelKeyEvent
end if
End Sub

Sub HandleContextMenu
If CancelInElement(window.event.srcElement) then _
window.event.returnValue = false
End Sub

Sub CancelKeyEvent
window.event.keyCode = 0
window.event.returnValue = false
End Sub

Function CancelInElement(elem)
Dim re

re = true

select case elem.tagName
case "INPUT" if LCase(elem.type) = "text" then re = false
case "TEXTAREA" re = false
case "DIV", "SPAN" if elem.contenteditable = "true" then re = false
end select

CancelInElement = re
End Function

</script>

test.htm

<HTML>
<head>
<style>
BODY
{
BACKGROUND-COLOR: steelblue;
FONT-FAMILY: Verdana;
FONT-SIZE: 10px;
behavior:url('application.htc');
cursor: default;
}
</style>
</head>

<BODY UNSELECTABLE="on">

Time: <span id=clock UNSELECTABLE="on"></span><br>
<input type="text"><br><textarea></textarea>

<div UNSELECTABLE="on" style="background-color:red;width:200px;height:100px;">
This is a regular DIV...
</div>

<div contenteditable=true style="cursor:text;border:inset thin;background-color:white;width:200px;height:100px;">
This is an <b>EDITABLE</b> DIV...
</div>

<script language=vbscript>
sub window_onload
clock.innerHTML = Now()
end sub
</script>

</BODY>
</HTML>

I hope this was useful. I’m waiting for comments and suggestions, especially regarding how to implement similar protections on Firefox.

FREE Microsoft Access Replacement

DBUtils is a freeware application designed both as a replacement of Microsoft Access (for very basic scenarios) and as a complementary tool for software developers and Microsoft Access DB designers.

Features
  • View database properties

  • View tables, views and queries

  • View structure of tables

  • View, using a colored syntax editor, the SQL behind views and stored procedures

  • View the data from tables and view

  • View the source code of application associated with the database

  • Perform searches in database structures and source code files

  • View dependencies between objects: parents and child of tables, views, stored procedures

  • Easy to use - GUI is similar to Microsoft Access applications


Commented screenshots

After staring up the application you have to create a connection to your DB. For convenience this connection can be saved for a quick access at a later time:



An interesting feature for JET/Access software developers can be seen on the second tab. Besides the DB connection you can also specify a folder that contains the source code of a project that uses that particular database. If you specify this information, you’ll be able to perform complex searches through all your project files:



The most representative features of this application are two options from context menu: What use the object and Who use the object. Both are showing dependencies from 2 perspectives:





Viewing a query or stored procedure is also not a problem with this tool. In case of tables the date content is displayed:





If you specified a project folder at the first step, then you can quickly see, using the Files tab, what DB objects are used by each source code file in your project:



For complex searches one may invoke the Search tool (from main menu or from context menu). This tool is searching all table structures, stored procs, views and source code files for the particular piece of text that is specified:




Note: DBUtils is an original application available only through ITObserver (you’ll not find it anywhere else on the NET). At this moment, it is available FREE OF CHARGE to all ITObserver Email Subscribers. If you are already an email subscriber of ITObserver you may request the application by dropping a text or audio comment or by sending an email to vmasoft at yahoo dot com. If you are not yet a subscriber, you may subscribe now and then request the application.

Don’t forget: DBUtils is just one of the benefits of being an ITObserver subscriber. The most important thing is that you’ll get fresh tech news and articles delivered directly to your email box.

Monday, February 19, 2007

Customizable HDD Search Engine

Anyone who’s navigating on Web knows the importance of a good search engine. Finding information on Web it is almost impossible nowadays without search engines. While searching the web is very common and easy these days… you cannot say the same about searching on local drives. How many times did you download again a document or application (that you knew you had it on your local drive) just because it was easier to find it on the web than on your own computer?

While some users are already using local indexing services, such as those from Google or Yahoo, the majority are not yet familiar with local search technologies. Even those that are already using out-of-the-box searching tools feel sometime the need for a little customization (eg. Web masters).

This article proposes an efficient and alternative searching method based on Microsoft Index Server and a custom ASP page. Using this method, one may index all its documents and saved web pages for easy information retrieval. Microsoft Index Server is able to search and index a wide variety of common file types: HTML documents, Office documents and PDF documents (using the free PDF IFilter plug-in from Adobe).

Start Indexing Service.


Define a catalog for your documents and saved pages (see Docs in the next image).


Define directories for this catalog. Make sure each directory has indexing enabled.


That’s all for configuration. Now come programming part. For the ease of understanding this was done in ASP (classical ASP… not ASP.NET). Any IIS server should be able to run ASP pages.

The entire implementation is done is one single ASP page and the most important piece of code that you have to write is listed below:

...

' Builds an SQL statement for Indexing Service
Function BuildSQLQuery(q,nq)
SQL = "SELECT Rank, Filename, Size, DocTitle, Path, Write, Characterization FROM Docs..Scope() " &_
"WHERE CONTAINS(" & "'" & q & "'" & ")"
If nq<>"" Then SQL = SQL & " AND NOT CONTAINS(" & "'" & nq & "'" & ")"
SQL = SQL & " ORDER BY Rank DESC"
BuildSQLQuery = SQL
End Function


Sub DoSearch(q,nq)
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "provider=msidxs"
objConn.Open
Set objRS = Server.CreateObject("ADODB.RecordSet")
objRS.CursorLocation = adUseClient

On Error Resume Next
objRS.Open BuildSQLQuery(q,nq), objConn, adOpenKeyset,adLockReadOnly
If Err.number <> 0 or (objRS.EOF and objRS.BOF) Then Err.Clear
Response.Write "No records found!"
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
Response.End
Exit Sub
End If

objRS.PageSize = RecordsPerPage
pag = Request.QueryString("pag")
If pag <> "" Then
pag = CInt(pag)
If pag < pag =" 1" pag =" 1" absolutepage =" pag" rowcount =" objRS.PageSize" rowonpage =" RecordsPerPage">"" then Response.Write " And Not Contains "&nq&""

Do While Not objRS.EOF And RowCount > 0
Response.Write RowOnPage & "."
RowOnPage = RowOnPage + 1
With Response
.Write "Title: " & Server.HTMLEncode(objRS.Fields("DocTitle").Value)
.Write "Filename: " & objRS.Fields("Filename").Value
.Write "Description: " & Server.HTMLEncode(objRS.Fields("characterization").Value)
.Write "URL: "
.Write objRS.Fields("path").Value
End With
RowCount = RowCount - 1
objRS.MoveNext
Loop
...


For the sake of readability the above snippets show only the most important part of the implementation. If you are not a programmer or you just don’t feel comfortable hacking ASP pages, you may request the entire implementation for FREE.

Supposing that you are saving your code as searchdocs.asp in your web server root folder then you can your search engine by navigating to:

http://localhost/searchdocs.asp

The following page shows a screen capture of how this custom search engine looks like. You can see that looks pretty basic… but the big advantage is that having the source code of ASP page you can customize it to feet your corporate/personal needs.



Note: HDD Search Engine is an original implementation available only through ITObserver. At this moment, it is available FREE OF CHARGE to all ITObserver Email Subscribers. If you are already an email subscriber of ITObserver you may request the web application by dropping a text or audio comment or by sending an email to vmasoft at yahoo dot com. If you are not yet a subscriber, you may subscribe now and then request the application.

Don’t forget: HDD Search Engine is just one of the benefits of being an ITObserver subscriber. The most important thing is that you’ll get fresh tech news and articles delivered directly to your email box.

Publish CHM files online

Publish CHM documentation ( Microsoft Compressed HTML Help ) on web using a FREE Http Handler. Once the FREE Http Handler is installed on IIS the CHM documentation will be available to remote clients like a regular web site.

The best part of this tool is that there is no need to preprocess the CHM files! Just drop them on your web server and automatically the remote clients will see them like regular web pages. Since the output of this tool is platform-independent, users can use whatever browser they like to read the documentation.

CHM Browser Key Features

- publish CHM documentation on web without preprocessing;
- on the fly publish of CHM documents on web (just drop the CHM files on a web server and see the results);
- help documentation outputted by the component is platform-independent and browser-independent;
- CHM Browser helps search engines ( internet or intranets ones ) to index the content of CHM files;
- Published CHM documents maintain original CHM tree structure;
- FREE for ITObserver email subscribers;
- Source code available on request.

Why publish CHM files online?

- to make available products documentation to corporate users on company intranet portal;
- to better control documentation versioning;
- creating documentation in CHM format helps you target offline customers, while publishing CHM documents on web helps online customers;
- using CHM browser component users don’t have to download big CHM files. They’ll just browse/search the section they are interested in.

CHM Browser configuration

CHM Browser Http Handler is a .NET component (requires Microsoft .NET Framework 1.1+). Configuration of this component is achieved via editing a simple XML format file: Web.config

One of the most important features that you’ll want to configure here is a YES/NO parameter that specifies if download of original CHM file is allowed. If download is not allowed, remote clients will be able to only browse the content of CHM files without downloading the entire file.

Example

Let’s suppose we have a CHM file (tutorial.chm ) hosted on a web server with this component.

To download the CHM (supposing you are allowed to) you’ll have to point your browser to:

http://server/yourpath/tutorial.chm

To browse the CHM file directly on the server, point the browser to:

http://server/yourpath/tutorial.chm/

Note that the second URL has only a slash (/) appended to the address. Imagine this like CHM file is a folder.

Screen shots


A web folder in browse mode.


Reading a CHM document.


Reading a CHM document.


Downloading CHM Browser

Note: CHM Browser is an original application available only through ITObserver (you’ll not find it anywhere else on the NET). At this moment, it is available FREE OF CHARGE to all ITObserver Email Subscribers. If you are already an email subscriber of ITObserver you may request the application by dropping a text or audio comment or by sending an email to vmasoft at yahoo dot com. If you are not yet a subscriber, you may subscribe now and then request the application.

Don’t forget: CHM Browser is just one of the benefits of being an ITObserver subscriber. The most important thing is that you’ll get fresh tech news and articles delivered directly to your email box.

Thursday, February 15, 2007

Archive your article collection in CHM format

A few years ago the Internet access was so slow that people often saved interesting web pages to local drive for easy and quick reference. Some pages were sent to the printer but most of them remained stored on computer hard drive. Even with today’s high speed internet people still saves web pages to their computer for different reasons. Collecting and availability (in case the online page is removed) are some of them.

For archiving purpose most users are making a zip file out of their folders and burn the file to a CD or DVD. To view an archived article you have to unzip the entire collection first. Due to this inconvenience most articles are never reopened and become lost forever inside that zip file.

A better approach is to make a CHM (Compressed HTML Manual) file out of an entire folder of saved web pages. While a CHM has roughly the same size of a zip file it retains the ability to open the entire archive without requiring prior file extraction or other preparation. The CHM format was invented by Microsoft to keep Windows manuals in a modern and compact format.

Step 1. Save your favorite pages.

Because I like compact things I’m usually using the MHT format when I’m saving a web page from Internet Explorer. If you didn’t know about this, next time when you’ll save a page, it will be a good opportunity to test it.



If your saved pages are not in MHT format there is no reason to worry - the solution presented here works with almost any web document: MHT, HTML, etc.

Step 2. Start the FREE HTMLIndexer application

HTMLIndexer can be used mainly for 2 purposes: to generate an Index page for all articles in a folder, or to help generating a CHM file out of all articles in a folder. Since the scope of this post is to show you how to archive an entire folder of articles in a single CHM file make sure you check “Generate CHM project file” checkbox. A good idea is to check also the “Rename files” checkbox to increase compatibility with CHM specification.



To find out how to obtain HTMLIndexer please scroll to the end of this post.

After HTMLIndexer finishes its job take a look in your folder and note that several files appeared there: index.htm, index.hhp, index.hhc. If you checked “Rename files” then the filenames are also renamed using shorter names.



Step 3. Compile the CHM file

For this step you’ll need a second free application: Microsoft HTML Help Workshop. If you are a developer the chances are that you already have this application. If you don’ have it you can download it for free from Microsoft site.

Don’t worry about how to use it. Just install it and then double click on index.hhp file generated at previous step. Next press compile button and wait for application to finish its job.



Step 4. Cleaning up

That’s all. Now you can delete all the other files in the folder and keep only the generated CHM file.



You may now burn the CHM file on a CD, send it by email to a friend or just store it to your local hard drive. In any case you’ll be amazed how that huge folder of HTML files turned out in a nicely formatted CHM file in less than 2 minutes.




Note: HTMLIndexer is an original application available only through ITObserver (you’ll not find it anywhere else on the NET). At this moment, it is available FREE OF CHARGE to all ITObserver Email Subscribers.

If you are already an email subscriber of ITObserver you may request the application by dropping a text or audio comment or by sending an email to vmasoft at yahoo dot com. If you are not yet a subscriber, you may subscribe now and then request the application.

Don’t forget: HTMLIndexer is just one of the benefits of being an ITObserver subscriber. The most important thing is that you’ll get fresh tech news and articles delivered directly to your email box.

Wednesday, February 14, 2007

Blog upgrade shuffles articles

I upgraded yesterday ITObserver to the new version of Blogger. It was not something that I wanted but I was actually forced to upgrade when I logged into my account. Unfortunately this upgrade broke RSS and Atom feeds. Certain articles published during 2006 appear as published this year. Email subscribers also noticed the unwanted behavior by receiving older articles bundled between the recent ones.

Sorry for this inconvenience and thank you for reading ITObserver.

Tuesday, February 13, 2007

From ancient HTML to Web 2.0

Cool video presenting the differencing between Web 10 years ago and Web 2.0 of today.

Monday, February 05, 2007

Earn money selling what you say

This is the motto of ether, a company backed by the same investors as Ebay and Skype. All you have to do is setup a free Ether Phone Number, set a rate and when people call, you get paid. The rate you set is up to you. You can charge per minute or per call.



There are also other web sites out there that help trainers/advisors monetize their experience. Two of them are BitWine and TWL. Although not voice oriented like ether, these sites offer good tools to their subscribers.