Getting your latest twitter status using PHP

0Comments
<?php
 
function getTwitterStatus($userid){
$url = "http://twitter.com/statuses/user_timeline/$userid.xml?count=1";
 
$xml = simplexml_load_file($url) or die("could not connect");
 
       foreach($xml->status as $status){
       $text = $status->text;
       }
       echo $text;
 }
 
 
getTwitterStatus("insert.twitter.username.here");
 
/*Put your twitter ID above in the brackets*/
 
?>

247 Free Flag Icons

0Comments

Some cool flag icons from famfamfam.

CSS Arrows

6Comments

Up

font-size: 0px; line-height: 0%; width: 0px;
border-bottom: 20px solid #0094ff; 
border-left: 10px solid #fff;
border-right: 10px solid #fff;

Down

font-size: 0px; line-height: 0%; width: 0px;
border-top: 20px solid #0094ff;
border-left: 10px solid #fff;
border-right: 10px solid #fff;

Read more…

CSS Text Shadow

1Comments
.someElement {
   text-shadow: 1px 1px 3px #fff;
}

Contact Form with PHP

0Comments

HTML

<form action="" method="post">
  <label for="Name">Name:</label>
  <input type="text" name="Name" id="Name" />
 
  <label for="Email">Email:</label>
  <input type="text" name="Email" id="Email" />
 
  <label for="Message">Message:</label><br />
  <textarea name="Message" rows="20" cols="20" id="Message"></textarea>
 
  <input type="submit" name="submit" value="Submit" />
</form>

Read more…

Quicksand: Free Font

1Comments

A good font that you can use commercially which comes in useful.
http://www.fontsquirrel.com/fonts/Quicksand

jQuery Password Strength

0Comments

jQuery

$('#pass').keyup(function(e) {
     var strongRegex = new RegExp("^(?=.{8,})(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*\\W).*$", "g");
     var mediumRegex = new RegExp("^(?=.{7,})(((?=.*[A-Z])(?=.*[a-z]))|((?=.*[A-Z])(?=.*[0-9]))|((?=.*[a-z])(?=.*[0-9]))).*$", "g");
     var enoughRegex = new RegExp("(?=.{6,}).*", "g");
     if (false == enoughRegex.test($(this).val())) {
             $('#passstrength').html('More Characters');
     } else if (strongRegex.test($(this).val())) {
             $('#passstrength').className = 'ok';
             $('#passstrength').html('Strong!');
     } else if (mediumRegex.test($(this).val())) {
             $('#passstrength').className = 'alert';
             $('#passstrength').html('Medium!');
     } else {
             $('#passstrength').className = 'error';
             $('#passstrength').html('Weak!');
     }
     return true;
});

HTML

<input type="password" name="pass" id="pass" />
<span id="passstrength"></span>

Simple Javascript Alert

0Comments
<script type="text/javascript">
       alert('This is an alert using JS.')
</script>

Learning jQuery | #1 | Basics + Syntax

0Comments

jQuery is very powerful and useful, in my opinion, it’s the best Javascript framework ever. The possibilities with jQuery are endless, from animating divs, changing CSS, and building web apps. It’s part of the Web 2.0 revolution. There is a load of jQuery tutorials around, but this series is for beginners and novices, this specific part is focusing on the syntax of jQuery.

To include the library, remember to insert this between the head tags:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>

Read more…

Sponsors

  • Ads by Yoggrt