• Page 1 of 1
  • 1
Forum moderator: bigblog  
uCoz Community » For Webmasters » Custom Solutions » about php script (some other need a help thread of mine xD)
about php script
irawanucoz
Posts: 15
Reputation: 0

Message # 1 | 5:34 PM
is that posible? if i'm free user. implement php script in other method?
i know this feature's lock n just paid service.
but is that posible if i do making other server host and upload that php script on there n then i do some of script for load that script
like blogspot do?

this is the php script

Code
<?php
$url = "http://data.bmkg.go.id/propinsi_15_1.xml"; // from http://data.bmkg.go.id/ sesuaikan dengan lokasi yang diinginkan
$sUrl = file_get_contents($url, False);
$xml = simplexml_load_string($sUrl);
for ($i=0; $i<sizeof($xml->Isi->Row); $i++) {
$row = $xml->Isi->Row[$i];
if(strtolower($row->Kota) == "Yogyakarta") {// Yogyakarta merupakan contoh kota yang diambil data cuacanya dari bmkg
echo "<b>" . strtoupper($row->Kota) . "</b><br/>";
echo "<img src='http://www.bmkg.go.id/ImagesStatus/" . $row->Cuaca . ".gif' alt='" . $row->Cuaca . "'><br/>";
echo "Cuaca : " . $row->Cuaca . "<br/>";
echo "Suhu : " . $row->SuhuMin . " - ".$row->SuhuMax . " °C<br/>";
echo "Kelembapan : " . $row->KelembapanMin . " - " . $row->KelembapanMax . " %<br/>";
echo "Kecepatan Angin : " . $row->KecepatanAngin . " (km/jam)<br/>";
echo "Arah Angin : " . $row->ArahAngin . "<br/>";
break;
}
}
?>

n then i'm upload that script with name weather.php on other free server host who support php
for example :
blablabla76.net/weather.php

n then i place this code on my ucoz template
Code
<object type="text/html" data="http://blablabla76.net/weather.php"></object>


is that work?
joexyz
JOE-vascript
Posts: 1770
Reputation: 78

Message # 2 | 8:12 AM
irawanucoz, it's not possible to use PHP on a uCoz page if the service is not enabled.
hey i'm joe and i do not work for the company anymore, please contact other staff or tech support
icon by ch-chau

sometimes i lurk here
irawanucoz
Posts: 15
Reputation: 0

Message # 3 | 11:16 AM
even i'm upload that script on other host n im just load it up on our web?
ok thx so much bigblog biggrin
joexyz
JOE-vascript
Posts: 1770
Reputation: 78

Message # 4 | 2:01 PM
irawanucoz, no, it's not possible in that way either.
hey i'm joe and i do not work for the company anymore, please contact other staff or tech support
icon by ch-chau

sometimes i lurk here
uCoz Community » For Webmasters » Custom Solutions » about php script (some other need a help thread of mine xD)
  • Page 1 of 1
  • 1
Search: