|
| Author | Message |
|---|
alain fondateur


Number of posts: 19534 Localisation: Dompierre sur Veyle ,France Registration date: 2005-04-19
 | |
 | |
peter le cochon +200

Number of posts: 913 Localisation: deutschland (sniff) Registration date: 2005-05-28
 | Subject: Re: PHP Sun 4 Oct - 22:32 | |
| Hi Alain : I have been able to upload an image. But I can't see it in the "createterrier" world. Only the first image (inline1.wrl) seems to load. All other inlines ... or images ... are "not loaded" or "not found". Keep on trying (  + VRML rocks!)  (trés busy) _________________ everybody is a stranger almost everywhere
|
|
 | |
alain fondateur


Number of posts: 19534 Localisation: Dompierre sur Veyle ,France Registration date: 2005-04-19
 | Subject: Re: PHP Mon 5 Oct - 7:08 | |
| |
|
 | |
alain fondateur


Number of posts: 19534 Localisation: Dompierre sur Veyle ,France Registration date: 2005-04-19
 | Subject: Re: PHP Mon 5 Oct - 9:24 | |
| |
|
 | |
legloups +200


Number of posts: 550 Localisation: var Registration date: 2006-05-05
 | |
 | |
isa +2000


Number of posts: 6950 Localisation: INDRE ET LOIRE Registration date: 2005-04-19
 | |
 | |
legloups +200


Number of posts: 550 Localisation: var Registration date: 2006-05-05
 | |
 | |
alain fondateur


Number of posts: 19534 Localisation: Dompierre sur Veyle ,France Registration date: 2005-04-19
 | Subject: Re: PHP Sat 7 Nov - 10:53 | |
| sorry legloups j'ai pas su le faire marcher , je suis assez nul en  LOL et Peter me dit de limiter le nombre ici , http://mixed3d.free.fr/greetings.htmcar 999999 ferait exploser tous les servers de free.fr LOOL | Code: | Code: <?php header ("Content-type: model/vrml"); ?> #VRML V2.0 utf8 <?php // Une boucle pour creer autant de cube que necessaire $nb=(int)($nbCube); // Le For for ($i=0; $i<$nb; $i++) { ?>
Transform { <?php echo " translation " , $i*4 , " 4 0" ?> children Shape etccccc
|
mais je sais pas faire  |
|
 | |
peter le cochon +200

Number of posts: 913 Localisation: deutschland (sniff) Registration date: 2005-05-28
 | Subject: Re: PHP Sat 7 Nov - 11:25 | |
| There are 2 things I would do : 1) filter out high values inside the php script | Code: |
$max_cubes=10; $nb=(int)($nbCube);
if($nb>$max_cubes){$nb=$max_cubes;}
|
2) DEF and USE the geometry, to reduce filesize
| Code: |
$vrml ="#VRML V2.0 utf8".chr(10).chr(13); $vrml.="Transform {translation 0 4 0 children["; $vrml.="DEF theCube Shape{}"; // .... etc $vrml.="]}";
for ($i=1; $i<$nb; $i++) {
$vrml.="Transform{"; $vrml.="translation " , $i*4 , " 4 0 "; $vrml.="children USE theCube }";
}
echo "$vrml";
|
I guess it should work something like that.
TC

adenda :
It is important to filter out unallowed values on the server-side and not on the client (javascript). As you are using GET, everybody could compose a bad intentioned query like
http://xxxxxxxxxx.free.fr/alain/no_cache/vrmlvoeux.php?nbCubes=99999999999 _________________ everybody is a stranger almost everywhere
|
|
 | |
alain fondateur


Number of posts: 19534 Localisation: Dompierre sur Veyle ,France Registration date: 2005-04-19
 | Subject: Re: PHP Sat 7 Nov - 11:35 | |
| Ok I try to understand LOL and to check , btw check your mails , dear Peter , and thanx |
|
 | |
alain fondateur


Number of posts: 19534 Localisation: Dompierre sur Veyle ,France Registration date: 2005-04-19
 | Subject: Re: PHP Sat 7 Nov - 11:49 | |
| LOL I just added the first lines , max 10 and typed 25 , it just creates 10 ! ahaha will try to add the other lines , scuse to bore you but I am a bit excited , remembering that I was using des cartes perforées at my first job in 1975 , and now , a *few" years later , able - with some help - to create 10 hearts in php ahahahahah putain de vie  ) |
|
 | |
|