Free Web Hosting Forum
Go Back   Free Web Hosting Forum > Website Building > Scripts and Code Snippets
Reload this Page A PHP guestbook that needs no database
Reply
 
Thread Tools Display Modes
(#11 (permalink))
Old
webnoobie's Avatar
Junior Member
webnoobie is on a distinguished road
 
Posts: 15
Join Date: Aug 2010
Default 08-02-2010, 08:05 PM

Quote:
Originally Posted by Bad Karma[CORE] View Post
Can you post an example link for a thread that is redirecting your?

yes i can:

fwrite() not working, although success is reported...



and all the posts about fopen and fwrite and close, the stuff that allows you to write the content of an inputfiled from php or a .swf to a plain textfile.




this code is was given years ago from the people in swishzone (swishmax flash products)

this php would allow me to be called from within a swishmax exported swf file
it would write info to an existing txt file
but it only worked for me on my previous (no longer existing) free host, and they seemed to have linux or so, cause the chmod worked without problems.

the php filecode:



<?
chmod("player1stats",0666);
$f=fopen("player1stats.txt","w");

fwrite($f,"&stat0=$stat0");
fwrite($f,"&stat1=$stat1");
fwrite($f,"&stat2=$stat2");
fwrite($f,"&stat3=$stat3");
fwrite($f,"&stat4=$stat4");
fwrite($f,"&stat5=$stat5");
fwrite($f,"&stat6=$stat6");
fwrite($f,"&stat7=$stat7");
fwrite($f,"&stat8=$stat8");
fwrite($f,"&stat9=$stat9");
fwrite($f,"&stat10=$stat10");
fwrite($f,"&stat11=$stat11");
fwrite($f,"&stat12=$stat12");
fwrite($f,"&stat13=$stat13");


fclose($f);
chmod("player1stats",0600);
?>







it would create this plain txt file:



&stat0=&stat1=&stat2=&stat3=&stat4=&stat5=&stat6=& stat7=&stat8=&stat9=&stat10=&stat11=&stat12=&stat1 3=




each variable represents an inputfield inside the swishmax generated swf file

so after each = there would be some numbers written




but the code is old and now with php 5x it wont work
i tried the code on many free hosts but no work.
only on awardspace it worked but only when you choose php 4x, cause on php5x its a no go.




the general idea is like this: http://serpentesneros.host56.com/
after page is loaded, (its sometimes slow for me, but i am from holland so maybe i am to far away)
you see the plain text left and the input fields after the : will contain the info from the flat file, that is , if i can ever to get the code to work.


ps: the music is streamed from youtube using there API (i made a simple player myself), so there be no music on your servers so dont worry, its all ok.

Last edited by webnoobie; 08-02-2010 at 08:18 PM.
Reply With Quote
Sponsored Links
(#12 (permalink))
Old
lobrc's Avatar
Administrator
lobrc is on a distinguished road
 
Posts: 5,046
Join Date: Jan 2010
Location: http://www.lobrc.net
Default 08-02-2010, 08:07 PM

Quote:
Originally Posted by webnoobie View Post
yes i can:

fwrite() not working, although success is reported...



and all the posts about fopen and fwrite and close, the stuff that allows you to write the content of an inputfiled from php or a .swf to a plain textfile.
That link gives me an error.


FREE SCRIPT INSTALLATION SERVICE | PREMIUM HOSTING* | LOBRC.NET

*All packages include Quality Support, Website Builder, Free Site Migration, 30 Day Money Back Guarantee, Official cPanel and Fantastico Autoinstaller.

Plus get 20% off with promo code 000WH20. Contact sales for more information.
Reply With Quote
(#14 (permalink))
Old
webnoobie's Avatar
Junior Member
webnoobie is on a distinguished road
 
Posts: 15
Join Date: Aug 2010
Default 08-02-2010, 08:20 PM

Quote:
Originally Posted by Bad Karma[CORE] View Post
Thanks, iŽll forward that to the admins

thank you, and most of the older posts from 2009, also give same error.
Reply With Quote
(#16 (permalink))
Old
webnoobie's Avatar
Junior Member
webnoobie is on a distinguished road
 
Posts: 15
Join Date: Aug 2010
Default 08-02-2010, 08:27 PM

excellent.
thanx so much, i be offline now...
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.2
vBulletin Skin developed by: vBStyles.com