embed external
Permalink
Hello I would like to embed this url in my concrete5 site:
http://blups.nl/getijden.php
I dont get it working if i use iframe or use the responsive embed block.
The URL contains a piece of script what i want to show. Below is the part where it is all about: So if anyone can help me loading the url or using teh script in my site I woul dbe very thankfull.
PS. I am not a wizard :)
CODE
-------------------------------------------------------------------
<?php
$url = 'http://getij.rws.nl/export.cfm?format=txt&from='.date("d-m-Y").'&to='.date("d-m-Y",strtotime("+5 days")).'&uitvoer=2&interval=10&lunarphase=yes&location=IJMDBTHVN&Timezone=MET_DST&refPlane=NAP&graphRefPlane=NAP';
$lines = file($url);
$filter = false;
echo '<table class="tide-table">';
foreach($lines as $k=>$line){
// try to find table start...
if(stristr($line,'Datum')){
$filter = true;
// stop filter on empty line...
}elseif(!trim($line)){
$filter = false;
}
// filter is enabled, split the lines...
if($filter){
list($date, $moonfase) = str_split($line, 12);
$tide = substr($line, 24);
echo '<tr><td class="date">'.$date.'</td><td class="moonfase">'.$moonfase.'</td><td class="tide">'.$tide.'</td></tr>';
}
}
echo '</table>';
?>
http://blups.nl/getijden.php
I dont get it working if i use iframe or use the responsive embed block.
The URL contains a piece of script what i want to show. Below is the part where it is all about: So if anyone can help me loading the url or using teh script in my site I woul dbe very thankfull.
PS. I am not a wizard :)
CODE
-------------------------------------------------------------------
<?php
$url = 'http://getij.rws.nl/export.cfm?format=txt&from='.date("d-m-Y").'&to='.date("d-m-Y",strtotime("+5 days")).'&uitvoer=2&interval=10&lunarphase=yes&location=IJMDBTHVN&Timezone=MET_DST&refPlane=NAP&graphRefPlane=NAP';
$lines = file($url);
$filter = false;
echo '<table class="tide-table">';
foreach($lines as $k=>$line){
// try to find table start...
if(stristr($line,'Datum')){
$filter = true;
// stop filter on empty line...
}elseif(!trim($line)){
$filter = false;
}
// filter is enabled, split the lines...
if($filter){
list($date, $moonfase) = str_split($line, 12);
$tide = substr($line, 24);
echo '<tr><td class="date">'.$date.'</td><td class="moonfase">'.$moonfase.'</td><td class="tide">'.$tide.'</td></tr>';
}
}
echo '</table>';
?>
What happens when you use an iframe or embed? What is your site's URL?
Either way, this block should do it for you.
Unzip it
Put it into the application/blocks directory, so it's application/blocks/table_embed/controller.php
Go to Dashboard -> Stacks & Blocks -> Block Types
Install the Block type "Table Embed"
Add this block to whichever area you want to show this on.
Unzip it
Put it into the application/blocks directory, so it's application/blocks/table_embed/controller.php
Go to Dashboard -> Stacks & Blocks -> Block Types
Install the Block type "Table Embed"
Add this block to whichever area you want to show this on.
Thanks but when installing I get this error:
simplexml_load_file(): /sites/beachbastards.nl/www/application/blocks/table_embed/db.xml:15: parser error : Opening and ending tag mismatch: table line 6 and field
If you can help me it would be very nice :)
simplexml_load_file(): /sites/beachbastards.nl/www/application/blocks/table_embed/db.xml:15: parser error : Opening and ending tag mismatch: table line 6 and field
If you can help me it would be very nice :)
Sorry about that, had an extra end tag in there, try this one.
THank you very much! It is working. Thank you for your time!