Copy this code and paste it any where in your file.
Make sure jQuery included in your page.
Make sure jQuery included in your page.
<?php function fantastic3($n) { $series = array(0,1,1,1); for($i=3 ; $i<=$n ; $i++){ $a = (isset($series[ (int)$i-3 ]))?$series[ (int)$i-3 ]:0; $b = (isset($series[ (int)$i-2 ]))?$series[ (int)$i-2 ]:0; $c = (isset($series[ (int)$i-1 ]))?$series[ (int)$i-1 ]:0; $d = ($a+$b+$c)-1; if($d<0){ $d = 0; } $series[$i] = $d; } echo $series[ (int)$n-1 ]; } // Do NOT call the fantastic3 function in the code // you write. The system will call it automatically. ?>
<?php $xml = new SimpleXMLElement('<root/>'); $track = $xml->addChild('track'); $track->addChild('fieldName1','fieldValue'); $track->addChild('fieldName2','fieldValue'); $track->addChild('fieldName3','fieldValue'); $track->addChild('fieldName4','fieldValue'); Header('Content-type: text/xml'); print($xml->asXML()); ?>Enjoy Coding ..!!
2. Copy this Code in section
Note :- Set dive style according to your choice thanks.Google Translate
<?php $imageurl = filter_input(INPUT_GET, 'imageurl', FILTER_SANITIZE_URL); // Clean the image URL to get the path and make sure the user is just getting an image. $url_parsed = parse_url($imageurl); $file = $_SERVER['DOCUMENT_ROOT'] .'/base-directory'. $url_parsed['path']; print_r($file); // Get the extension of the file. $extension = substr(strrchr($file ,'.'), 1); // Limit the extensions in this array to those you're allowing the user to download. $allowed_extensions = array('jpg', 'jpeg', 'png', 'gif'); // Make sure the file requested is in your list of allowed extensions to make sure the user isn't downloading something other than an image. if (in_array(strtolower($extension), $allowed_extensions)) { if (file_exists($file)) { header ('Content-type: octet/stream'); header ('Content-disposition: attachment; filename=' . basename($file) . ';'); header('Content-Length: ' . filesize($file)); ob_clean(); readfile($file); } } ?>1. HTML Code Paste this code in your html file
DownloadEnjoy......
1
|
php script.php
|