Wednesday, January 25, 2006

System Restore

- If the sytem fails you can restore the last known working
Boot system -> F8-> menu show up -> select the last known working
- You can restore the certain date that you know that it was working
It is very good idea to have the system restore in your PC in case the virus attacks or installing the devices causing the system to crash.

Enable system restore:
Start->control panel -> system -> system restore -> enable (unclick turn off)
To restore following the instruction of help support on Windows. Then search for "system restore" then click on the system restore wizard and following
the instruction. To get help
Start -> help support
This will save you a lot of time if you know the system was working before then restore the point when it was working.

Saturday, January 21, 2006

QoS & VoIP - Quality of Service






Everyone can use VoIP by yahoo messager right ? but how about the quality ? it is bad and it is difficult to hear.
Tuy luc co luc it traffic nhu ban dem thi co the nghe duoc chut dinh va co khi traffic nhieu thi khong nghe duoc vi ly do rat de hieu. Khi tat ca moi nguoi neu noi qua IP layer 3 va TCp layer 4
cua OSI moi nguoi noi voi internet deu co quyen uu tien nhu nhau. Thi du doc email hay goi 1 file di hay noi chuyen voi IP thi deu co quyen uu tien nhu nhau.
Co mot dieu IP packet for voice rat ngan va nhieu goi nhu vay lien tuc khong bi dut doan thi moi co the noi chuyen duoc de dang. Thi du: "Anh di dau ?" co the chia lam 3 goi IP packet vi
time out cua IP rat nhanh ma minh thi noi chuyen cham hon.
Day la IP header
4 bit version + 4 bit header length + 8 bit type of Service (TOS)+ 16 bit lenght [32 bit]
16 bit identification + 3 bit flags + 13 bit fragment offset [32 bit]
8 bit time to live (TTL) + 8 bit protocol + 16 bit checksum [32 bit]
32 bit source IP address [32 bit]
32 bit destination address[32 bit]
data [ up 65535 bytes] (de hieu vi 16-bit lenght = 1111111111111111(hex-FFFF) - header = 65535
anh di dau: packet 1 + packet 2 + packet 3
(neu khong co uu tien thi 3 goi nay se den muc tieu destination thoi diem rat khac nhau nhieu,
su khac biet nay se KHONG thay ro rang khi goi email hay file upload nhung voice thi nghe se phan biet duoc vi vay QoS nam vai tro rat quan trong Voice over IP, thoi gian cua 3 packets nay di chuyen tu source den destination khong quan trong ma quan trong 3 packets co den cung luc hay khong chac chan se co delay vi co the di rat xa vi du Ottawa->Atlanta->California->HongKong ->VN, you can do "tracert vinetcom.com" from Vietnam you will will see how many hops that the packet is passed, that is fine this is the whole idea of the internet)
Vi moi nguoi co quyen uu tien nhu nhau den goi thu 3 (packet 3) co the den rat tre vi vay cuon dam thoai bi gian doan. MUON NGHE DUOC THI FAI TRA TIEN de co duoc QoS (quality of service) rat de hieu server truoc khi goi IP thi gang vao TOS thi goi IP nay tro thanh uu tien. Tuy theo tien tra co 3 loai (class) gom co Gold (vang), Silver (bac) va Bronze (Dong)
Day la nhiem vu chinh cua DiffServ. DiffServ differented the services, it is a method of trying to guaranteed quality of service on the large network such as an internet.

VoIP - Voice Over Internet Protocol


Voice Over Internet Protocol (VoIP) The most immediate benefit of VoIP for most businesses is savings on long distance charges. Companies equipped for VoIP can place long-distance calls over the Internet rather than the PSTN (Public Switch Telephone Network) and avoid paying long distance charges. Since most companies already pay for broadband Internet connections, the only additional requirement is the equipment that connects telephones to the IP network. the deployment of Voice Over Internet Protocol (VoIP) VoIP is needed to unify Voice and Data into single network and to cut the costs. I believe this is the way will shape the future. Before: Voice + Data Now: Only Data It is true since IP packet can carry Voice, at both end of IP, there is mechanism to convert IP to voice that we can hear these spectrium was predefined on the handshaking of what scheme will be used such as G.711 A-law and mu-law (G.711 is an ITU-T standard for audio companding. It is primarily used in telephony. The standard was released for usage in 1972. G.711 is a standard to represent 8 bit compressed pulse code modulation (PCM) samples for signals of voice frequencies, sampled at the rate of 8000 samples/second. G.711 encoder will create a 64 kbit/s bitstream. There are two main algorithms defined in the standard, mu-law algorithm (used in North America & Japan) and a-law algorithm (used in Europe and the rest of the world). Both are logarithmic, but the later a-law was specifically designed to be simpler for a computer to process. The standard also defines a sequence of repeating code values which defines the power level of 0 dB.) After the connection between both parties (calling and called) RTP (Realtime Transport Protocol) is taken over after the handshaking. SIP (Section Initial Protocol) is used in the following diagram. References: http://www.voip-forum.com/

Set up Email Outlook


SET UP/READ MAIL FROM WEBMAIL and OUTLOOK with
VINETCOM NETWORKS
1. SETUP OUTLOOK EXPRESS. 1
1. General 2
2. Servers. 2
3. Connection. 3
4. Security. 4
5. Advanced. 5

1. SETUP OUTLOOK EXPRESS
In tools then Account then Add a new email and following will help you to set up
General, Server, Connection, Security and Advanced.
Vao Tools then Account roi Add roi Mail nhu sau. Sau do vao General, Server, Connection, Security and Advanced.

1. General

Click General Enter Mail account: mail.iqcompany.com (hay Cai gi cung duoc) de minh biet neu minh co nhieu dia chi emails khac nhau – Xem nhu sau trang ke. Type the name to different anything; the name here is not important

Enter General Enter Mail account then username and password.
Username: longquan
Email Address: longquan@iqcompany.com
Please see form for more details.
2. Servers
Servers: Type incoming and outgoing mail as follows: Viet nhu sau va xem form.
Incoming mail: mail.iqcompany.com
Outgoing mail: mail.iqcompany.com
(day la mail server rieng cua IQ moi company sign voi Vinetcom se duoc mail server rieng vi vay dung thac mac la anh co mail server rieng vi server rieng nen ten la mail.iqcompany.com)

Incoming Mail Server:
Account name: longquan@iqcompany.com (you must have @ as you see - phai co chu @iqcompany nhu vay)
Password: xxxxxxxx
Then Click on box remember password


Unclick on my server require authentication (khong can)

3. Connection
Depending on the connection you have, it could be modem or LAN. Tuy theo connection voi modem hay LAN thi chon neu khong chon gi thi no tu dong

4. Security
Khong thay doi de nguyen Leave it alone. No Change in this field.

5. Advanced
If your ISP are using port 25 for their email servers you must change the SMTP to port 26 to prevent the conflict. The Vinetcom email server supports both port 25 and port 26 when you needed.
Neu ISP server dung port 25 thi doi qua port 26. Neu de port 25 doc duoc mail thi de port 25 neu khong thi doi qua port 26 Some ISP internet service provide using this port 25 for their own mail server therefore, vinetcom has changed to port 26.

Leave POP3 at port 110
Con POP3 thi de nguyen o 110
Xem nhu sau.

You will email account name longquan@iqcompany.com and you will be able to send and receive we HAVE TESTED and it works.

Finally, you can send and receive the emails from the account has been created by Vinetcom administration.

Set up IP on the PC




Day la web link o toshiba
http://www.csd.toshiba.com/cgi-bin/tais/su/
su_sc_modItemList.jsp?moid=213951&ct=DL&BV_SessionID
=@@@@1813577897.1137342898@@@@&BV_EngineID
=cccgaddgkffdlddcgfkceghdgngdgnj.0

Anh kem theo phan pdf and ethernet driver anh da download xang cho window XP. Satellite_140s171 chi tiet ve laptop
s240ethx.exe chay no tu dong install device driver cho laptop (luc o VN anh nghi anh chi install cho PCMA wireless vi ngay
cuoi cung anh format laptop va lam lai co le no thieu device drive, ethernet connection kho ma hu o laptop lam)

Sau khi install the device driver fai set up IP address cho ethernet card (RJ-45 100baseT) connection
Control panel -> Network connection

Sau do left button ->properties->Local Area Connection->TCP/IP lam giong nhu hinh ve, dia chi 192.168.0.150 co the thay
neu khong co PC nao dung 192.168.0.150 (chon IP nao ma khong ai dung tu 192.168.0.1->192.168.0.255
The la xong. Ethernet se chay duoc. Neu 2 PCs dung cung IP no se bao la "IP CONFLICT". Tat ca PC cua minh deu
dung static IP (chon IP) khong co dung dynamic IP (obtain IP automatically). Anh hi vong dia chi 192.168.0.150
khong co may PC nao dung ca.

Anh set up theo IPConfig ma Loc goi. IP: 192.168.0.150 la IP ma trong cong ty khong ai dung
moi duoc
Ethernet adapter Wireless Network Connection:



Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : Intel(R) PRO/Wireless 2200BG Network Connection

Physical Address. . . . . . . . . : 00-0E-35-37-B1-5D

Dhcp Enabled. . . . . . . . . . . : No

IP Address. . . . . . . . . . . . : 192.168.0.241 (tuy theo PC khong duoc giong nhau)

Subnet Mask . . . . . . . . . . . : 255.255.255.0

Default Gateway . . . . . . . . . : 192.168.0.20 (IP cua ADSL)

DNS Servers . . . . . . . . . . . : 210.245.31.10 (day la DNS domain name server cua FPT)

210.245.31.130 (day la DNS domain name server cua FPT)

Friday, January 20, 2006

SMS and misc. bar code reading...

Introduction
SMS (also known as text-messaging) has grown into a very popular method of communication. It has been around in Europe and Asia since the early nineties and its use is steadily increasing in the US as well.
SMS stands for "Short Message Service" and uses mobile phones to transmit (surprise, surprise) short messages to and from mobile phones and whilst many of us might not know this, it is also possible to send SMS messages from a website or a piece of software.
There are an infinite number of reasons why you might want to use your website to send SMS. You might want to add a "send by SMS" option to your headlines, for example, or you might want to provide 24/7 support in which your technician is alerted by SMS or you might simply want to provide your viewers with Free SMS to drive traffic to your site.
Although it is also possible to send SMS via e-mail, this tutorial will teach you how to send SMS using GET and POST HTTP methods in PHP (since it's the language I know).
For those of us that many not know this, using HTTP basically means the use of forms, just like a contact form, except that these will be submitted automatically as opposed to manually.
Although this tutorial can be used for any gateway that provides access via HTTP, it is based on TM4B's SMS Gateway because A) they are the only gateway I know that have a simulation mode for tweaking your scripts, B) they don't have any set-up fees, C) their prices are low, D) they are reliable and E) I use them.

Understanding the Requirements of the Gateway
Full details about connecting to TM4B are provided on their SMS API page. They basically require us to provide six mandatory pieces of data:
username: our username
password: our password
msg: our SMS message(s)
to: the recipient(s) of our message
from: our sender id
route: the route of the message (i.e. first class or business class)
And we will add a seventh, which is "sim". This identifies that our message is only a simulation and so credits won't be removed from our account and messages won't actually be delivered.

Now the actual message-delivery process is handled by the gateway. All they want us to do is pass them the details of the message(s) in the form of an HTTP request, similar to this one:
http://www.tm4b.com/client/api/send.php?username
=abcdef&password=12345&msg=This+is+sample+message.&to =447768254545%7C447956219273%7C447771514662&from
=MyCompany&route=frst&sim=yes
You can test the above example (which uses GET) by pasting it into your browser's address bar. You should get a response saying that the username is invalid, which is normal because this is just to demonstrate.
The first step is to save our data as variables and then convert them into a URL request. There are different ways of doing this, but this is a very innovative and useful way:
$val) //traverse through each member of the param array{ $request.= $key."=".urlencode($val); //we have to urlencode the values $request.= "&"; //append the ampersand (&) sign after each paramter/value pair}$request = substr($request, 0, strlen($request)-1); //remove the final ampersand sign from the request?>

We assign our credentials and routing information in the $param array. You'll notice that multiple recipients can be defined by separating them with the pipe-character. Each parameter value needs to be urlencoded and multiple key/value pairs are separated by ampersands. A final ampersand probably would not cause any problems but substr is still used to produce a tidy request.
The script will produce the following request that can be sent to the SMS gateway: username=abcdef&password=12345&msg
=This+is+sample+message.&to
=447768254545%7C447956219273%7C447771514662&from
=MyCompany&route=frst&sim=yes

Sending the request with CURL
Previously we saw that the request could be executed by pasting it into the browser window. But what we really want is for this to take place behind the scenes. The following code does exactly that using CURL.
CURL is a very impressive library that allows you to connect and communicate to many different types of servers with many different types of protocols. You can find more info in the PHP Manual.
This code opens up a connection with the gateway, sends the SMS message(s) and collects their message IDs which are presented within the response header.


First, we initialize a new CURL session. Then we set our desired options; this includes setting CURLOPT_POST because TM4B's SMS API requires us to send multiple messages using POST. Finally we execute the call and then close the handle.

Sending the Request with Sockets
CURL functions depend on an external library and PHP must have been compiled with the --with-curl flag. So while CURL is very flexible and useful, it may not be available with your PHP installation. If this is the case, you can still communicate with the SMS gateway using sockets.


First we layout the information we'll need to send our SMS and use it construct the HTTP header. A socket connection is established to our gateway using fsockopen. Information is sent and received in the same manner PHP would read and write to a file. After our transfer is complete we close the socket using fclose.

Conclusion
That's It! Although it took me a long time to find CURL, I think it is the best, neatest and quickest option assuming your version of PHP supports it. Furthermore, whilst both fsockopen and CURL can send thousands of messages in one go, fsockopen might give you difficulties when parsing responses for large requests as the responses are transferred in chunks.

The above took me ages; I hope it saves you time.

About the Author

Farheen Rehman is the editor of BestKeptSimple, a very popular blog about SMS. She is very well versed with the commercial use of SMS and provides consultancy for organizations that want to add it to their communications mix.
-------------------
(SMS short message service) PHAI HOI VINA VA MOBILE co dich vu sau day. Con phan web thi xem phan code.
KHong don gian fai su lien he giua website and wireless network. 2 cach:
- sms getaway can hoi Vinaphone hay Mobile co dich vu do la mot address nhu thuong vi du 8367888@vnn.com (sms getaway)
tat ca sms goi qua address minh co the setup address forward qua mot email cua minh nhu sales@vinetcom.com (website)
sms getaway cung cap su ket noi giua het thong wireless va cho phep goi qua mot dia chi thong nhat. sms getaway cung giong
nhu mua card dien thoai tra tien truoc. Luc truoc ICQ co dich vu nay bay gio goi sms thi phai ton tien o ICQ.
Basically, the "gateway" would be the provider that connects to telecom network with authorisation to send sms.
- hay tim mot dich vu nao o VN cho phep send sms duoi dang email
thi code nhu thuong le thi dich vu nay se chuyen qua sms va vice versa (goi tu mobile thi chuyen qua email) nhu vay website
ho tro nhu binh thuong. Tuy Mobile and Vina co cho dia chi nhu 6137425788@mobile.att.net moi so dien thoai co mot email nhu vay neu email goi qua dia chi nay thanh sms o dia thoai so 6137425788

Tom lai la minh chi can co mot dia chi ma VINA va MOBILE biet de goi den tu he thong wireless cua ho.

Viet code
1 - sms getaway
VIet php tu website cung nhu viet form goi mail nhu http://xxxx/ ma ho da define cho minh
connect form contact action to the script of service provider (cung giong nhu tra tien tren mang)


2- 2025551212@mobile.att.net
Khach hang se goi qua dia chi nay thi no se forward dia chi minh va nguoc lai khi goi tra cho khach hang thi minh doi
$cusmess .= "contact@vinetcom.com "; -->2025551212@mobile.att.net $headers = getheaders("Vinetcom",$emailadmin); $headers1 = getheaders("$email",$email); mail($email,$cussub,$cusmess,$headers);
Note: to have 2025551212@mobile.att.net or something like that to receive the reply from mobile phone, the monthly charge is $20/month.
For send SMS under form mail, need to buy SMS msg or credits. 1000 credits could
cost between $7.00 to $10.00. Both can be purchased at
http://www.clickatell.com

Format cua SMS cung nhu email
Header: identifies the type of message.
Service Center Timestamp
Originator Address: the phone number of the sender
Protocol Identifier
Data Coding Scheme
User Data Length: tells how long the message is
User Data: the message itself (140 bytes: 160 7-bit characters, or 140 8-bit characters)
How SMS worksSMS works on a store-and-forward basis. Instead of being sent directly to the recipient, SMS messages travel through several important nodes before reaching the recipient (skip this part if you find it boring; there's more good stuff below).
The SMS message is submitted to your wireless service provider's SMS Center.
After the message is processed internally, the SMS Center sends a request to the Home Location Register (HLR) and receives the routing information for the recipient.
The SMS Center sends the message to the Mobile Switching Center (MSC).
The MSC collects the recipient's information from the Visitor Location Register (VLR) and, sometimes, proceeds with an authentication operation.
The MSC forwards the message to a Mobile Server.
If the recipient has a Treo or VisorPhone, the SMS is placed on the SIM card until the handheld picks up the message and transfers it to the internal memory on the unit.
This is how Treos and VisorPhones can store hundreds of SMS messages, unlike ordinary GSM mobile phones that store only a few SMS messages.
Treo or VisorPhone owners may encounter the error message "Your SIM contains at least one SMS message. Do you want to move the message to your Visor?" See the related SMS article in our knowledgebase for details.
The MSC returns the outcome of the Forward Short operation to the SMS Center.
The SMS Center reports delivery status of the short message back to the sender
-----
Dau co can quyen gi dau vao cpanel roi mysql tao, anh tao thu 1 database dau co can quyen gi. Chi can log
vao cpanel with username and pwd da goi. Ve barcode thi anh khong biet dau. Can mot interface run pcapplications
voi scan reader doc vao PC roi upload len website. Khong biet em co lam duoc khong. PHP khong co lam duoc
ma C/C++ hay Visual Basic. Em biet chu ? PHP la web language. Nen muon hay cong tac mot nguoi kha kha mot chuc
lam giup ve nhung ky thuat.
scan bar code ---rs232/usb --> data to pc ----upload data to database---> website hinh thuc
c/c++/vb php ngon ngu lap trinh
Thu 4 tuan sau anh di cong chuyen 3 ngay neu khong reply you will know.
-----------------------


Thursday, January 19, 2006

OSI Layers

OSI (Open System Interconnections Reference Model) layers including 7 layers:
from bottom layer
--------------> To Top layer
->Physical layer - Layer 1 (ISDN, ATM, ADSL, FDDI, Coax)
-> link layer (SLIP, PPP, 802.2, Ethernet)
-> network layer (Internet Protocol 4, IPV6)
->Transport layer (TCP, UDP)
->Session Layer (POP/25, 80, 20/21, 443
->Presentation Layer (POP, SMTP, HTTP, FTP, Telnet, DNS,SNMP, NFS, HTTS)
->Application Layer - Layer 7 (Email, Newsgroup, Web apps, File transfer, host sessions, directory service, network management, file service)

ARP/RARP (Reverse) Address Resolution Protocol

ARP/RARP is commonly used to map the layer 2 MAC address to an address in a layer 3 protocol such as IP.

Set up SpamAssassin with Cpanel

The easy way to remove spam directory is FTP for example using CuteFTP
and remove the directory spam of each user like: www/mail/username/spam
Spam directory is created when there are junk/spam mail so no need to create spam directory when it was deleted.
Today I was surprised to see my website 93 MB, I was astonished about the size so I went each of directory and checked. I found out that the mail directory of website is over 50 MB. I checked each of users, there was a spam directory and most of them are never deleted since I started enable spamassassin. These directories are big and took up 50 MB.
----
When set up, the mails are identified as SPAM (unsolicited email). SpamAssassin is designed to identify and mark emails that score beyond your threshold value. An email's SpamAssassin score is the sum of values given to certain known spam characteristics. For more information, please visit the developers' website: http://www.spamassassin.org/
SpamAssassin is currently: enabled Spam Box is currently: enabled
This feature allows emails identified as spam by SpamAssassin to be delivered to a seperate mail folder named "spam". If this folder is not regularly checked and emptied, it may cause your email or filesystem quotas to be exceeded, resulting in a failure to receive legitimate messages. You can easily use IMAP or Horde/IMP to check messages that are routed to this box. If you wish to use pop3 to check the spam box, just add "/spam" (without the quotes) to the end of your pop3 login. (Example: user@domain.tld/spam)

SMS (Short Message Service)

You can use SMS to send and receive from the website to mobile phone. There are 2 issues you need to know and its costs as well.
1. Need to buy the SMS messages allowing you to send. Depending on where you are using to send SMS messages, there is another terms called SMS credits sometime 1 SMS message costs SMS credits and if the SMS has to travel to many hops/routers, it can cost more 1 SMS credits. There is a website has everything you need to know (http://www.clickatell.com)
2. If you want to receive a message from mobile phone then you need to have a number registration for example 123456789@clickatell.com so it will forward this SMS message to your website. They can convert SMS to email and vice versa. The cost to have a number like a telephone number is $20.00/month
Here is PHP code to implement to your website. You need to pay to get the
password and username. After you submit into their API, it returns with $ret where is valid or non valid, and tell you whether the message has been sent or not.

PHP
$user = "user";
$password = "password";
$api_id = "xxxx";
$baseurl ="http://api.clickatell.com";
$text = urlencode("This is an example message");
$to = "0123456789";
// auth call
$url = "$baseurl/http/auth?user=$user&password=$password&api_id=$api_id";
// do auth call
$ret = file($url);
// split our response. return string is on first line of the data returned
$sess = split(":",$ret[0]);
if ($sess[0] == "OK") {
$sess_id = trim($sess[1]); // remove any whitespace
$url = "$baseurl/http/sendmsg?session_id=$sess_id&to=$to&text=$text";
// do sendmsg call
$ret = file($url);
$send = split(":",$ret[0]);
if ($send[0] == "ID")
echo "success
message ID: ". $send[1];
else
echo "send message failed";
} else {
echo "Authentication failure: ". $ret[0];
exit();
}
?>



So this is blog

Blog is Web log, it is like website runs under the sub-domains, yahoo has a similar approach allowing to create your own website (www.geocities.com). However, it is a bit difference, blog offers you the set of tools to post, review and comments, the purpose is very closed to forum except here you can create your own sub-domain which they call here is blog.

ViNetCom

Our business objective is to provide Technology Offshore Outsourcing and Consulting Services. Leveraging global resources to facilitate the business process. Committed to delivering innovative technology by helping our clients to become high-performance businesses. Our experience covers the wide range of technologies spanning your enterprise from Ecommerce/B2B or ERP applications to telecommunications. Our technology research and development organization creates a vision of how technology will shape the future and invent the next wave of cutting-edge business solutions. Our approach harnesses a global economy, industry expertise and deep technology and outsourcing skills to deliver cost-effective business solutions. The company believes that it can run 2 tasks in parallel: offshore software outsourcing and developing products - to help our clients leverage the risk, minimize the competition and enhance the profit.
Our goal achievement is to bridge the gap in the global market by building products and services and implementing prudent business and technology strategies in today's dynamic digital environment. As the broadband becomes widespread around the globe and the reliability of IP Networks, the deployment of
Voice Over Internet Protocol (VoIP) The most immediate benefit of VoIP for most businesses is savings on long distance charges. Companies equipped for VoIP can place long-distance calls over the Internet ratherthan the PSTN and avoid paying long distance charges.Since most companies already pay for broadband Internet connections, the only additional requirement is the equipment that connects telephones to the IP network.VoIP is needed to unify Voice and Data into single network and to cut the costs. In the meantime, the global business market continues to grow in the ecommerce. The
ecommerce revenues topped $1.5 trillion in 2004—a more than 1,200 percent increase since 1999—according to market research firm IDC. Almost one-third of all business-to-business transactions are performed via e-commerce. This growth is driven by the decisive advantages of doing business online: better customer service, streamlined order processes, faster response times and an opportunity to tap new revenue streams. However, security becomes an issue – the protection of sensitive information in the global economy during information interchanges on the internet.