RSS
 

Archive for December, 2007

Microsoft New Translater

14 Dec

Microsoft launched the new service Windows Live Translator own interpretation of the sites and texts is a pilot in the framework of strengthening services for the Eve of the company on its web site and under competition with Google launched a similar service is the other.

The new service supports translation for several languages, including Arabic to English and vice versa, but they are still in the process of experimentation has shown a lot of mistakes in the translation of Arabic texts to any second language as overwhelmed by the literal translation, which distort the text and graduation from its proper addition to the slow process of translation compared Google service.

The new service run by the French Systran months in the area of translation and globally, which also runs similar service offered by AltaVista Babelfish since the nineties.

The experience of service at the following address:

Http://translator.live.com/

 
 

WaysToCash New Enhancement

12 Dec

Dear Friends ….
A new Enhancement have beed added to WaysToCash.net

- A new Selling Process .. User Friendly
- Add More Than one picture for your item
- A new Categories and Sub Categories have been added .
- more Uniqeness features
- low Fees for Featured Items

- Get More Points
- 2 points when you bring a new user to WaysToCash.net
- 2 Points when you list an item in the store
- 6 Poinst when you buy an item from the store
- 4 Points when you sell an item

100 Points = 3.00$ directly to your Account .

Comming Soon .
- WaysToCash.net Business Directory
- WaysToCash.net Plug-ins

If you have any Question Please Contact Us at support@waystocash.com or

Visit www.waystocash.net/contact

Log in to your account at http://www.waystocash.net/ to see the new Enhancement

WaysToCash Team

 

WaysToCash Will Launch a new System

07 Dec

WaysToCash is planning to build a new system , which will help WaysToCash.net Verifiying the clients . this new system will increase the trustworthy of WaysToCash Sellers and Buyers.

with a small fee you will be Verified in WaysToCash and in all of WaysToCash sisters Websites.

if you have any question about the new system , oryou want to be part of it please contact WaysToCash Customer care at support@waystocash.com

have a nice day

 

HTML full Tutorial

07 Dec

Download a free HTML tutorial and start deigning your web pages , and build your website as simple as

Download Now [PDF file]
 
No Comments

Posted in Free

 

PHP lesson Seven

07 Dec

Using Functions

Real world applications are usually much larger than the examples above.
In has been proven that the best way to develop and maintain a large program
is to construct it from smaller pieces (functions) each of which is more
manageable
than the original program.

A function may be defined using syntax such as the following:

<?php

function addition($val1, $val2)

{

$sum = $val1 + $val2;

return $sum;

}

?>

Using Default Parameters

When calling a function you usually provide the same number of argument
as in the declaration. Like in the function above you usually call it like
this :

$result = addition(5, 10);

But you can actually call a function without providing all the arguments
by using default parameters.

<?php

function repeat($text, $num = 10)

{

echo “<ol>\r\n”;

for($i = 0; $i < $num; $i++)

{

echo “<li>$text </li>\r\n”;

}

echo “</ol>”;

}

// calling repeat with two arguments

repeat(“I’m the best”, 15);

// calling repeat with just one argument

repeat(“You’re the man”);

?>

Function repeat() have two arguments
$text
and $num. The $num
argument has a default value of 10. The first call to repeat()
will print the text 15 times because the value of $num
will be 15. But in the second call to repeat()
the second parameter is omitted so repeat() will
use the default $num value of 10 and so the text
is printed ten times.

Returning Values

Applications are usually a sequence of functions. The result from one function
is then passed to another function for processing and so on. Returning a value
from a function is done by using the return statement.

You can return any type from a function. An integer, double, array, object,
resource, etc.

Notice that in buildRows() I use the built
in function implode(). It joins all elements
of $array with the string ‘</td></tr><tr><td>
between each element. I also use the ‘.‘ (dot)
operator to concat the strings.

 
 

WaysToCash enhanced the Selling Process

07 Dec

Hey Guys …

the latest news About WaysToCash.net

  • They enhanced the Selling Process and adding a new features to your listings
  • minimizing the featured item fees
  • WaysToCash plan to open a directory for Businesses Around the net with a small fee.

WaysToCash.net

WaysToCash Still Looking for partners .. ReadThis

 

Free Hosting Provider Lists

07 Dec

If you are looking for a free hosting provider , check this out

SiteBurg.com – Free PHP MySQL Web Hosting
SiteBurg.com provides 100 mb of free web space, 10Gb of monthly bandwidth with free subdomain of .siteburg.com, support CGI, Perl, SSI, PHP4 and MySQL database, access to server logs, FTP and SSH support, visitors stats, and Online Control Panel where you can create guestbooks, upload files, etc.

FBhosting.com – Free PHP Web Hosting
FBhosting.com offers 50 MB of web storage space, 1000 MB of monthly data transfer, PHP hosting, FTP access, web-based control panel with online file manager. They offer both free sub-domain and domain hosting for free.

100webspace.com Large Free PHP Hosting
100webspace.com offers large free PHP web hosting plan that includes 100 mb of data storage, 3 gb of monthly bandwidth, free subdomain or domain hosting, 1 MySQL database (5 mb storage), they support CGI, SSI, Perl, POP# email and many other useful features.

Byethost.com Free PHP MySQL Hosting plans
ByetHost.com offers 250 MB of web space, 6 GB of monthly traffic, 3 MySQL databases, 5 sub domains, FTP access, Vista Panel hosting control panel with automatic script installer. Instant account activation.

 
 

The Dead Sea …

07 Dec

Deep in the Jordan Valley and 55 km southeast of Amman, is the Dead Sea, one of the most spectacular natural and spiritual landscapes in the whole world. It is the lowest body of water on earth, the lowest point on earth, and the world’s richest source of natural salts, hiding wonderful treasures that accumulated throughout thousands of years.

To reach this unique spot, the visitor enjoys a short 30 minutes drive from Amman, surrounded by a landscape and arid hills, which could be from another planet. En route a stone marker indicates “Sea Level”, but the Dead Sea itself is not reached before descending another 400 meters below this sign .

The sunset touching distant hills with ribbons of fire across the waters of the Dead Sea brings a sense of unreality to culminate a day’s visit to this region. It is normally as calm as a millpond, with barely a ripple disturbing its surface, but it can become turbulent. During most days, however, the water shimmers under a beating sun. Where rocks meet its lapping edges, they become snow-like, covered with a thick, gleaming white deposit that gives the area a strange and surreal sense.

As its name evokes, the Dead Sea is devoid of life due to an extremely high content of salts and minerals which gives its waters the renowned curative powers, therapeutic qualities, and its buoyancy, recognized since the days of Herod the Great, more than 2000 years ago.

And because the salt content is four times that of most world’s oceans, you can float in the Dead Sea without even trying, which makes swimming here a truly unique experience not to be missed: here is the only place in the world where you can recline on the water to read a newspaper.

Scientifically speaking, its water contains more than 35 different types of minerals that are essential for the health and care of the body skin including Magnesium, Calcium, Potassium, Bromine, Sulfur, and Iodine. They are well known for relieving pains and sufferings caused by arthritis, rheumatism, psoriasis, eczema, headache and foot-ache, while nourishing and softening the skin. They also provide the raw materials for the renowned Jordanian Dead Sea bath salts and cosmetic products marketed worldwide.

A unique combination of several factors makes Dead Sea’s total attraction: the chemical composition of its water, the filtered sunrays and oxygen-rich air, the mineral-rich black mud along the shoreline, and the adjacent fresh water and thermal mineral springs.

Although sparsely populated and serenely quiet now, the area has a historical and spiritual legacy of its own. It is believed to be the site of five biblical cities: Sodom, Gomorrah, Admah, Zebouin and Zoar.

A series of new roads, hotels and archaeological discoveries are converging to make this region as enticing to international visitors today as it was to kings, emperors, traders and prophets in antiquity.

Seaside facilities include modern hotels with therapeutic clinics and restaurant/bathing/sports complexes, meeting the needs of day visitors or parties wishing to spend the night amidst one of the most dramatic and moving landscapes in the World.

 
 

PHP lesson six

07 Dec

Control Structure

The next examples will show you how to use control structures in PHP. I won’t go through all just the ones that i will use in the code examples in this site. The control structures are

if
else
while
for

If Else
The if statement evaluates the truth value of it’s argument. If the argument evaluate as TRUE the code following the if statement will be executed. And if the argument evaluate as FALSE and there is an else statement then the code following the else statement will be executed.

Example : visitor- info.php
Source code : visitor-info.phps

The strpos() function returns the numeric position of the first occurrence of it’s second argument (‘Opera’) in the first argument ($agent). If the string ‘Opera’ is found inside $agent, the function returns the position of the string. Otherwise, it returns FALSE.

When you’re using Internet Explorer 6.0 on Windows XP the value of $_SERVER['HTTP_USER_AGENT'] would be something like:

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

and if you’re using Opera the value the value may look like this :

Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.0 [en]

So if i you use Opera the strpos() function will return value would be 61. Since 61 !== false then the first if statement will be evaluated as true and the value of $agent will be set to the string ‘Opera’.

Note that I use the !== to specify inequality instead of != The reason for this is because if the string is found in position 0 then the zero will be treated as FALSE, which is not the behaviour that I want.

While Loop
The while() statement is used to execute a piece of code repeatedly as long as the while expresssion evaluates as true. For example the code below will print the number one to nine.

Example : while.php
Source code : while.phps

‘;
$number += 1;
}
?>

You see that I make the code $number += 1; as bold. I did it simply to remind that even an experienced programmer can sometime forget that a loop will happily continue to run forever as long as the loop expression ( in this case $number < 10 ) evaluates as true. So when you're creating a loop please make sure you already put the code to make sure the loop will end in timely manner. Break The break statement is used to stop the execution of a loop. As an example the while loop below will stop when $number equals to 6. Example : break.php Source code : break.phps ';

if ($number == 6)
{
break;
}

$number += 1;
}
?>

You can stop the loop using the break statement. The break statement however will only stop the loop where it is declared. So if you have a cascading while loop and you put a break statement in the inner loop then only the inner loop execution that will be stopped.

Example : break2.php
Source code : break2.phps

“;

if ($room == 2)
{
break;
}

$room += 1;
}
$floor += 1;

echo “
“;
}
?>

If you run the example you will see that the outer loop, while ($floor <= 5), is executed five times and the inner loop only executed two times for each execution of the outer loop. This proof that the break statement only stop the execution of the inner loop where it's declared. For The for loop syntax in PHP is similar to C. For example to print 1 to 10 the for loop is like this }
?>

A more interesting function is to print this number in a table with alternating colors. Here is the code

Example : alternate-colors.php
Source : alternate-colors.phps



Alternating row colors

This code display different row colors depending on the value of $i. If $i is not divisible by two it prints yellow otherwise it prints gray colored rows.

 
 

PHP lesson five

07 Dec

Creating a string

To declare a string in PHP you can use double quotes ( ” ) or single
quotes ( ‘ ). There are some differences you need to know about using these
two.

If you’re using double-quoted strings variables will be expanded ( processed
). Special characters such as line feed ( \n ) and carriage return ( \r )
are expanded too. However, with single-quoted strings none of those thing
happen. Take a look at the example below to see what I mean.

Note that browsers don’t print newline characters ( \r and \n ) so when

a look at the source and you will see the effect of these newline characters.

<?php

$fruit = ‘jamblang’;

echo “My favourite fruit is $fruit <br>”;

echo ‘I lied, actually I hate $fruit <br>’;

echo “\r\n My first line \r\n and my second line <br>\r\n”;

echo ‘ Though I use \r\n this string is still on one line <br>’;

?>

String Concatenation

To concat two strings you need the dot ( . ) operator so in case you have
a long string and for the sake of readability you have to cut it into two
you can do it just like the example below.

Actually if you need to write a loong string and you want to write it to
multiple lines you don’t need concat the strings. You can do it just like
the second example below where $quote2 is split
into three lines.

<?php

$quote1 = “Never insult Dumbledore ” .

“in front
of me!”;

$quote2 = “Nami,

you are

my nakama!”;

echo $quote1 . “<br>”;

echo $quote2;

?>

String Functions

substr($string, $start, $end) : get a chunk
of $string

<?php

// print ‘12′

echo substr(‘123456789′, 0, 2);

// print ‘56789′

echo substr(‘123456789′, 4);

// print ‘89′

echo substr(‘123456789′, -2);

// print ‘456′

echo substr(‘123456789′, 3, -4);

?>

str_repeat($string, $n) : repeat $string $n
times

For example if you want to print a series of ten asteriks ( * ) you can
do it with a for loop like this :

<?php

for ($i = 0; $i < 10; $i++) {

echo ‘*’;

}

?>

Or you can go the easy way and do it like this :

<?php

echo str_repeat(‘*’, 10);

?>

strrchr($string, $char) : find the last occurence
of the character $char in $string

For example: you want to get the file extension from a file name. You can
use this function in conjunction with substr()

<?php

$ext = substr(strrchr($filename, ‘.’), 1);

?>

What the above code do is get a chunk of $filename
starting from the last dot in $filename
then get the substring of it starting from the second character ( index 1
).

To make things clearer suppose $filename is
‘tutorial.php’. Using strrchr(‘tutorial.php’,
‘.’)
yield ‘.php’ and after substr(‘.php’,
1)
we get the file extension; ‘php’

trim($string) : remove extra spaces at the
beginning and end of $string

<?php

// print ‘abc def’

echo trim(‘ abc def ‘);

?>

addslashes($string) : adding backslashes before
characters that need to be quoted in $string

This function is usually used on form values before being used for database
queries. You will see this function used a lot in this tutorial so there’s no need to present an example here.

explode($separator, $string) : Split $string
by $separator

This function is commonly used to extract values in a string which are separated
by a a certain separator string. For example, suppose we have some information
stored as comma separated values. To extract each values we ca do it like
shown below

<?php

// extract information from comma separated values

$csv = ‘Uzumaki Naruto,15,Konoha Village’;

$info = explode(‘,’, $csv);

?>

Now, $info is an array with three values :

Array

(

[0] => Uzumaki Naruto

[1] => 15

[2] => Konoha Village

)

We can further process this array like displaying them in a table, etc.

implode($string, $array) : Join the values
of $array using $string

This one do the opposite than the previous function. For example to reverse
back the $info array into a string we can do
it like this :

<?php

$info = array(‘Uzumaki Naruto’, 15, ‘Konoha Village’);

$csv = implode(‘,’, $info);

?>

Another example : Pretend we have an array containing some values and we
want to print them in an ordered list. We can use the implode()
like this :

<?php

// print ordered list of names in array

$names = array(‘Uchiha Sasuke’, ‘Haruno Sakura’, ‘Uzumaki Naruto’, ‘Kakashi’);

echo ‘<ol><li>’ . implode(‘</li><li>’, $names)
. ‘</li></ol>’;

?>