March 17, 2008

List of Frequency Satellite TELSTAR 18 (138.0E)


Type   Freq(GHz) Pol Channel SR
TV-DIG 3B 12.430 V C2 22425
TV-DIG 3B 12.430 V C3 22425
TV-DIG 4B 12.490 V 00-BILLBOARD 21593
TV-DIG 5B 12.538 V CCTV 4 41250
TV-DIG 5B 12.538 V CCTV 9 41250
TV-DIG 5B 12.538 V CCTV OPERA 41250
TV-DIG 5B 12.538 V BEIJING 41250
TV-DIG 5B 12.538 V SHANGHAI 41250
TV-DIG 5B 12.538 V JIANGSU 41250
TV-DIG 5B 12.538 V HUNAN 41250
TV-DIG 5B 12.538 V FUJIAN 41250
TV-DIG 5B 12.538 V XIAMEN 41250
TV-DIG 5B 12.538 V GUANGDONG 41250
TV-DIG 5B 12.538 V SHENZHENG 41250
TV-DIG 7B 12.646 V P1 22425
TV-DIG 7B 12.646 V P2 22425
TV-DIG 7B 12.646 V P3 22425
TV-DIG 7B 12.646 V P4 22425
TV-DIG 7B 12.646 V P5 22425
TV-DIG 7B 12.646 V P6 22425
TV-DIG 7B 12.646 V P7 22425
TV-DIG 7B 12.646 V P8 22425
TV-DIG 7B 12.646 V P9 22425


Source: satcodx.com
Read More..
Share

List of Frequency Satellite NILESAT 101,102, ATLANTIC BIRD 4 (353.0E - 7.0W)

Type   Freq(GHz) Pol Channel SR
TV-DIG 10.719 V Hannibal Orient 27500
TV-DIG 10.719 V ALJazeera Children 27500
TV-DIG 10.719 V Press TV 27500
TV-DIG 10.719 V Test 4 27500
TV-DIG 10.719 V Test 5 27500
TV-DIG 10.719 V Test 6 27500
TV-DIG 10.719 V Test 7 27500
TV-DIG 10.719 V Test 8 27500
TV-DIG 10.719 V Test 9 27500
TV-DIG 10.719 V Test 10 27500
TV-DIG 10.719 V Test 11 27500
TV-DIG 10.719 V Test 12 27500
TV-DIG 10.728 H LIBYA-EDU. 38500
TV-DIG 10.728 H LIBYA-EDU2 38500
TV-DIG 10.758 V Al Rayah 27500
TV-DIG 10.758 V Mersal 27500
TV-DIG 10.758 V Al-Atheer 27500
TV-DIG 10.758 V Omry 27500
TV-DIG 10.758 V Test 27500
TV-DIG 10.758 V Sada TV 27500
TV-DIG 10.758 V ALMAJD9 27500
TV-DIG 10.758 V Al-Shoroq 27500
TV-DIG 10.758 V Rabet Alkher 27500
TV-DIG 10.758 V Al Masah 27500
TV-DIG 10.758 V OK TV 27500
TV-DIG 10.758 V Harmony TV 27500
TV-DIG 10.758 V Sahoor 27500
TV-DIG 10.758 V Falla 27500
TV-DIG 10.758 V Al Saeeda 27500
R-DIG 10.758 V ALKawther FM92 27500
TV-DIG 10.795 V Tunis 7 27500
TV-DIG 10.795 V Melody Tunes 27500
TV-DIG 10.795 V Test 27500
TV-DIG 10.795 V I TV 27500
R-DIG 10.795 V Tunis International 27500
R-DIG 10.795 V Tunis National 27500
R-DIG 10.795 V Tunis Culture 27500
TV-DIG 10.795 V Zagros 27500
TV-DIG 10.795 V Addounia 27500
TV-DIG 10.795 V Al Mukhtalif 27500
TV-DIG 10.795 V Fanoos 27500
TV-DIG 10.795 V Al Amaken 27500
TV-DIG 10.795 V KurdSat 27500
TV-DIG 10.795 V Oman TV2 27500
TV-DIG 10.795 V Khalijiah 27500
TV-DIG 10.795 V Massaya 27500
TV-DIG 10.795 V AL Tejariah 27500
TV-DIG 10.834 V Al Ahd 27500
TV-DIG 10.834 V Al Iraqia 27500
TV-DIG 10.834 V Iraqia Atyaf 27500
TV-DIG 10.834 V Iraqia Sport 27500
R-DIG 10.834 V Baghdad Radio 27500
R-DIG 10.834 V Algeel Radio 27500
R-DIG 10.834 V Shahrazad Radio 27500
TV-DIG 10.834 V Al Forqan 27500
TV-DIG 10.834 V Najah 2 27500
TV-DIG 10.834 V Al Badr 27500
TV-DIG 10.834 V Cairo-Univ1 27500
TV-DIG 10.834 V Tunisie 21 27500
TV-DIG 10.834 V Alseha Waljamal 27500
TV-DIG 10.834 V Temp1 27500
TV-DIG 10.834 V Temp2 27500
TV-DIG 10.834 V Iraqia Mubasher 27500
R-DIG 10.834 V Iraqia Quran 27500
TV-DIG 10.853 H Test 27500
TV-DIG 10.853 H Al Rahma 27500
TV-DIG 10.853 H Al Hekma 27500
TV-DIG 10.853 H Assaa 27500
TV-DIG 10.853 H A3mal 27500
TV-DIG 10.853 H Afak 27500
TV-DIG 10.853 H 2M Plus 27500
TV-DIG 10.853 H Marina TV 27500
TV-DIG 10.853 H LifeStyle TV 27500
TV-DIG 10.853 H Melody TRIX 27500
TV-DIG 10.853 H Modern Sport 27500
TV-DIG 10.853 H MODERN 27500
TV-DIG 10.853 H Dream Sport 27500
TV-DIG 118 10.872 V Al-Tawasol 27500
TV-DIG 118 10.872 V Noorsat Test 27500
TV-DIG 118 10.872 V Mrhaba-118 27500
TV-DIG 118 10.872 V Al-Maaref 27500
TV-DIG 118 10.872 V Soon-Emirates 27500

Source: satcodx.com

Read More..
Share

List of Frequency Satellite C-Band: ASIASAT 2 (100.5E)

Type   Freq(GHz) Pol Channel SR
TV-DIG 1A 3.660 V AL EMARAT 27500
TV-DIG 1A 3.660 V NILE NEWS 27500
TV-DIG 1A 3.660 V PRESS TV PROMO 27500
TV-DIG 1A 3.660 V AL-ALAM 27500
TV-DIG 1A 3.660 V KUWAIT SPACE CHANNEL 27500
TV-DIG 1A 3.660 V IRIB3 27500
TV-DIG 1A 3.660 V ALKASS 27500
R-DIG 1A 3.660 V RADIO SARASARI 27500
R-DIG 1A 3.660 V RADIO MAAREF 27500
R-DIG 1A 3.660 V EL BERNAMERG 27500
R-DIG 1A 3.660 V EL-QURAN EL-KARIM 27500
R-DIG 1A 3.660 V RADIO QURAN 27500
TV-DIG 3B 3.705 H UP4 4165
TV-DIG 3.705 V FEED 3 5630
TV-DIG 3.767 V AsiaPacific 6525
TV-DIG 3.778 V AJK-TV. 3333
TV-DIG 3.787 H RTB INTERNATIONAL 6000
TV-DIG 4A 3.791 V Shamshad TV 2443
TV-DIG 3.796 V Service 2 2963
TV-DIG 6A 3.820 V Syria TV 27500
TV-DIG 6A 3.820 V Yemen TV 27500
TV-DIG 6A 3.820 V Abu Dhabi TV 27500
TV-DIG 6A 3.820 V Oman TV 27500
TV-DIG 6A 3.820 V Saudi TV 27500
TV-DIG 6A 3.820 V Qatar TV 27500
TV-DIG 6A 3.820 V Sudan TV 27500
TV-DIG 6A 3.820 V Sharjah TV 27500
TV-DIG 6A 3.820 V Libiya TV 27500
TV-DIG 6A 3.820 V Saudi Arabian TV 2 27500
TV-DIG 6A 3.820 V Aljazeera Channel 27500
R-DIG 6A 3.820 V Voice of Youth 27500
R-DIG 6A 3.820 V EMIRATES FM 27500
R-DIG 6A 3.820 V Voice of people 27500
R-DIG 6A 3.820 V Main General Program 27500
R-DIG 6A 3.820 V Oman Radio 27500
R-DIG 6A 3.820 V Saudi Radio 1 27500
R-DIG 6A 3.820 V Radio Quran 27500
R-DIG 6A 3.820 V Sharjah FM 27500
R-DIG 6A 3.820 V Sudan Radio 27500
R-DIG 6A 3.820 V Radio Omdurman Holy Koran 27500
R-DIG 6A 3.820 V Qatar Radio 27500
R-DIG 6A 3.820 V Yemen Radio 1 27500
R-DIG 6A 3.820 V Yemen Radi 2 27500
R-DIG 6A 3.820 V Oman Holy Quran 27500
TV-DIG 6A 3.820 V KUWAIT 27500
TV-DIG 3.960 H SATLINK 27500
TV-DIG 3.960 H Supreme Master TV 27500
TV-DIG 3.960 H Cancao Nova 27500
TV-DIG 3.960 H DAYSTAR 27500
TV-DIG 10B 4.000 H RAI International 28125
TV-DIG 10B 4.000 H TVE 28125
TV-DIG 10B 4.000 H Cubavision 28125
TV-DIG 10B 4.000 H RTPi 28125
TV-DIG 10B 4.000 H RTR Planeta 28125
TV-DIG 10B 4.000 H LUXE-TV-SD 28125
TV-HD 10B 4.000 H LUXE-TV-HD 28125
R-DIG 10B 4.000 H YLESAT1 28125
R-DIG 10B 4.000 H WRN 28125
R-DIG 10B 4.000 H REE 28125
R-DIG 10B 4.000 H WRN Mul AAP 28125
R-DIG 10B 4.000 H RNW 28125
R-DIG 10B 4.000 H RAIRadio 28125
R-DIG 10B 4.000 H RAI International Asia 28125
R-DIG 10B 4.000 H RDP Internacional 28125
R-DIG 10B 4.000 H RDP Antena 1 28125
R-DIG 10B 4.000 H RNE Contribucion 28125
R-DIG 10B 4.000 H YLESAT2 28125
R-DIG 10B 4.000 H RFI Francais 28125
R-DIG 10B 4.000 H RFI Langues1 28125
R-DIG 10B 4.000 H RFI Langues2 28125
R-DIG 10B 4.000 H RFI Musique 28125
R-DIG 10B 4.000 H RFI Cambodge 28125
R-DIG 10B 4.000 H RFI Kaboul 28125
R-DIG 10B 4.000 H RFI WS Sud 28125
R-DIG 10B 4.000 H RFI Worldspace 28125
R-DIG 10B 4.000 H RFI WS Ouest 28125

Source: satcodx.com
Read More..
Share

March 12, 2008

Factor Importance in SEO

Search engine ranking in Search Engine such as Google, Yahoo, Live is influenced by 5 factor importance.

1. Essential

a. Title document


The document title is the text within the <title>...</title> tags in the HTML code of your web page

b. Global link popularity (Google,Live,Yahoo)

The global link popularity measures how many web pages link to your site. The number of web pages linking to your site is not as important as the quality of the web pages that link to your site.
All major search engines take the quality and the context of the links into account. Search engines assume that your web page must offer relevant content if many quality sites link to it.

c. Link teks of inbound link

Inbound links are links from other web sites to your site. If many other sites link to your site, then search engines consider your site to be important. However, the number of links is not as important as is the relevance of the linking page and the link text used in linking to your site

d. use in body text

The body text is the text on your web page that can be seen by people in their web browsers. It does not include HTML commands, comments, etc. The more visible text there is on a web page, the more a search engine can index. The calculations include spaces and punctuation marks

2. very important

a. Age website

Spam sites often come and go quickly. For this reason, search engines tend to trust a web site that has been around for a long time over one that is brand new. The age of the domain is seen as a sign of trustworthiness because it cannot be faked

b. in H1 headline texts

H1 headline texts are the texts that are written between the <h1>...</h1>tags in the HTML code of a web page. Some search engines give extra relevance to search terms that appear in the headline texts

3. important

a. domain name

he domain name is the main part of the web page address

b. Keyword use in page URL

The page URL is the part after the domain name in the web page address

c. Link from social network(del.icio.us, digg,technorati)

On social network sites, people decide which web sites are popular. This means that the popularity on social network sites cannot be easily influenced. For this reason, search engines might trust web sites more if they are popular on social networks

d. server speed

Popular web sites often have faster server response times compared to smaller unimportant sites. In addition, most search engines index more pages from fast web sites

e. Keyword use in H2-H6 headline texts

H2, H3, H4, H5 and H6 headline texts are the texts that are written between the <h2>...</h2>, <h3>...</h3>, etc. tags in the HTML code of your web page. Some search engines give extra relevance to search terms that appear in the headline texts

f. Keyword use in IMG ALT attributes

The <img alt> attribute defines an alternative text for an image when the user uses a text browser or when the user has turned off the display of images in the web browser application. Microsoft's Internet Explorer displays the alternative text if the user puts the cursor over the graphic

g. Top level domain of website

Web sites with certain top level domains (TLD) are statistically more likely to contain higher quality, trustworthy contents. For this reason, search engines might prefer web sites with restricted TLD (.edu, .gov., .mil) over younger TLD (e.g., .biz, .info, .jobs). In addition, country code TLD (e.g., .ca, .de, .fr) are often preferred in the country's local search results.

h. Keyword use in bold body text


The body text is the text on your web page that can be seen by people in their web browsers. The bold body text uses a darker and heavier face than the regular type face. It appears between ... or ... tags in the HTML source of your web page. CSS is not recognized. The statistics include spaces and punctuation marks

i. Number visitor (Alexa)

Search engines might look at web site usage data, such as the number of visitors to your site, to determine if your site is reputable and contains popular contents. The Alexa.com traffic rank is based on three months of aggregated traffic data from millions of Alexa Toolbar users and is a combined measure of page views and number of site visitors

4. moderately important

a. Keyword use in same site link texts

Link texts are words and sentences that are used as links. Same site link texts are the link texts of the links that point to a web page on the same domain

b. in outbound link texts

Link texts are words and sentences that are used as links. Outbound link texts are the texts within the <a>...</a> tags when the <a> tag links to a web page on a different domain. This chapter examines if Google.com gives relevance to search terms in outbound link texts

c. in same site link URL

Links connect one web page to another. Same site links are the links in <a href> attributes that point to other pages on the same domain. This chapter examines if search terms in same site link URLs are relevant to Google.com

d. in outbound link URL

Links connect one web page to another. Outbound links are the links on a web page that point to web pages on other web sites, i.e. links to other domains

e. meta description

The Meta Description tag allows you to describe your web page. This chapter tries to find out if Google.com takes the Meta Description tag into account. Some search engines display the text to the user in the search results

f. number of trailing slashes in URL

The number of trailing slashes (/) in the URL indicates where a web page falls in a site's overall hierarchy. If the URL contains many trailing slashes, meaning it is placed in a sub-sub-directory, then the webmaster does not seem to think that the page is important in relation to the other pages.

5. slightly important

a. HTML Validation

Web pages are written in special languages called HTML and CSS. Like any language, HTML and CSS change constantly. The World Wide Web Consortium (W3C) is the governing body that establishes what is valid HTML/CSS and what is not. Search engines obey the HTML/CSS standard. If there are errors in the HTML/CSS code of your web page, then search engines might not be able to read everything of your web page

b. Readability level of web page

The Flesch Reading Ease test is a United States governmental standard to determine how easy a text is to read. It measures the approximate level of education necessary to understand the web page content. Higher scores indicate the text that is easier to read, and lower numbers mark harder-to-read texts. Scores among different languages are not comparable.

c. Keyword use in meta keywords

The Meta Keywords tag allows you to define which search terms are important to your web page according to your opinion. It should be placed between the <head>...</head> tags in the HTML code of your web page. This chapter tries to find out if Google.com gives relevance to search terms in the Meta Keywords tag

d. in the first sentence of the body text

The first sentence of the body text is the first sentence after the <body> tag in the HTML code of your web page. Some search engines give more relevance to search terms when they appear in the first sentence. Some will use your first sentence as the description of your page on the search result page

e. HTML comments

HTML comment tags are "hidden comments" in the HTML code of your web page. They are not visible to the user. This chapter tries to find out if search terms in the HTML comment tags are relevant for a good ranking in Google.com.
Example:
<!-- comments with keywords -->

Source:Axandra.com
Read More..
Share

March 11, 2008

Dates and Time in PHP

In this section we will be guided through PHP's functions related to time.
1. getdate
One of the most important functions is the getdate function. It returns the current date in an array of values that can be used for further treatment. Let's take a look at an example:
<?php        
$mydate = getdate();
echo "seconds: ".$mydate['seconds']."<br>";
echo "minutes: ".$mydate['minutes']."<br>";
echo "hours: ".$mydate['hours']."<br>";
echo "mday: ".$mydate['mday']."<br>";
echo "wday: ".$mydate['wday']."<br>";
echo "mon: ".$mydate['mon']."<br>";
echo "year: ".$mydate['year']."<br>";
echo "yday: ".$mydate['yday']."<br>";
echo "weekday: ".$mydate['weekday']."<br>";
echo "month: ".$mydate['month']."<br>";
?>

First the current time is computed. In the next step, the values stored in the array are displayed.
seconds: 2
minutes: 17
hours: 16
mday: 02
wday: 6
mon: 1
year: 2008
yday: 11
weekday: Saturday
month: January

2. date and mktime
Sometimes we want a date to be displayed in a certain format. For this purpose, we can use a function called date. Let's take a look at an example:
<?php     
echo date("Y-m-d H:i:s");
?>

The date is displayed in the same way we have already seen when dealing with PostgreSQL:
2008-01-02 21:38:19  

However, with the help of date we can do even more. In general the date function is used to format a date to our needs. If we want to format any date, we pass it to the function; otherwise, the current date will be used. Let's see how this can be done:
<?php  
echo date("Y-m-d H:i:s", mktime(23,9,4,02,1,2008))."<br>";
echo date("Y-m-d, h a", mktime(23,9,4,02,1,2008))."<br>";
echo date("Y-m-d, z", mktime(23,9,4,02,1,2008))."<br>";
?>

The first line displays the date passed to the function by computing the result of the mktime function. mktime takes the input parameters and makes a date out of it. The result of this function can be used as input for the date function. In the first example the date including the time is displayed. In the second example we can see that 23 o'clock is equal to 11 p.m. The third example shows how many days in the year have passed until the date passed to the function.
If we execute the script, three lines will be displayed:
2008-02-01 23:09:04  
2008-02-01, 11 pm
2008-02-01, 334

So far, we have seen the most important flags of the date command. The following list shows all the flags and formats accepted by date:

  • a— Displays "am" (ante meridiem) or "pm" (post meridiem)
  • A— Displays "AM" or "PM"
  • B— Swatch Internet time
  • d— Two digits defining the day of the month
  • D— Displays day of week using three letters
  • F— Displays month as text
  • g— Displays the hour as number from 1 to 12
  • G— Displays the hour as number from 0 to 23
  • h— Displays the hour using two digits (01–12)
  • H— Displays the hour using two digits (00–23)
  • i— Displays the minutes as two digits (00–59)
  • I— "1" if Daylight Savings Time, "0" otherwise
  • j— Day of the month (1–31)
  • l— Displays day of the week as text
  • L— Boolean value defining whether a year is a leap year
  • m— Displays month using two digits (01–12)
  • M— Displays months using text
  • n— Displays month without using leading zero
  • O— Difference relative to GMT
  • r— RFC-822 formatted date
  • s— Displays second using two digits (00–59)
  • S— Displays English ordinal suffixes
  • t— Number of days in a given month
  • T— Displays the time zone the local machine is in
  • U— Seconds since Unix starting time (January 1, 1970)
  • w— Displays day of week as number (0=Sunday; 6=Saturday)
  • W— ISO-8601 week number of year, weeks starting on Monday
  • Y— Displays year using 4 digits (2004)
  • y— Displays year using 2 digits (99)
  • z— Day of year
  • Z— Time zone offset in seconds


3. checkdate
To find out if a date is valid, PHP provides a function called checkdate. The function accepts three parameters. The first one defines the month, the second one the day, and the third one the year of the date. When checking the date, leap years are taken into consideration.
Let's see how this function can be used:
<?php       
if (checkdate(12, 1, 2008)) {
echo "date valid<br>\n";
}
else {
echo "date invalid<br>\n";
}
if (checkdate(12, 1, 200800)) {
echo "date valid<br>\n";
}
else {
echo "date invalid<br>\n";
}
?>

The first date is valid, but the second one isn't:
date valid 
date invalid


4.gettimeofday

The gettimeofday function returns the current date in an array. In contrast to the getdate function, gettimeofday returns microseconds, seconds, the minutes west of Greenwich, and the type of DST (Daylight Saving Time) correction. The next listing contains an example:
<?php    
$mydate = gettimeofday();
echo "sec: ".$mydate['sec']."<br>\n";
echo "usec: ".$mydate['usec']."<br>\n";
echo "minuteswest: ".$mydate['minuteswest']."<br>\n";
echo "dsttime: ".$mydate['dsttime']."<br>\n";
?>

Four lines will be displayed:
sec: 1205255935
usec: 546879
minuteswest: -420
dsttime: 0

The third line especially will be important because the content of the third field will help we when working with time zones. In this scenario we are two hours east of Greenwich (two hours in front).
5. gmtime
If we want a result to be displayed using GMT (Greenwich Mean Time), we can use gmtime instead of the date function. The advantage of this function is that we don't have to retrieve the current time zone and compute the offset to GMT. gmtime can do all these things for we:
<?php         
echo date ("M d Y H:i:s", mktime (22,39,18,02,1,2008))."<br>";
echo gmdate ("M d Y H:i:s", mktime (22,39,18,02,1,2008))."<br>";
?>

If we take a look at the next example, we will find out that the second line differs from the first line:
February 01 2008 22:39:18 
February 01 2008 21:39:18

6.gmmktime
The gmmktime function can be used to compute a Unix timestamp for a GMT date. Let's take a look at the syntax overview of the command:
int gmmktime (int hour, int minute, int second, int month, int day,  int year [, int is_dst])  

To compute the number of seconds passed until Unix starting time, we can use a script like the following:
<?php       
$x = gmmktime (1, 17, 53, 1, 13, 2008);
echo "x: $x<br>\n";
?>

More than one billion seconds have passed since Unix starting time:
x: 1200187073    



7 gmstrftime and strftime
To format a timestamp according to our needs, PHP provides two additional functions, which will be discussed in this section: gmstrftime and strftime. The difference between the two functions is that gmstrftime returns the data as GMT, whereas strftime uses the local settings to display the time. Let's take a look at an example:
<?php    
setlocale ('LC_TIME', 'en');
echo "GMT:<br>\n";
echo gmstrftime ("%b %d %Y %H:%M:%S",mktime (23, 19, 8 ,03 ,1 ,2008))."<br><br>\n";
echo "local settings:<br>\n";
echo strftime ("%b %d %Y %H:%M:%S",mktime (23, 19, 8 ,03 ,1 ,2008))."<br>\n";
?>

First the local setting is defined. In the next step the date passed to the mktime function is formatted according to the template passed to gmstrftime, and strftime functions as the first parameter. If we execute the script, several lines will be returned as we can see in the next listing:
GMT:  Mar 01 2008 16:19:08    
local settings: Jan 01 2008 23:19:08

8. localtime


PHP's localtime function is similar to Perl's localtime function. It returns the current local time as an array consisting of all necessary components:
<?php          
$mydate = localtime();
echo "tm_sec: ".$mydate[0]."<br>\n";
echo "tm_min: ".$mydate[1]."<br>\n";
echo "tm_hour: ".$mydate[2]."<br>\n";
echo "tm_mday: ".$mydate[3]."<br>\n";
echo "tm_mon: ".$mydate[4]."<br>\n";
echo "tm_year: ".$mydate[5]."<br>\n";
echo "tm_wday: ".$mydate[6]."<br>\n";
echo "tm_yday: ".$mydate[7]."<br>\n";
echo "tm_isdst: ".$mydate[8]."<br>\n";
?>

The array returned by PHP can be indexed easily, so it is an easy task to retrieve the data we need. When we execute the script, the array will be displayed line by line:
tm_sec: 59 
tm_min: 46
tm_hour: 13
tm_mday: 13
tm_mon: 0
tm_year: 102
tm_wday: 0
tm_yday: 12
tm_isdst: 0

9. time
PHP's time function returns the current Unix timestamp:
<?php  
echo time();
?>

More than a billion seconds have passed since Unix starting time:
1205254851

10. strtotime
To convert a string to a timestamp, PHP provides a function called strtotime. Various input formats are accepted by the function, so almost any useful format can be converted to a timestamp. The next example shows a variety of input formats accepted by strtotime:
<?php         
# valid dates:
echo "March 11 2008: ".strtotime("March 11 2008")."<br>\n";
echo "March 11 02: ".strtotime("March 11 02")."<br>\n";
echo "2008/3/11: ".strtotime("2008/3/11")."<br>\n";
echo "2008-3-11: ".strtotime("2008-3-11")."<br>\n";
echo "2008/3/11 18:32:17: ".strtotime("2008/3/11 18:32:17")."<br>\n";
echo "2008-3-11 18:32:17: ".strtotime("2008-3-11 18:32:17")."<br>\n";
# abbreviation
echo "3 months 12 days 29 seconds: ". strtotime("3 months 12 days 29 seconds")."<br>\n";
# in valid dates:
echo "13.1.2008: ".strtotime("13.1.2008");
?>

All formats but the German format we can see in the last line are accepted by PHP. As we have already seen, Unix timestamps are based on seconds. With the help of these simple formats, Unix timestamps are portable and interacting with other software products is easy. When we execute the script, we will see how the result is displayed:
 March 11 2008: 1205168400
March 11 02: 1205168400
2008/3/11: 1205168400
2008-3-11: 1205168400
2008/3/11 18:32:17: 1205235137
2008-3-11 18:32:17: 1205235137
3 months 12 days 29 seconds: 1019742570
13.1.2008: -1


11. microtime


Retrieving the current timestamp in microseconds, we can use the microtime function as explained in the next listing:
<?php      
$data = microtime();
$comp = split(" ", $data);
echo "usec: $comp[0]<br>\n";
echo "sec: $comp[1]<br>\n";
?>

The result of microtime is one string consisting of two components. The first one contains the number of microseconds. The second component contains the seconds that have passed since Unix starting time. If we execute the script in the previous listing, the result could look like this:
usec: 0.53125500
sec: 1205255325
Read More..
Share

MySQL basic query

Connecting to the Database
Before we can connect to the database, we need four things:
❑ Database name
❑ Host Server name
❑ Username
❑ Password

Connect to the database using the following command (in PHP):

$connection = mysql_connect(“servername”, “username”, “password”);

We then need to select the appropriate database by using the following command (in PHP):

$database = mysql_select_db(“databasename”, $connection)
or die(“couldn’t find the database”);
?>

Accessing the Database
MySQL commands are inserted within our PHP code to access the database in this way:

$query = mysql_query(“UPDATE field1 FROM tablename WHERE condition1”)
or die(“Couldn’t find the table”);
$result = mysql_fetch_array($query);
?>

Retrieving Data from the Database
We can access the data stored in our tables with the following statement (we can use * to retrieve all fields):

SELECT field1, field2 FROM tablename

Condition Clauses
Use the following conditions in conjunction with this statement:

SELECT * FROM tablename WHERE

Conditions (use % for wildcard):
field = value
field > value
field < value
field >= value
field <= value
field != value (field is not equal to value)
field <> value (field is not equal to value)
field BETWEEN value1 AND value2
field NOT BETWEEN value1 AND value2
field LIKE value
field NOT LIKE value
field IS NULL
field IS NOT NULL
field IN (value1, value2, value3, etc)
field NOT IN (value1, value2, value3, etc)

Selecting from Multiple Tables
We can retrieve information from two or more tables at once by using the following statements:

SELECT table1.field, table2.field FROM table1, table2 WHERE
table1.field = table2.field;
or
SELECT table1field, table2field FROM table1 LEFT JOIN table2 ON
table1.table1field=table2.table2field;

Sorting the Results
We can sort the results of the SELECT query by using the following clause at the end of the statement (and the optional ascending or descending qualifier):

SELECT * FROM tablename WHERE field1=value1 ORDER BY field2 ASC|DESC

Limiting the Results
If we would like to limit the results returned from our query, we can modify our SELECT statement like this:

SELECT * FROM tablename WHERE field1=value1
ORDER BY field2 ASC
LIMIT offset, number_of_rows_to_be_returned
Read More..
Share

Fundamental MySQL

Command
Explanation
CREATE databasenameCreates the database.
CREATE tablename (field1, field2,
field3, and so on PRIMARY KEY(field))
Creates a new table.
ALTER TABLE tablename WHERE conditionModifies a table in the database..
RENAME TABLE oldtablename TO newtablenameRenames a table in the database.
INSERT INTO tablename (field1,
field2, . . .) VALUES (“value1”,
“value2” . . .)
Inserts information into the table.
UPDATE tablename SET field1=value1, field2=value2 . . . WHERE conditionChanges information already stored in
the table.
DELETE FROM tablename WHERE conditionDeletes a record from the specified
table.
DROP tablenameDeletes the table.
DROP databaseDeletes the database.
LOAD DATA INFILE “filename” INTO
TABLE tablename
Loads a large quantity of data into database.
  
Read More..
Share

List of MySQL Field Type

MySQL Field Type
Description
bigint(length) Numeric field that stores integers from
-9223372036854775808 to 9223372036854775807.
(Adding the unsigned parameter allows storage
of 0 to 18446744073709551615.) The parameter
length limits the number of characters to
be displayed. Please refer to the manual at
http://www.mysql.com before performing
mathematical calculations involving the bigint
type.
bit Equal to tinyint(1) field. A value of zero
represents false; a non-zero value represents
true.
blob Equal to a text field, except it is case-sensitive
when sorting and comparing. Stores up to 65535
characters.
bool Equal to tinyint(1) field. A value of zero
represents false; a non-zero value represents
true.
boolean Equal to tinyint(1) field. A value of zero
represents false; a non-zero value represents
true.
char(length) Any characters can be in this field, but the field will
have a fixed length. The length parameter can be
between 0 and 255. If the length parameter is not
defined, the default value is 1. Adding the BINARY
attribute will make comparisons and sorting results
case-sensitive.
date Stores a date as yyyy-mm-dd. Allows values from
1000-01-01 to 9999-12-31.
datetime Stores date and time as yyyy-mm-dd hh:mm:ss.
Allows values from 1000-01-01 00:00:00 to 9999-12-31
23:59:59.
dec(length,dec) Equal to decimal field.

decimal
(length,dec)

Numeric field that can store decimals. The length
parameter limits the number of digits that will be
displayed, and the dec parameter limits the number
of decimal places that can be stored. The length
parameter does not count decimal points and “-” for
negative values. A price field that would store prices
up to 999.99, for example, would be defined as
decimal(5,2). If the length parameter is not specified,
the default is 10. Adding the unsigned attribute
allows only non-negative values.
double
(length,dec)
Amedium-sized floating point number that stores
values from -1.7976931348623157E+308 to
-2.2250738585072014E-308, 0, and
2.2250738585072014E-308 to 1.7976931348623157E+308.
The length parameter determines how many digits
will be displayed; the dec parameter determines how
many decimal places are displayed. (Adding the
unsigned parameter allows only positive numbers
to be stored.) Using double without parameters
specified represents a double-precision floating point
number.
double precision
(length, dec)
Equal to double.
enum(“option1”, “option2”, ...) Allows only certain values to be stored in this field,
such as true and false, or a list of states. 65,535
different options can be allowed.
fixed(length,dec Equal to decimal field.
float(length,dec) A small floating point number that stores values
from -3.402823466E+38 to -1.175494351E-38, 0, and
1.175494351E-38 to 3.402823466E+38. The length
parameter determines how many digits will be
displayed; the dec parameter determines how many
decimal places are displayed. (Adding the unsigned
parameter allows only positive numbers to be stored.)
float(precision) Equal to float(length,dec) except the length
and dec parameters are undefined. To be used with a
true floating point number. (Adding the unsigned
parameter allows only positive numbers to be stored.)
The precision parameter can be from 0 to 24 for
single-precision floating point numbers, and from
25-35 for double-precision floating point numbers.
int(length) Numeric field that stores integers from -2147483648
to +2147483647, but can be limited with the length
parameter. length limits the number of digits that can
be shown, not the value. Mathematical functions can
be performed on data in this field. Signifying the
unsigned parameter permits positive integers (and
zero) up to 4294967295.
integer(length) Equal to int.
longblob Equal to longtext except it is case-sensitive when
sorting and comparing.
longtext Allows storage of up to 4294967295 character
mediumblob Equal to mediumtext field except it is case-sensitive
when sorting and comparing.
mediumint
(length)
Numeric field that stores integers from -8388608 to
8388607. (Adding the unsigned parameter allows
storage of 0 to 16777215.) length limits the number
of digits to be displayed.
mediumtext Allows storage of up to 16777215 characters.
numeric
(length,dec)
Equal to decimal field.
real(length,dec) Equal to double field.
set(“option1”, “option2”, ...) Similar to enum field, but with set there can be none
or more than one of the available options. Set allows
up to 64 options.
smallint(length) Numeric field that stores integers from -32768 to
32767. (Adding the unsigned parameter allows
storage of 0 to 65535.) The length parameter limits
the number of characters to be displayed.
text Any character can be in this field, and the maximum
size of the data is 64K (65535 characters).
time Stores time as hh:mm:ss.
timestamp Stores date and time as yyyy-mm-dd hh:mm:ss. Useful
for automatically capturing current date and time.
tinyblob Equal to tinytext field, except it is case-sensitive
when sorting and comparing.
tinyint(length) Numeric field that stores integers from -128 to 127.
(Adding the unsigned parameter allows storage of 0
to 255.) The length parameter limits the number of
characters to be shown.
tinytext Allows storage of up to 255 characters.
varchar(length) Any character can be in this field, and the data can
vary from 0 to 255 characters. Maximum length of
field is denoted with the length parameter. Adding
the BINARY attribute causes comparisons and sorting
results to be case-sensitive.
year(length) Stores a year in 4-character format (by default). In
this format, values from 1901 to 2155, and 0000 are
acceptable. It is possible to specify a 2-year format
by signifying so with the length parameter. In this
format, the values from 70 to 69 are acceptable
(1970-2069).
Read More..
Share

PHP Quick Reference

PHP Syntax

The basic PHP syntax is as follows:


<?php

// enter lines of code, make sure they end with a semicolon;

?>


Displaying to Browser

To display text in a browser, use the following syntax:


<?php

echo “Enter text here”; //echo text

echo $variable; //echo values

echo “<br>”; //echo HTML text

?>


Assigning a Value to a Variable

To set a value to a variable, use the following syntax:


<?php

$varname = value; //for numeric

$varname = “value”; //for text

?>


Passing Variables

We can pass variables among pages in our Web site in three ways: through a URL, through sessions,

and through a form.

Through a URL

To pass a variable through a URL, use the following HTML code:


<a href=”http://www.localhost.com/index.php?varname=value”>


Through Sessions

To pass a variable through a session, use the following PHP code:


<?php //this must be the first line of the script, before HTML code

session_start(); //starts the session

$_SESSION[‘varname’] = value; //sets values for the entire session

$_SESSION[‘varname2’] = value;

?>

<?php //this must be the first few lines of every

//page accessing session variables

session_start();

?>


Through a Form

A form must reference the PHP script that will parse the variables:


<?php

$value = $_POST[‘varname’]; //this is how we will access the

//values from the form

?>


if Statements

To use if statements, type the following syntax:


<?php
if (this is true) //execute this command
?>

or

<?php

if (this is true) {

//execute command 1;

//execute command 2;

//execute command 3;


}

?>


else Statements

To use else statements, type the following syntax:


<?php

if (this is true) //execute this command;

else //execute this command

?>

or

else {

//execute command 1;

//execute command 2;

//execute command 3;


}

?>


Nested if Statements

We can use nested if statements by using the following syntax:

<?php

if (this is true) { //remember to use == for equals

if (this is true) //execute this command;

if (this is true) //execute this command;

else //execute this command;

}

?>


Including a File

To include a file, use the following syntax:


<?php include “header.php”; ?>, or

<?php require “header.php”; ?>



Using Functions

We can create and call functions using the following syntax:


<?php

function funcname()
{ //defines the function

//line of php code;

//line of php code;

//line of php code;


}

funcname(); //calls the function to execute

?>


Arrays

We can set the values for an array in one of two ways:


<?php

$name = array(“firstname”=>”ridho”, “lastname”=>”fitra”, “age”=”124”);

echo $name[“firstname”];

?>

or

<?php

$name[“firstname”] = “ridho”;

$name[“lastname”] = “fitra”;

$name[“age”] = 21;

?>


If no keys are required, we can set the values for an array like this:


<?php

$flavor[] = “infocomnet”;

$flavor[] = “ictworld2u”;

$flavor[] = “eurokickoff”;

?>


for

We can execute a block of code a specified number of times with the following for statement:


<?php

for ($n = 0; $n <= 10; $n=$n+1) {

//these lines will execute while the value ‘n’ is

//less than or equal to 10


echo $n;

echo “<br>”;

}


foreach

We can apply the same block of code to each value in a specified array with the foreach statement:


foreach ($arrayvalue as $currentvalue) {

//these lines will execute as long as there is a value in $arrayvalue

echo $currentvalue;

echo “<br>\n”;

}

Read More..
Share

March 2, 2008

Latest PostgeSQL 8.3

Latest PostgreSQL

After success launch PostrgreSQL version 8.26, Now PostgreSQL 8.3 is released by The PostgreSQL Global Development Group. PostgreSQL is the world's most advanced open source database.
Download it now here

I use PostgreSQL in my Last Project about Academic Information System. I also use PhpPgadmin as tool to look and create database/table. PhpPgAdmin is web-based software like PhpMyAdmin on MySQL database
Read More..
Share

Privacy Policy

ICT World Privacy Statement

What follows is the Privacy Statement for all ICT World blogs including all the websites run under the ictworld2u.blogspot.com domain.

Please read this statement regarding our blogs. If you have questions please ask us via our contact form.

Email Addresses

You may choose to add your email address to our contact list via the forms on our websites. We agree that we will never share you email with any third party and that we will remove your email at your request. We don’t currently send advertising via email, but in the future our email may contain advertisements and we may send dedicated email messages from our advertisers without revealing your email addresses to them. If you have any problem removing your email address please contact us via our contact form.

Ownership of Information

ICT World is the sole owner of any information collected on our websites.

Comments/Message Boards

Most ICT World websites contain comment sections (a.k.a. message boards). We do not actively monitor these comments and the information on them is for entertainment purposes only. If we are alerted to something we deem inappropriate in any way, we may delete it at our discretion. We use email validation on most of our message boards in order to reduce “comment spam.” These email addresses will not be shared with any third party.

Cookies

Currently we assign cookies to our readers in order to save their preferences. This data is not shared with any third party. Accessing our websites is not dependent on accepting cookies and all major browsers allow you to disable cookies if you wish.

Third Party Cookies

Many of our advertisers use cookies in order to determine the number of times you have seen an advertisement. This is done to limit the number times you are shown the same advertisement. ICT World does not have access to this data.

Traffic Reports

Our industry-standard traffic reporting records IP addresses, Internet service provider information, referrer strings, browser types and the date and time pages are loaded. We use this information in the aggregate only to provide traffic statistics to advertisers and to figure out which features and editorials are most popular.

Legal proceedings

We will make every effort to preserve user privacy but ICT World may need to disclose information when required by law.

Business Transitions

If ICT World is acquired by or merges with another firm, the assets of our websites, including personal information, will likely be transferred to the new firm.

Links

ICT World websites frequently link to other websites. We are not responsible for the content or business practices of these websites. When you leave our websites we encourage you to read the destination site’s privacy policy. This privacy statement applies solely to information collected by ICT World

Notification of Changes

When ICT World makes changes to this privacy policy we will post those changes here.

Contact Information

If you have any questions regarding our privacy policy, please contact us.
Read More..
Share

Blogger template 'PlainFish' by Ourblogtemplates.com 2008