Jump to content


Photo

Trying to create a block


  • Please log in to reply
9 replies to this topic

#1 armageddon05

armageddon05
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 26 October 2006 - 02:42 PM

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

http://www.tht1.com/...Calendar_Iframe

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

#2 Orio

Orio
  • Staff Alumni
  • Advanced Member
  • 2,491 posts

Posted 26 October 2006 - 02:45 PM

I cant understand what you want to do. What information you need to get, and from where?

Orio.
Think you're smarty?

(Gone until 20 to November)

#3 armageddon05

armageddon05
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 26 October 2006 - 02:49 PM

i am trying to get this information from here
http://www4.igl.net/...path=sphinxdoms
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
http://smokeyssigs.com/domsden.html  <<< look on left hand side of page
but in a block format.

#4 Orio

Orio
  • Staff Alumni
  • Advanced Member
  • 2,491 posts

Posted 26 October 2006 - 03:02 PM

Well that's a very ugly way to do it, but it will do it:

<?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);

?>

Now the variable $html holds the HTML you need.

Orio.
Think you're smarty?

(Gone until 20 to November)

#5 armageddon05

armageddon05
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 26 October 2006 - 03:18 PM

What do you meen when you say

Now the variable $html holds the HTML you need.


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

http://www.domsden.c...r/calander.html

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

#6 armageddon05

armageddon05
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 26 October 2006 - 04:02 PM

Can anyone help me with this please  ???

#7 armageddon05

armageddon05
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 28 October 2006 - 02:23 PM

still needing help anyone available ??


#8 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 28 October 2006 - 02:33 PM

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?
follow me on twitter @PHPsycho

#9 armageddon05

armageddon05
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 28 October 2006 - 03:03 PM

I want the block to show the calander from here

http://www4.igl.net/...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

<?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\">";
?>

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


hope that helps

#10 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 28 October 2006 - 03:18 PM

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...
follow me on twitter @PHPsycho




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users