Jump to content

Archived

This topic is now archived and is closed to further replies.

armageddon05

Trying to create a block

Recommended Posts

Hi i am having problems creating a block that we desperatly need on our site, I need the block to be able to pick up info from another site and show it in a block on our site. I have managed to do this in html but when i try to do it in php as a block i am lost i can get it to work.

Here is how it looks in html

[url=http://www.tht1.com/modules.php?name=Calendar_Iframe]http://www.tht1.com/modules.php?name=Calendar_Iframe[/url]

Is there anyway of doing this with php so it is in ascrolling box if so is there anyone kind enough to wip up the code for the block for me. I have tried and failed drasticly.

Thank
Arma

Share this post


Link to post
Share on other sites
I cant understand what you want to do. What information you need to get, and from where?

Orio.

Share this post


Link to post
Share on other sites
i am trying to get this information from here
[url=http://www4.igl.net/cgi-bin/tourney/gencalendar.cgi?path=sphinxdoms]http://www4.igl.net/cgi-bin/tourney/gencalendar.cgi?path=sphinxdoms[/url]
and get it to show in a scrolling block but i dont want the info on the top of the page just the calander info so it looks similar to this
[url=http://smokeyssigs.com/domsden.html]http://smokeyssigs.com/domsden.html[/url]  <<< look on left hand side of page
but in a block format.

Share this post


Link to post
Share on other sites
Well that's a very ugly way to do it, but it will do it:

[code]<?php

$html=file_get_contents("http://www4.igl.net/cgi-bin/tourney/gencalendar.cgi?path=sphinxdoms");

$html=strstr(strstr($html,"<table border=1 cellpadding=0 cellspacing=1>"),"<table border=1 cellpadding=0 cellspacing=1>");

$html=str_replace(array("</body>","</html>"),"",$html);

?>[/code]

Now the variable $html holds the HTML you need.

Orio.

Share this post


Link to post
Share on other sites
What do you meen when you say

[quote]Now the variable $html holds the HTML you need.
[/quote]

I dont know what u meen, I have tried creating a block with that code and it says there isnt content for this block right now. When i first tried doing it i did create a html page with the calander on it here

[url=http://www.domsden.com/casescalander/calander.html]http://www.domsden.com/casescalander/calander.html[/url]

Because that pics up the info i need from the site. do i need to point it to that ?? im lost

Sorry i am really new to this php stuff lol

Share this post


Link to post
Share on other sites
I think you really need to explain this better. do you want the form to show in your site or do you want to show the results of that form wfter giving your users the options to input data?

Share this post


Link to post
Share on other sites
I want the block to show the calander from here

http://www4.igl.net/cgi-bin/tourney/gencalendar.cgi?path=sphinxdoms

but i dont want it to show the full page just the callander, I know it can be done in html but it doesnt like it when i transfer the html script to php.

i have managed to get something working but when i activate the block it wont show my main page.

www.domsden.com <<< if you scroll right to the bottom u will see shat im trying to achive but like i say it hase now stopped my homepge from working.

The code i am currently using is

[code]<?php
#### Generated by Block Creator by Disipal Site (www.disipal.net) ###
if (eregi("block-Block_casescal.php",$PHP_SELF)) {
    Header("Location: index.php");
    die();
}
$content  =  "<iframe name=\"calander\" src=\"http://www4.igl.net/cgi-bin/tourney/gencalendar.cgi?path=sphinxdoms\" width=\"150\" height=\"500\" frameborder=\"0\">";
?>[/code]

but i dont want it showing the garbage above the calander just the calander


hope that helps

Share this post


Link to post
Share on other sites
Well all I can say is that Orio is much closer at getting the result you want - if this is really beyond you perhaps go into the freelancing forum and see if someone will do it for you.

What you are trying to do will show the whole of that page in your iframe...

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.