Archive for December, 2010

Setting Cookie in PHP

PHP make easier by providing setcookie function to allow you to set cookie. Once cookie is set, you can access it through the super global array $_COOKIE.

Here is form of setcookie function.

setcookie($name, $value, $expire, $path, $domain, $secure);

  • $name: Cookie’s name. As always it should be meaningful.
  • $value:  Value of the cookie. It can be scalar value such as string or integer
  • $expire: Time to expire in UNIX timestamp. If time to expire is not set cookie will expire when user close the web browser.; for example: time()+”7200″. Cookie will be expired in two hours.
  • $path: The path on your web server for which the cookie will be returned.
  • $domain:  domain where cookie will be returned.
  • $secure: true to indicate cookie is set over secured HTTP (HTTPS). Default value is false

Here the sample of setting cookie :

<?php
setcookie(“user”,”newbiekid”,time() + 3600);
?>
<html>
<body>
<p>Cookie has been set to user newbiekid and will be expired in 1 hours.</p>
</body>
</html>

Be noted that cookie must be set before any HTML code as shown above.This is because cookies are headers and must come before the body of the request.

Once cookie has been set you can get its value via superglobal array $_COOKIE. Before reading cookie value you should check whether the cookie is available by using isset function. Here is the code sample to read cookie value:

Read the rest of this entry

You always got an email SPAM, hoaxes, scams, lottery, falsehood, and you want to know the identity of the sender of the email? Easy to do anyway, namely by Email Trace. You can find out the IP-Address e-mail sender, a map where he is, the degree of latitude and bows, very completed.
This is the way :

1. Open http://www.ip-adress.com/trace_email/

On these pages you will be asked to enter the email header. Email header is the information in each email, such as sender and receiver IP address.
How to view email headers:

* Yahoo New Mail: Right-click on the email, select View Full Headers
* Yahoo Mail Classic: Open the email, in the lower right corner there is written View Full Header.
* Gmail / Google Mail: Open the email, there is an option at the top of the reply, next to Reply, there is a downward arrow, select Show Original.
* Hotmail: Right-click on the email, select View Source.
* Outlook Express: Open the email, open the File menu -> Properties -> Details -> Message Source
* Microsoft Outlook: just double click on the email to view in full window, open the Options menu -> View.

Read the rest of this entry

Pazera Free Video to 3GP Converter is an absolutely free application which converts the most popular video files (AVI, MPEG, MP4, FLV, and MOV) into mobile phone video format (3GP and 3G2). Application allows you to convert full movie or selected range only. You can limit output file size and set many parameters used by encoder (codec, bit rate, fps, sampling frequency, and resolution). The Pazera Free Video to 3GP Converter interface is very simple and user-friendly. To convert video files, just drag and drop them into main window and click the Convert button.

Version 1.2 includes Updated version of the FFmpeg encoder and aminor modifications to the source code and bug fixes.

What’s new in this version:
Version 1.2 includes Updated version of the FFmpeg encoder and aminor modifications to the source code and bug fixes.