Yahoo Hosting Problems with PHP

Hi there. If anyone is willing to point me in the right direction on this…it would be amazing.

Here’s the deal…I’ve got a flash site I built, and I included a contact form, and an RSS reader. They both pull from two different php files.

They worked fine on two different testing servers…but when I transferred to Yahoo hosting…they no longer work. My assumption is because there are particular functions in the PHP file that Yahoo does not allow.

Here is the PHP for the RSS Reader:

<?php
//php 4 version
$headingColor = “ffffff”;// This colour is used for the item headings, preloader colour and feed icon colour.
$hoverColor = “ffffff”; // This is the colour when you hover on links
$defaultColor = “ffffff”; // This is the colour for other text
$dateColor = “ffffff”; // This is the colour for the date
// Return the colours to the swf
echo “&headingColor=”.$headingColor;
echo “&hoverColor=”.$hoverColor;
echo “&defaultColor=”.$defaultColor;
echo “&dateColor=”.$dateColor;
// Link to RSS feed. Change this to the full location of your feed.
$feedUrl = “xxxxx.wordpress.com/?feed=rss”;
// Return the url of the feed to the swf
echo “&feedUrl=”.$feedUrl;
// Date Format
$dateFormat = ‘jS F y’;
// This loads the entire XML feed
$rssstring = file_get_contents($feedUrl);
// Return the title of the feed
preg_match_all("#<title>(.?)</title>#s",$rssstring,$mainTitle);
//$mainTitle = “Your Title Here”; // Use this line instead of the line above if you want to set a different title than the RSS title
echo “&mainTitle=”.$mainTitle[1][0];
// Parse each item in the RSS feed
preg_match_all("#<item>(.
?)</item>#s",$rssstring,$items);
$n=count($items[0]);
// Return the total number of items
echo “&totalItems=”.$n;
for($i=0;$i<$n;$i++)
{
$rsstemp= $items[0][$i];
preg_match_all("#<title>(.?)</title>#s",$rsstemp,$titles);
$title= $titles[1][0];
preg_match_all("#<link>(.
?)</link>#s",$rsstemp,$links);
$link= $links[1][0];
preg_match_all("#<description>(.*?)</description>#s",$rsstemp,$descriptions);
$description= $descriptions[1][0];
$description = str_replace("<![CDATA[", “”, $description);
$description = str_replace("]]>", “”, $description);
// Strip html tags. Use the line below if you want to strip the html tags (including images) from your description.
//$description = strip_tags($description);

preg_match_all("#<pubDate>(.*?)</pubDate>#s",$rsstemp,$pubDates);
$pubDate= $pubDates[1][0];

// Replace special symbols &
$title = str_replace("&", “%26”, $title);
$link = str_replace("&", “%26”, $link);
$description = str_replace("&", “%26”, $description);
// Format the time
$pubDate = strtotime($pubDate);
$pubDate = date($dateFormat, $pubDate);

// Return the content
$p = $i+1;
echo “&title$p=”.$title;
echo “&description$p=”.$description;
echo “&link$p=”.$link;
echo “&pubDate$p=”.$pubDate;
}
?>

I’m fairly certain that the issue is the get_file_contents function. Perhaps there is a way to rewrite this code to make it work on Yahoo hosting.

Here is the php for the contact form:

<?
$contact_name = $_POST[‘name’];
$contact_email = $_POST[‘email’];
$contact_subject = $_POST[‘subject’];
$contact_message = $_POST[‘message’];
if( $contact_name == true )
{
$sender = $contact_email;
$receiver = “name@domain.com”;
$client_ip = $_SERVER[‘REMOTE_ADDR’];
$email_body = “Name: $contact_name
Email: $sender
Subject: $contact_subject
Message: $contact_message
IP: $client_ip”;
$extra = "From: $sender
" . "Reply-To: $sender
" . “X-Mailer: PHP/” . phpversion();
if( mail( $receiver, “Flash Contact Form - $subject”, $email_body, $extra ) )
{
echo “success=yes”;
}
else
{
echo “success=no”;
}
}
?>

If anyone at all can help me…or at least give me a hint on how to make this work it would be awesome…otherwise I’ll have to find a whole new contact form and rss reader…and there is no guarantee that those will work either.