PDA

View Full Version : Problems setting up myspace site fopen & php


Ad disengaged
January 23rd, 2007, 10:02 PM
I am setting up a MSRS and I uploaded the files

So far most of it works but when I open up this page

http://www.radpimps.com/graphics/backgrounds/

I get the message: Unable to open http://www.radpimps.com/graphics/backgrounds/1

And the source code for the page is :

<?
include("http://www.radpimps.com/_header.php");
$title = "Backgrounds > Page 1";
include ('http://www.radpimps.com/title.php');
?>
<?

$path = "http://www.radpimps.com/graphics/backgrounds/1";

//using the opendir function
$dir_handle = @opendir($path) or die("Unable to open $path");

echo "<table width=\"100%\" align=\"center\">
<tr>
<td style=\"padding-right: 10px;\"><div class=\"text\"><div align=\"center\">Simply copy and paste the codes into
the 'about me' section of your profile!<br></div>
<br>";

//running the while loop
while ($file = readdir($dir_handle))
{
if($file!="." && $file!="..")
echo " <table border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td style=\"padding-right: 10px;\" class=\"too\"><img src=\"http://www.radpimps.com/graphics/backgrounds/1/$file\" width=\"100\" height=\"100\" border=\"1\"></td>
<td class=\"too\"><div style=\"padding-bottom: 5px;\"></div>
<textarea name=\&quot;textarea2\&quot; cols=33 rows=5 class=\"bginput\" onClick=\"this.focus();this.select()\">&lt;style type=&quot;text/css&quot;&gt;
body {
background-image: url(http://www.radpimps.com/graphics/backgrounds/1/$file);
}
&lt;/style&gt;
&lt;a href=&quot;http://www.radpimps.com/&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://www.radpimps.com/support.gif&quot; alt=&quot;Myspace Layouts&quot; style=&quot;position:absolute; left:0px; top: 0px;&quot; border=&quot;0&quot;&gt;&lt;/a&gt; </textarea></td>
</tr>
</table><br /><br>";
}
echo "
</td>
</tr>
</table>";
closedir($dir_handle);
?>
<?
include("http://www.radpimps.com/inc/ads1.php");
include("http://www.radpimps.com/_footer.php");
?>

I dont know much about PHP or CURL so im kinda lost here.

AzBlk
January 23rd, 2007, 10:21 PM
chmod folder 1 to 755 or 777

Selena
January 23rd, 2007, 10:39 PM
didn't you have another topic exactly like this?

fryman
January 23rd, 2007, 10:40 PM
He opens the same thread twice and doesn't even stay and read the replies... :rolleyes:

mcfox
January 23rd, 2007, 11:01 PM
I moved this thread from Designer's Corner

<edit - partially silly me - it isn't a MSRS but a Myspace turnkey script - moving thread again *sigh>

<edit again - Nope, Selena is correct - there are two threads, one of which is about to get deleted *double sigh>

jeremy860
January 24th, 2007, 09:39 AM
That is weird. I have the same script and have not had a problem yet. You might want to contact your host and just make sure they support CURL.

also I dont think it even matters , but make sure the directories that hold the graphics are chmoded to 777.

Ad disengaged
January 24th, 2007, 11:46 AM
Oh I fixed it by changing this

$path = "http://www.radpimps.com/graphics/backgrounds/1"

to

$path = "/graphics/backgrounds/1"

Don't see why it doesn't like the http:// part oh well

MrWizard
January 24th, 2007, 03:59 PM
Oh I fixed it by changing this

$path = "http://www.radpimps.com/graphics/backgrounds/1"

to

$path = "/graphics/backgrounds/1"

Don't see why it doesn't like the http:// part oh well

I have had to deal with some of the same problems recently, here's what I think it should be. Please correct me if I'm wrong:

$path = is usually something like "/home/username/public_html/graphics/backgrounds/1"

Probably different for different type servers. I know it's a real pain in the rear to try to figure out at 3 in morning.