Posts Tagged ‘tryangled’

Changing an HTML Web Page Link Color

Monday, July 14th, 2008

You can change the color of an individual HTML web page link by adding a font tag in front of your linked text.

Example Code:

<A HREF=”http://www.blog.tryangled.com”><FONT COLOR=”#FF0000″>Your Link</FONT></A>

Creating an HTML Escape From Frame Link

Monday, July 14th, 2008

If your web site gets trapped within someone’s frames, you can create a link to help your visitor escape. Place the following code within your HTML where you would like the link to appear.

<A HREF=”http://www.blog.tryangled.com/” TARGET=”_top”>Escape From Frame</A>

You’re actually just creating a link to your own website with the TARGET set to “Top.”

At one time, there were many sites designed with frames. However, as more and more people have realized that frames are not a good choice for designing a web site, the number of sites designed in frames has dropped considerably. For this reason, the chance of your site being trapped within someone’s frames is slim. However, you may still want to include this link at the bottom of your site.

Creating an HTML Mouseover Text Description

Monday, July 14th, 2008

You can create an HTML mouseover text description, similar to an image alt tag or pop up text description, that will be viewed when your mouse is placed over the text link. Place “title=”your text description”" within your HTML link code.

<A HREF=”http://www.blog.tryangled.com/” TITLE=”Web Designing Company”>Your Text</A>

Creating an HTML Status Bar Link Description

Monday, July 14th, 2008

You can display your HTML link description in the status bar of your browser. When the mouse is placed over a link, the text link description will be viewed in the status bar.

<A HREF=”http://www.blog.tryangled.com” onmouseover=”window.status=’Your text description’; return true” onmouseout=”window.status=”;return true”>Your linked text</a>

Seo:Domain Names

Monday, June 30th, 2008

Choosing the correct domain name for a business is vital to its success on the Internet. If your business is called “Intoweb Design” and your core product is “web design”, the domain name “intoweb.co.za” could work. However a better domain name would be the core business product, “blog.tryangled.com”. The reason being search engines read keyword rich domains and rank the domain higher if it contains a main keyword.

HTML:Meta refresh redirect

Monday, June 30th, 2008

This will redirect to a http://blog.tryangled.com after 5 seconds.
<META http-equiv=”refresh” content=”5;URL=http://blog.tryangled.com” />

PHP:make curl HEAD request

Monday, June 30th, 2008

/**
* @return boolean false on error, content otherwise
* @param string $url
* @desc makes a HEAD request using cURL
* @author RAJI
* @link http://blog.tryangled.com/
*/
function http_head_curl($url) {
if (!extension_loaded(’curl_init’) || !function_exists(’curl_init’)) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_TIMEOUT, 30); // times out after 30s
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_NOBODY, 1);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
return false;
}

PHP:Validate URL using outgoing connection ( fopen )

Monday, June 30th, 2008

<?php
/**
* valid_url - validates supplied url/uri making a connection
*
* Note:
*
* 1) this method is more accurate than a validation made by a regular expression but it is much slower
* 2) administraters may restrict outgoing connections from your hosting to outside world and the function may raise a PHP Warning
*
* @param $url String
* @return true if the address is valid
*
*/
function valid_url( $url )
{
if ( @fopen( $url, ‘r’ ) )
{
return true;
} else
{
return false;
}
}
if ( valid_url( “http://blog.tryangled.com” ) )
{
echo “URL OK”;
} else
{
echo “Invalid URL.”;
}
?>

PHP:Validate URL (FTP, HTTP) using regular expression ( regex )

Monday, June 30th, 2008

<?php
/**
* valid_url - validates supplied url with a regular expression ( regex ).
*
* URL can be FTP, HTTP secure
* @param $url String
* @return true if the address is valid
* @author RAJI
*
*/
function valid_url( $url )
{
if ( !preg_match( ‘!^((ht|f)tps?://)?[a-zA-Z]{1}([w-]+.)+([w]{2,5})/?$!i’, $url ) )
{
return false;
} else
{
return true;
}
}
if ( valid_url( “http://blog.tryangled.com” ) )
{
echo “URL OK”;
} else
{
echo “Invalid URL.”;
}
?>