Quote:
Originally Posted by Bad Karma[CORE]
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.