Results 1 to 3 of 3

Thread: blog is not coming through

  1. #1
    Join Date
    Apr 2010
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default blog is not coming through

    Hi all,

    I have created a site using some php to pull a blog on through and display it on my site. The site so you can see is hoopingrocks.com. Just click on 'see my blog here for the page in question, as it is currently live.

    When some kind ppl on another forum tried my code it worked, but Ive uploaded to a server and tried it but its blank where I want the blog to appear.

    Heres the source where I got the php code from http://www.finalwebsites.com/snippets.php?id=49 and please see the full code below. Could it be the server not letting the blog through? Thanks for your help :-)

    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>hoopingrocks.com</title>
    <style type="text/css">

    body{
    margin:0;
    padding:0;
    line-height: 1.5em;
    }

    b{font-size: 110%;}
    em{color: red;}


    #maincontainer{
    width: 980px; /*Width of main container*/
    margin: 0 auto; /*Center container on page*/
    color:#000000;
    }

    #topsection{
    background: #666666;
    height: 180px; /*Height of top section*/
    }

    #topsection h1{
        margin: 0;
        padding-top: 15px;
        color:#0000FF;
        padding-left: 15px;
    }

    #contentwrapper{
    float: left;
    width: 100%;
    background-color:#000000;
    }

    #contentcolumn{
        margin-left: 0px;
        color:#000000;
        text-align: center;
        font-family: Andale Mono, monospace;
        font-size:18px;    
        font-style:italic;
    }

    #leftcolumn{
    float: left;
    width: 0px; /*Width of left column*/
    margin-left: -980px; /*Set left margin to -(MainContainerWidth)*/
    background: #C8FC98;
    }



    #paralinks

    {color:#FFFFFF;}

    a:link {color: #FFFFFF;}      /* unvisited link */
    a:visited {color:#FFFFFF;}  /* visited link */
    a:hover {color: #FF00CC;}  /* mouse over link */
    a:active {color:#0000FF;}  /* selected link */

    a:link {text-decoration:underline;}
    a:visited {text-decoration:underline;}
    a:hover {text-decoration:underline;}
    a:active {text-decoration:underline:}

    a:link {font-size: 90%;}
    a:visited {font-size: 90%;}
    a:hover {font-size: 90%;}
    a:active {font-size: 90%;}


    #rssbox {font:"Courier New", Courier, monospace;}
    #rssbox ul {styles here}
    #rssbox ul li {styles here}
    #rssbox a:link {styles here}
    #rssbox a:visited {styles here}
    #rssbox a:hover {styles here}
    #rssbox a:active {styles here}


    #footer
    {font-family: Gill Sans, sans-serif; 
    clear: left;
    width: 100%;
    background: #666666;
    color: #FFF;
    text-align: center;
    padding: 4px 0;}

    a:link {color: #FFFFFF;}      /* unvisited link */
    a:visited {color:#FFFFFF;}  /* visited link */
    a:hover {color: #FF00CC;}  /* mouse over link */
    a:active {color:#0000FF;}  /* selected link */

    a:link {text-decoration:none;}        /* removes underline */
    a:visited {text-decoration:none;}
    a:hover {text-decoration:none;}
    a:active {text-decoration:none;}

    a:link {font-size: 90%;}
    a:visited {font-size: 90%;}
    a:hover {font-size: 90%;}
    a:active {font-size: 90%;}


    .innertube{
        margin: 10px; /*Margins for inner DIV inside each column (to provide padding)*/
        margin-top: 0;
        color:#FFFFFF;
        padding-top:10px;
        }


    </style>




    </head>
    <body>
    <div id="maincontainer">

    <div id="topsection"><div class="innertube">
      <table width="900" border="0">
        <tr>
          <td width="213" height="152"><img src="Untitled-5.png" alt="HR" width="180" height="150" /></td>
          <td width="677"><img src="BOAH.png" width="500" height="60" align="top" /></td>
        </tr>
      </table>
      <h1>&nbsp;</h1>
    </div></div>

    <div id="contentwrapper">
    <div id="contentcolumn">
    <div id="paralinks">
      <p>"I am currently travelling in Australia so no hoop classes until further notice.<br />
        My new website is now under construction. In the meantime please visit <a href="http://www.hooping.org/">hooping.org</a>, <a href="http://www.hoopcity.ca/">hoopcity.ca</a> and <a href="http://www.rainbow-hoops.com/">rainbow-hoops.com</a> Happy Hooping!"  </p>
      <table width="700" border="0" align="center">
        <tr>
          
          
          
          <?php 
    $cache_time 
    3600*24// 24 hours 

    $cache_file $_SERVER['DOCUMENT_ROOT'].'/cache/test.rss'
    $timedif = @(time() - filemtime($cache_file)); 

    if (
    file_exists($cache_file) && $timedif $cache_time) { 
        
    $string file_get_contents($cache_file); 
    } else { 
        
    $string file_get_contents('http://pipkorea.blogspot.com/feeds/posts/default'); 
        if (
    $f = @fopen($cache_file'w')) { 
            
    fwrite ($f$stringstrlen($string)); 
            
    fclose($f); 
        } 

    $xml simplexml_load_string($string); 

    // place the code below somewhere in your html 
    echo 
    <div id="rssbox"> 
        <ul>'

    $count 0
    $max 3
    // the next object is an example for a feed from wordpress 
    foreach ($xml->channel->item as $val) { 
        if (
    $count $max) {  
            echo 

            <li> 
                <strong>'
    .$val->title.'</strong><br /> 
                '
    .$val->description.' | <a href="'.$val->link.'">More  &gt;</a> 
            </li>'

        } 
        
    $count++; 

    echo 

        </ul> 
    </div>'

    ?>


          
          
          
        </tr>
      </table>
      </p>
    </div>
    </div>
    </div>

    <div id="footer"> <a href="http://www.aboutpaul.co.uk">Site currently being designed by aboutpaul.co.uk</a></div>
    </div>
    </body>
    </html>

  2. #2
    Join Date
    Mar 2010
    Posts
    28
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Smile

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>hoopingrocks.com</title>
    <style type="text/css">
    
    body{
    margin:0;
    padding:0;
    line-height: 1.5em;
    }
    
    b{font-size: 110%;}
    em{color: red;}
    
    
    #maincontainer{
    width: 980px; /*Width of main container*/
    margin: 0 auto; /*Center container on page*/
    color:#000000;
    }
    
    #topsection{
    background: #666666;
    height: 180px; /*Height of top section*/
    }
    
    #topsection h1{
        margin: 0;
        padding-top: 15px;
        color:#0000FF;
        padding-left: 15px;
    }
    
    #contentwrapper{
    float: left;
    width: 100%;
    background-color:#000000;
    }
    
    #contentcolumn{
        margin-left: 0px;
        color:#000000;
        text-align: center;
        font-family: Andale Mono, monospace;
        font-size:18px;    
        font-style:italic;
    }
    
    #leftcolumn{
    float: left;
    width: 0px; /*Width of left column*/
    margin-left: -980px; /*Set left margin to -(MainContainerWidth)*/
    background: #C8FC98;
    }
    
    
    
    #paralinks
    
    {color:#FFFFFF;}
    
    a:link {color: #FFFFFF;}      /* unvisited link */
    a:visited {color:#FFFFFF;}  /* visited link */
    a:hover {color: #FF00CC;}  /* mouse over link */
    a:active {color:#0000FF;}  /* selected link */
    
    a:link {text-decoration:underline;}
    a:visited {text-decoration:underline;}
    a:hover {text-decoration:underline;}
    a:active {text-decoration:underline:}
    
    a:link {font-size: 90%;}
    a:visited {font-size: 90%;}
    a:hover {font-size: 90%;}
    a:active {font-size: 90%;}
    
    
    #rssbox {font:"Courier New", Courier, monospace;}
    #rssbox ul {styles here}
    #rssbox ul li {styles here}
    #rssbox a:link {styles here}
    #rssbox a:visited {styles here}
    #rssbox a:hover {styles here}
    #rssbox a:active {styles here}
    
    
    #footer
    {font-family: Gill Sans, sans-serif; 
    clear: left;
    width: 100%;
    background: #666666;
    color: #FFF;
    text-align: center;
    padding: 4px 0;}
    
    a:link {color: #FFFFFF;}      /* unvisited link */
    a:visited {color:#FFFFFF;}  /* visited link */
    a:hover {color: #FF00CC;}  /* mouse over link */
    a:active {color:#0000FF;}  /* selected link */
    
    a:link {text-decoration:none;}        /* removes underline */
    a:visited {text-decoration:none;}
    a:hover {text-decoration:none;}
    a:active {text-decoration:none;}
    
    a:link {font-size: 90%;}
    a:visited {font-size: 90%;}
    a:hover {font-size: 90%;}
    a:active {font-size: 90%;}
    
    
    .innertube{
        margin: 10px; /*Margins for inner DIV inside each column (to provide padding)*/
        margin-top: 0;
        color:#FFFFFF;
        padding-top:10px;
        }
    
    
    </style>
    
    
    
    
    </head>
    <body>
    <div id="maincontainer">
    
    <div id="topsection"><div class="innertube">
      <table width="900" border="0">
        <tr>
          <td width="213" height="152"><img src="Untitled-5.png" alt="HR" width="180" height="150" /></td>
          <td width="677"><img src="BOAH.png" width="500" height="60" align="top" /></td>
        </tr>
      </table>
      <h1>&nbsp;</h1>
    </div></div>
    
    <div id="contentwrapper">
    <div id="contentcolumn">
    <div id="paralinks">
      <p>"I am currently travelling in Australia so no hoop classes until further notice.<br />
        My new website is now under construction. In the meantime please visit <a href="http://www.hooping.org/">hooping.org</a>, <a href="http://www.hoopcity.ca/">hoopcity.ca</a> and <a href="http://www.rainbow-hoops.com/">rainbow-hoops.com</a> Happy Hooping!"  </p>
      <table width="700" border="0" align="center">
        <tr>
          
          
          
    <?php 
    $cache_time = 3600*24; // 24 hours 
    
    $cache_file = $_SERVER['DOCUMENT_ROOT'].'/cache/test.rss'; 
    $timedif = @(time() - filemtime($cache_file)); 
    
    if (file_exists($cache_file) && $timedif < $cache_time) { 
        $string = file_get_contents($cache_file); 
    } else { 
        $string = file_get_contents('http://pipkorea.blogspot.com/feeds/posts/default'); 
        if ($f = @fopen($cache_file, 'w')) { 
            fwrite ($f, $string, strlen($string)); 
            fclose($f); 
        } 
    } 
    $xml = simplexml_load_string($string); 
    
    // place the code below somewhere in your html 
    echo ' 
    <div id="rssbox"> 
        <ul>'; 
    $count = 0; 
    $max = 3; 
    // the next object is an example for a feed from wordpress 
    
    
    
    foreach ($xml->entry as $val) { 
        if ($count < $max) {  
            echo ' 
            <li> 
                <h1>'.$val->title.'</h1><br> 
                '.$val->content.' <br>'; 
    
    	foreach($val->link as $l){
    	  print	'<a href="'.$l->attributes()->href.'">More  &gt;</a>'; 
    	}
    
    	
            print '</li>'; 
        } 
        $count++; 
    } 
    echo ' 
        </ul> 
    </div>'; 
    ?>
    
        </tr>
      </table>
      </p>
    </div>
    </div>
    </div>
    
    <div id="footer"> <a href="http://www.aboutpaul.co.uk">Site currently being designed by aboutpaul.co.uk</a></div>
    </div>
    </body>
    </html>
    Last edited by djr33; 04-29-2010 at 09:06 PM.

  3. #3
    Join Date
    Jul 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Your blog was helpful. Thank you for sharing those information with us. It give me an idea on what the next blog I will create.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •