naa man siguro baligya sa SM, bai....
There's only one way.Originally Posted by M@rv|n
1 get the data from mysql
2 compose an xml from the data
3 open a file
4 write the data formatted in xml (either format it yourself or use a library sax, dom, simplexml)
5 close the file
you can change the order of 1 and 3.
Is there any other way?
why using xml? php is already there you know.....
xml?
marvin was asking on the best way of creating xml with php. so i was telling him how to do that.Originally Posted by dodie
there are instances that you need xml. not all applications needs the html presentation but a formatted data or application protocol. xml is a good candidate of exchanging datas. good example is xml-rpc and soap.
also, the new html (xhtml) is an xml conformant. so if your website is xhtml then it is an xml that can be understood by new browser.
I think theres is one from a content Manager Script written in pearl... its name as ILINK.....Originally Posted by vern
from a database driven information that would auto generate static pages instead of dynamic driven... its more popular use now a days
http://hotscripts.com/search/4265677.html
heres one sample if you just observed flow of web site like hotscripts they are taking concept from a blog site...
a real static pages generated every search.. instead of dynamically driven /server generated page............
try PEAR?
also, i agree with vern about the php manual thingy. i always have an updated copy of it sa aku usb flash drive. after reading a good book, the manual comes in very handy... also, sa php.net, when u search for functions, there are user comments below which can be very useful...
imho, get a good book about xml + php + mysql
simple ra kau ni na file uploader. im using this code for my CMS for CCCJungolf.com
INSTERT THIS FORM TO YOUR HTML PAGE
<FORM ENCTYPE="multipart/form-data" ACTION="imgupload.php" METHOD="POST">
The file: <INPUT TYPE="file" NAME="userfile">
<INPUT TYPE="submit" VALUE="Upload">
</FORM>
CREATE A FILE CALLED "imgupload.php" and COPY/PASTE THE PHP CODES BELOW
<?php
$path = "img/players/"; //Make sure imong na set ang folder's attribute to 766
$max_size = 200000; //Filesize limit
if (!isset($HTTP_POST_FILES['userfile'])) exit;
if (is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])) {
if ($HTTP_POST_FILES['userfile']['size']>$max_size) { echo "The file is too big<br>\n"; exit; }
//Mao ni na part where you would like to specify your file to upload
if (($HTTP_POST_FILES['userfile']['type']=="image/gif") || ($HTTP_POST_FILES['userfile']['type']=="image/pjpeg") || ($HTTP_POST_FILES['userfile']['type']=="image/jpeg")) {
if (file_exists($path . $HTTP_POST_FILES['userfile']['name'])) { echo "The file already exists<br>\n"; exit; }
$res = copy($HTTP_POST_FILES['userfile']['tmp_name'], $path .
$HTTP_POST_FILES['userfile']['name']);
if (!$res) { echo "upload failed!<br>\n"; exit; } else { echo "upload sucessful<br>\n"; }
echo "File Name: ".$HTTP_POST_FILES['userfile']['name']."<br>\n";
echo "File Size: ".$HTTP_POST_FILES['userfile']['size']." bytes<br>\n";
echo "File Type: ".$HTTP_POST_FILES['userfile']['type']."<br>\n";
} else { echo "Wrong file type<br>\n"; exit; }
}
?>
Have anyone tried getting contents from another site
like meta i wanted to generate keywords from another site... mangawat lang ug keywords via codes heheheheh
PHP Spreadsheet_Excel_Writer
http://www.contentmanager.de/magazin..._mit_pear.html
german site. translate na lang using babelfish
Similar Threads |
|