Embedding movies into a webpage

What is embedded media?

Webpages contain embedded media when they have audio, movies or animations that plays or display on the webpage rather than in a separate application. Animation, audio, video, or other media that is displayed within a Web page is known as embedded media. Embedding media in webpages deliver an integrated multimedia experience that appears seamless to the visitor.

      Subscribe in a reader

Being part of a community of practise as a programmer

What is a Community of Practise?

A community of practice (CoP) is an most often and informal, gathering where the participants come together to learn and support each other. Professional institutes may contain CoPs - mostly in the form special interest groups (SIGs). There can also be software user groups.

Community of practise model
Purpose: Engage actors in communities that learn

      Subscribe in a reader

Parsing RSS with Perl

This is based on a script provided in the 'Add RSS feeds to your Web site with Perl XML::RSS' from
http://articles.techrepublic.com.com/5100-6228_11-5487340.html

In the original script, it was assumed that the rss news feed would be located on your server. To get
around this limitation, use LWP to get the contents of a remote file, save it to a file on your server
then parse the file.


#!/usr/bin/perl -w
#use strict;

use XML::RSS;
use LWP::Simple;
#use Data::Dumper;

my $r = new XML::RSS;

$r->parse( get 'http://onaje.com/rss.xml' );

      Subscribe in a reader

fetchcontenturl.phps

<?php

// submit query to search engine
$url_contents = "http://www.google.com/search?q=".urlencode($_POST['query']);

$query_file_content = file_get_contents($url_contents, "r") or die("cannot open url");

// save results to a local file
// depending on how your server is configured you may need to give queryfiles folder 777 permission
// could aslo use another file mode to create file i.e. w+
$file = fopen('queryfiles/'.$_POST['filename'], 'w+');

fwrite ($file, $query_file_content);

fclose($file);

      Subscribe in a reader

filecsv.phps

<?php
$fp
= fopen('csvfile.txt','r');
while(
$line = fgetcsv($fp,'1024',',')){
echo
"<pre>";
print_r($line);
echo
"</pre>";

/*
foreach($line as $value){
echo "$value<br>";
}
echo "<hr>";
*/
}
?>

      Subscribe in a reader

download.phps

<?php
// downloading a file use http://somewhere.com/download.php/?filename=name of file

$filename = $_GET['filename'];

if(!$filename){ echo "ERROR: No filename specified. Please try again."; }
else {

// fix for IE catching or PHP bug issue
header("Pragma: public");
header("Expires: 0"); // set expiration time
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
// browser must download file from server instead of cache

// force download dialog
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");

      Subscribe in a reader

quiz.phps


<?php
$let=array(
"a","b","c","d","e","f","g","h","i",
"j","k","l","m","n","o","p","q","r",
"s","t","u","v","w","x","y","z"
);

//Set a counter to 1
$count = 1;

$psco=100;

/* Deduction for each wrong answer. May be the perfect score divided by the number of questions
i.e. 100/10=10. If you "weight" wrong answers, it could be higher. */

$wrans=10;

/* Deduction for each un answered. Usually the perfect score divided by the number of questions. */

$noans=15;

      Subscribe in a reader

mguestbk.phps


<?php
mysql_connect
("localhost", "user", "password") OR die ("Connection Error to Server");
mysql_select_db("database") OR die("Connection Error to Database");
       
if (
$action=="submit")
mysql_query("INSERT INTO guests SET message='$message', guest='$guest', date=NOW()");

// Now select all the data, and print it one by one.

$result=mysql_query("SELECT * FROM guests");
while(
$row=mysql_fetch_array($result))
print
$row['writer']." : ".$row['message']." on ".$row['date']."<hr align=left width=100>";
?>

">
Name:

      Subscribe in a reader

mysqlresult.phps

List

<?php
include("database connection file here");

$result = mysql_query("SELECT ID, Name, Description FROM Categories where id=1");
$cid=mysql_result($result,0,"id");
$cname=mysql_result($result,0,"name");
$desc=mysql_result($result,0,"description");
echo "$cid $cname: $desc

      Subscribe in a reader
Syndicate content