<?php
$word = new COM(“word.application”) or die (“couldnt create an instance of word”);
echo “loaded , word version{$word->version}”;
//bring word to the front
$word->visible = 1;
//open a word document
$word->Documents->Add();
//add some text to the document
$word->Selection->TypeText(“this is some sample text in the document”);
//save the document as sampleword.doc
$word->Documents[1]->SaveAs(“sampleword.doc”);
//close word
$word->Quit();
//free object resources
$word->Release();
$word = null;
?>
Bookmark It
Hide Sites
$$(‘div.d113′).each( function(e) { e.visualEffect(’slide_up’,{duration:0.5}) });
This example displays a stock chart from yahoo.com, it uses fopen to get the relevant page and then uses regular expressions to get the chart image from html tags on yahoo’s site.
Note that using this method, any change to the htm on yahoo’s site would affect the script
<?php
//this is the company you wish to lookup
$company [...]
Yahoo stock quote example
<?php
//stock quote script
//this is the url for Microsoft’s stock quote , we are opening it for reading
$fp = fopen (“http://finance.yahoo.com/d/quotes.csv?s=msft&f=sl1d1t1c1ohgv&e=.csv”,”r”);
//this uses the fgetcsv function to store the quote info in the array $data
$data = fgetcsv ($fp, 1000, “,”)
?>
<!– this is our table which displays the stock info –>
<!– we access the individual [...]
This is a simple random image script which is ideal for displaying basic images from a text file . In future examples we will expand on this and build some simple banner rotation systems.
The first step that you need to do is to create your file for storing your images and then insert the names [...]