It is currently Thu Mar 28, 2024 10:31 am


All times are UTC


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: php script
PostPosted: Fri Oct 28, 2005 11:20 pm 
Noobie
Noobie

Joined: Fri Oct 28, 2005 10:52 pm
Posts: 4
i want to use a php script for a guestbook in a flash site like this one

http://sciffy.planewalk.net/enplo/enplw.html

i uploaded all the files in my new site here
i changed the chmod to 777 to the php file
is there something i need to do in order the script to work?

_________________
xm


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 29, 2005 3:36 am 
Where did you download the PHP file from?


Top
  
 
 Post subject: xm
PostPosted: Sun Oct 30, 2005 8:42 am 
Noobie
Noobie

Joined: Fri Oct 28, 2005 10:52 pm
Posts: 4
from a site called swish-tutorialz.com

the link i have given you, is my site just in another server and there the guestbook works,
for some reason i must find a new server

http://enplo.freefronthost.com/enplw23.html
the guestbook in freefronthost server doesnt work, anybody has any clues?

_________________
xm


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 31, 2005 10:39 pm 
How big is the file? There IS a 500kb file size limit, so if any of the files associated with the script are larger, this will not work (SWF files, etc..)


Top
  
 
 Post subject: XM
PostPosted: Fri Nov 04, 2005 10:14 pm 
Noobie
Noobie

Joined: Fri Oct 28, 2005 10:52 pm
Posts: 4
no there isnt a size problem
the php script should have work just by uploading it or should i have done something extra

_________________
xm


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 05, 2005 3:48 am 
Can you please post the source of the PHP file so that I can verify it?


Top
  
 
 Post subject: xm
PostPosted: Sat Dec 03, 2005 1:25 pm 
Noobie
Noobie

Joined: Fri Oct 28, 2005 10:52 pm
Posts: 4
is this it?

$Name = ereg_replace("[^A-Za-z0-9 ]", "", $Name);
$Email = ereg_replace("[^A-Za-z0-9 \@\.\/\'\_\-]", "", $Email);
$Message = ereg_replace("[^A-Za-z0-9 \@\.\/\'\!\?\,\:\)\_\(\*\%\#\-]", "", $Message);
$Homepage = eregi_replace("http://", "", $Homepage);
$Homepage = ereg_replace("[^A-Za-z0-9 \@\.\/\'\~\:\_\-]", "", $Homepage);

$Name = stripslashes($Name);
$Email = stripslashes($Email);
$Homepage = stripslashes($Homepage);
$Message = stripslashes($Message);


if ($Submit == "Yes") {
$filename = "st_guestbookTXT.txt";

$fp = fopen( $filename,"r");
$OldData = fread($fp, 80000);
fclose( $fp );

$postdate = (date ("F jS, Y (h:i:s A)",time()));


$Input = "<i>Name:</i> <b>$Name</b><br><i>Email:</i> <b><u><a href=\"mailto:$Email\">$Email</a></u></b><br><i>Homepage:</i> <b><u><a href=\"http://$Homepage\" target=\"_blank\">$Homepage</a></u></b><br><i>Comments:</i> <b>$Message</b><br><i><font size=\"-2\">Posted on: $postdate</font></i><br><br>.:::.";

$New = "$Input$OldData";

$fp = fopen( $filename,"w+");
fwrite($fp, $New, 80000);
fclose( $fp );
}

$filename = "st_guestbookTXT.txt";

$fp = fopen( $filename,"r");
$Data = fread($fp, 80000);
fclose( $fp );

$DataArray = split (".:::.", $Data);

$book_total = count($DataArray) - 1;

print "&_root.guestbook.gb.total=$book_total&_root.guestbook.gb.book_down=$book_down&_root.guestbook.gb.book_up=$book_up&_root.guestbook.gb.thebook=";
for ($n = $book_down; $n < $book_up; $n++) {
print $DataArray[$n];
if (!$DataArray[$n]) {
Print "<b>There are no more messages in the book</b>";
exit;
}
}

_________________
xm


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 05, 2005 2:39 pm 
Noobie
Noobie

Joined: Mon Oct 31, 2005 9:14 pm
Posts: 44
Looks like a big ol mess to me... If it ain't broke don't fix it... stay on the other server where you said it works and save yourself a migraine or two...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ]  Moderators: fhmagic, KJ, Moderators, Support Team

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
100WebSpace © 2011