LouiZeForum

3D vrml
 
HomeHome  FAQFAQ  SearchSearch  RegisterRegister  MemberlistMemberlist  UsergroupsUsergroups  Log in  3Dchats / forums3Dchats / forums  

Share | 
 

 PHP

View previous topic View next topic Go down 
AuthorMessage
alain
fondateur
fondateur
avatar

Number of posts : 23084
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: PHP   Sun 4 Oct - 14:46

I tried 2 or 3 times years ago to play with PHP

But I must say that I am not a programer , - even if many people say that it is easy to do Sad

Today I tried that :


1 - here
http://mixed3d.free.fr/terrier/no_cache/images/imagesupload.php

you could upload your image :


http://mixed3d.free.fr/terrier/no_cache/images/Upload/


( jpg , maxi 800x800 )


2 - here

Quote :
reedit :

http://mixed3d.free.fr/terrier/no_cache/createterrier4.htm

it creates one or more "terrier"

and each one includes


http://mixed3d.free.fr/terrier/no_cache/inline1.wrl

http://mixed3d.free.fr/terrier/no_cache/inline2.wrl

etc

and each of them includes

this image

http://mixed3d.free.fr/terrier/no_cache/images/Upload/1.jpg

or 2 or 3 etc

3 - so ....

if you upload an image there you will see it in the wrl


refresh and refresh !!


................



who could test that plz ???

_________________
http://mixed3d.net/


Last edited by alain on Mon 5 Oct - 9:02; edited 2 times in total
Back to top Go down
View user profile
peter le cochon
+1000
+1000
avatar

Number of posts : 1032
Localisation : deutschland (sniff)
Registration date : 2005-05-28

PostSubject: Re: PHP   Mon 5 Oct - 0: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 (PHP + VRML rocks!)

pig (trés busy)
Back to top Go down
View user profile
alain
fondateur
fondateur
avatar

Number of posts : 23084
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: Re: PHP   Mon 5 Oct - 9:08

yes

Quote :
Only the first image (inline1.wrl) seems to load.

sorry ! createterrier.htm was not finished ! sorry

now

http://mixed3d.free.fr/terrier/no_cache/createterrier4.htm

could contain 4 inlines ,
with "1.jpg" "2.jpg" etc

you must upload your image as "1.jpg" etc , if you want it in the terrier .

It is very amateur , I am a bit ashame LOL ,
but on the other hand I am happy to play with that ,
I made some small progress Smile


I hope you survive Cher Peter ,
and thanx for the chat log , very great one Smile !!



....

ps


I reuploaded it as "4.jpg"

and I think that works



of course each new image erase the ancient , but I feel that it is funny too like that ,
interactive events LOL


...

I will add more inlines .....

_________________
http://mixed3d.net/
Back to top Go down
View user profile
alain
fondateur
fondateur
avatar

Number of posts : 23084
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: Re: PHP   Mon 5 Oct - 11:24

LOL

a stupid "event 5" Smile


http://mixed3d.free.fr/terrier/no_cache/createterrier5.htm

_________________
http://mixed3d.net/
Back to top Go down
View user profile
legloups
+200
+200
avatar

Number of posts : 678
Localisation : var
Registration date : 2006-05-05

PostSubject: Re: PHP   Mon 5 Oct - 19:48

Ah pas mal Very Happy
Back to top Go down
View user profile http://perso.wanadoo.fr/l-goulois
isa
+2000
+2000
avatar

Number of posts : 7076
Localisation : INDRE ET LOIRE
Registration date : 2005-04-19

PostSubject: Re: PHP   Mon 5 Oct - 19:58

oui c'est sympa ... Smile Very Happy

_________________
http://mixed3d.free.fr/spip/?feed=rss2
Back to top Go down
View user profile http://isaworld.free.fr/site/
legloups
+200
+200
avatar

Number of posts : 678
Localisation : var
Registration date : 2006-05-05

PostSubject: Re: PHP   Mon 5 Oct - 21:18

Si tu veux, pour améliorer l'upload, j'en avais fait un, protégé et tout Very Happy

http://www.editions-lacornichedor.com/forum/viewtopic.php?t=104

Bon il faut que je rajoute la possibilité d'effacer Embarassed
Back to top Go down
View user profile http://perso.wanadoo.fr/l-goulois
alain
fondateur
fondateur
avatar

Number of posts : 23084
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: Re: PHP   Sat 7 Nov - 12:53

sorry legloups j'ai pas su le faire marcher ,

je suis assez nul en PHP LOL

et Peter me dit de limiter le nombre ici ,


http://mixed3d.free.fr/greetings.htm


car 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 Sad

_________________
http://mixed3d.net/
Back to top Go down
View user profile
peter le cochon
+1000
+1000
avatar

Number of posts : 1032
Localisation : deutschland (sniff)
Registration date : 2005-05-28

PostSubject: Re: PHP   Sat 7 Nov - 13:25

Very Happy

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

pig

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
Back to top Go down
View user profile
alain
fondateur
fondateur
avatar

Number of posts : 23084
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: Re: PHP   Sat 7 Nov - 13:35

Ok I try to understand LOL and to check ,


btw check your mails , dear Peter ,

and thanx

_________________
http://mixed3d.net/
Back to top Go down
View user profile
alain
fondateur
fondateur
avatar

Number of posts : 23084
Localisation : Dompierre sur Veyle ,France
Registration date : 2005-04-19

PostSubject: Re: PHP   Sat 7 Nov - 13: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 Smile)

_________________
http://mixed3d.net/
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: PHP   

Back to top Go down
 
PHP
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
LouiZeForum :: ARTS :: 3D art :: Script-
Jump to: