langerhannes
Neuer User
- Mitglied seit
- 10 Mrz 2011
- Beiträge
- 26
- Punkte für Reaktionen
- 0
- Punkte
- 1
$xml = file_get_contents("http://yoursite.com/yourxml.xml"); // your file is in the string "$xml" now.
file_put_contents("/path/to/file/yourxml.xml", $xml); // now your xml file is saved.
public function doUpdate() {
// download google weather XML into local file for caching
$city = urlencode( $this->config['city'] );
//$curl = curl_init();
[COLOR="red"]$xml = file_get_contents("http://www.google.de/ig/api?weather=$paderborn&oe=UTF8");
// your file is in the string "$xml" now.
file_put_contents("cache/weather.xml", $xml);
// now your xml file is saved.[/COLOR]
$file = fopen("cache/weather.xml", "w");
if ($file)
{
curl_setopt($curl, CURLOPT_URL, utf8_encode("http://www.google.de/ig/api?weather=$city&oe=UTF8"));
curl_setopt($curl, CURLOPT_FILE, $file);
curl_exec($curl);
curl_close($curl);
fclose($file);
}
}
Ich verbringe schon den ganzen Tag vor meinen Rechner und google, und google
Nun werde ich noch das FeedPlugin entsprechend anpassen!
Hallo h-p-d,
such mal folgenden Code im Plugin: und spiel mal mit den Werten die nach $image kommen + $yoffset
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<!--tagparser="/pcotagfilt"-->
<head>
<meta content="text/html; charset=ISO-8859-15" http-equiv="content-type">
<title>pCOWeb Configuration</title>
</head>
<body>
<div style="color: black"> <%var(0,2,27)%>°C</div>
</body>
</html>
public function doUpdate() {
// download google weather XML into local file for caching
$city = urlencode( $this->config['city'] );
$xml = file_get_contents("http://www.google.de/ig/api?weather=$city&oe=UTF8");
file_put_contents('cache/weather.xml', $xml);
}
// update only the feed with the given feed number
private function updateFeed($feednumber) {
// download feeds XML into local files for caching
$feed_url = $this->config['feed_url_'.$feednumber];
if ($feed_url) {
$xml = file_get_contents($feed_url);
file_put_contents('cache/feed_'.$feednumber.'.xml', $xml);
}
}
[code<div style="color: black"> <%var(0,2,27)%>°C</div>
[/code]
<?PHP
if(preg_match("/<body.*?>(.*)<\/body>/s"
,file_get_contents('http://meine.url/http/example.html')
,$html))
echo $html[1];
?>
*:* !^(02319180|0038649425052|095151950|091113294712) !^9 /var/tmp/infoframe/refresh.sh "action=call&event=$EVENT&src_name=$(urlencode "$SOURCE_NAME")&src_address=$(urlencode "$SOURCE_ADDRESS")&src_numb=$SOURCE&dst_name=$(urlencode "$DEST_NAME")&dst_address=$(urlencode "$DEST_ADDRESS")&dst_numb=$DEST&duration=$DURATION"
*:* ^ ^9 /var/tmp/infoframe/refresh.sh "action=kalender&event=$EVENT&src_name=$(urlencode "$SOURCE_NAME")&src_address=$(urlencode "$SOURCE_ADDRESS")&src_numb=$SOURCE&dst_name=$(urlencode "$DEST_NAME")&dst_address=$(urlencode "$DEST_ADDRESS")&dst_numb=$DEST&duration=$DURATION""
if(($_GET['action'] == 'kalender'))
Nov 1 19:32:30 fritz daemon.debug callmonitor: <<< timestamp=01.11.11 19:32:30 event=CALL id=0 ext=0 source=XXXXXX dest=9# provider=SIP0
Nov 1 19:32:30 fritz daemon.debug callmonitor: >>> out:request ID=0 TIMESTAMP=01.11.11 19:32:30 SOURCE=XXXXXX DEST=9 EXT=0 DURATION= PROVIDER=SIP0
Nov 1 19:32:30 fritz daemon.info callmonitor: [98] event detected:
Nov 1 19:32:30 fritz daemon.info callmonitor: EVENT=out:request
Nov 1 19:32:30 fritz daemon.info callmonitor: SOURCE='XXXXXX'
Nov 1 19:32:30 fritz daemon.info callmonitor: DEST='9'
Nov 1 19:32:30 fritz daemon.debug callmonitor: [98+] detailed event data:
Nov 1 19:32:30 fritz daemon.debug callmonitor: SOURCE_DISP='XXXXXX'
Nov 1 19:32:30 fritz daemon.debug callmonitor: SOURCE_ENTRY='1und1'
Nov 1 19:32:30 fritz daemon.debug callmonitor: SOURCE_NAME='1und1'
Nov 1 19:32:30 fritz daemon.debug callmonitor: SOURCE_ADDRESS=''
Nov 1 19:32:30 fritz daemon.debug callmonitor: DEST_DISP='9'
Nov 1 19:32:30 fritz daemon.debug callmonitor: DEST_ENTRY='9; "Stadt"'
Nov 1 19:32:30 fritz daemon.debug callmonitor: DEST_NAME='9'
Nov 1 19:32:30 fritz daemon.debug callmonitor: DEST_ADDRESS='Stadt'
Nov 1 19:32:30 fritz daemon.debug callmonitor: ID=0
Nov 1 19:32:30 fritz daemon.debug callmonitor: EXT=0
Nov 1 19:32:30 fritz daemon.debug callmonitor: DURATION=
Nov 1 19:32:30 fritz daemon.debug callmonitor: TIMESTAMP='01.11.11 19:32:30'
Nov 1 19:32:30 fritz daemon.debug callmonitor: PROVIDER=SIP0
Nov 1 19:32:30 fritz daemon.debug callmonitor: [98:0] processing rule '*:*' '!^(02319180|0038649425052|095151950|091113294712)' '!^9' '/var/tmp/infoframe/refresh.sh "action=call&event=$EVENT&src_name=$(urlencode "$SOURCE_NAME")&src_address=$(urlencode "$SOURCE_ADDRESS"
Nov 1 19:32:30 fritz daemon.debug callmonitor: [98:0] event 'out:request' matches pattern '*:*'
Nov 1 19:32:30 fritz daemon.debug callmonitor: [98:1] processing rule '*:*' '^' '^9' '/var/tmp/infoframe/refresh.sh "action=kalender&event=$EVENT&src_name=$(urlencode "$SOURCE_NAME")&src_address=$(urlencode "$SOURCE_ADDRESS")&src_numb=$SOURCE&dst_name=$(urlencode "$DES
Nov 1 19:32:30 fritz daemon.debug callmonitor: [98:1] event 'out:request' matches pattern '*:*'
Nov 1 19:32:30 fritz daemon.debug callmonitor: [98:1] parameter SOURCE='XXXXXX' matches pattern '^'
Nov 1 19:32:30 fritz daemon.debug callmonitor: [98:1] parameter DEST='9' matches pattern '^9'
Nov 1 19:32:30 fritz daemon.debug callmonitor: [98:1] SUCCEEDED
Nov 1 19:32:30 fritz daemon.info callmonitor: [98:1] ACTION: '/var/tmp/infoframe/refresh.sh "action=kalender&event=$EVENT&src_name=$(urlencode "$SOURCE_NAME")&src_address=$(urlencode "$SOURCE_ADDRESS")&src_numb=$SOURCE&dst_name=$(urlencode "$DEST_NAME")&dst_address=$(
Nov 1 19:32:30 fritz daemon.debug callmonitor: [98:0] parameter SOURCE='XXXXXX' matches pattern '!^(02319180|0038649425052|095151950|091113294712)'
Nov 1 19:32:30 fritz daemon.debug callmonitor: [98:0] parameter DEST='9' does NOT match pattern '!^9'
Nov 1 19:32:30 fritz daemon.debug callmonitor: [98:0] FAILED
[Edit frank_m24: Vollzitat gelöscht, siehe Forumregeln.]