<?
if ($_POST['submit']){
$ans=0;
echo ("Your answers: ");
echo ("There are ".$_POST['choice1']." days in a week.");
echo ("".$_POST['choice2']." is the first day of the week.");
if($_POST['choice1']=="7"){
$ans=$ans+1;
echo ("Your answer is correct! There are ".$_POST['choice1']." days in a week.");
}else{
echo ("Your answer is incorrect! There are not ".$_POST['choice1']." days in a week.
<?php
if ($_POST['submit']){
$countsub=count($_POST['lista']);
for ($i=0; $i < $countsub; $i++){
echo "<br>".$_POST['lista'][$i];
}
}
else{
?>" method=post>
Qué usted cree es el más importante de vida?
What do you believe is most important in life?
Comida [food]
Agua [water]
Abrigo [shelter]
<?php
if($_POST['submit'] && $_POST['myage'] && $_POST['difference']){
$total= $_POST['myage'] + $_POST['difference'];
echo "My brother/sister is ".$total." years old.";
}else{
?>" >
How old are you?
How many years older is your brother/sister?
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.
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
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' );
<?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);
<?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>";
*/
}
?><?php
// regular expression <\s*a\s+[^>]*href\s*=\s*[\"']?([^\"' >]+)[\"' >]
$href_regex ="<"; // 1 start of the tag
$href_regex .="\s*"; // 2 zero or more whitespace
$href_regex .="a"; // 3 the a of the tag itself
$href_regex .="\s+"; // 4 one or more whitespace
$href_regex .="[^>]*"; // 5 zero or more of any character that is _not_ the end of the tag
$href_regex .="href"; // 6 the href bit of the tag
$href_regex .="\s*"; // 7 zero or more whitespace
$href_regex .="="; // 8 the = of the tag
<?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");