New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Comments
or you could take advantage of sudo
That said, shell_exec and associated functions are rarely ever recommended for anything. People will suggest you build your own extension before they suggest using passthrough/system/shell_exec.
Which sounds hard
I can't get it to work :$. All I get are the three buttons in the top left corner and nothing else.
I'll give it a try, thanks
I do too @yomero ;_;
No worries @twain
The imagettfbbox function was the main solution to your problem.
@bnmkl - tested and works great for the text variable to be new everytime from a new 'pwgen -ny 12'. And part of the problem is passing that command into a variable only takes the first password too... anyway I'll keep banging my ahead against this one.
Strange, lol. I will have a look at putting
pwgenoutput into a PHP variable later.What is your output for :
@bnmkl
bash-4.1$ cat pwgentest.php
<?php $pwgen = `/Users/indigodaddy/bin/pwgen -ny 12`; echo $pwgen; ?>bash-4.1$ php pwgentest.php
aequ.ee1kei0
Definitely strange @twain.
I would assume it is related to the special characters, but the example below works.
strings.txt
Uo/thengohy5 phie=Tahw8ko Cohh1seiz]ua ooY@ee4chei) noo}Mioyei5u au$x5Isaigho aht6vahGia{j aeph8yoh#kuY EeNgees#ae4k boh5yie1Ic\e aiSh5bahp]ai kiex%ahL0Oob bei|G{ohm8ae Ieth|ee|wee9 koo@R2iZeot" Nai5Phain(ie Oam*ub0thoth quu6Eyimohd- geeNgool}ee1 Oow5Pie_sija ab#ahcoo8eeJ ahcoe_r6Vae3 pi%wiedeit4A biegh}u@vu6K euwei.gei9Of ahr?ai2UquaZ ha3eiXee"koo eiLohf*u1sao ave&aqui8Hie oc-a@z'oh1Le iv$eeX0eo0Wu rel7aGh6gee& baig3ooN%uz, eoj9eGo.haih Aoka4Uizae:r aiG6aiP.iera IaY?oo0Aibai pekaeth5Aeh% taav*eiK5Soo zohL5haeng?o teT^u3yash3S xudoh%Dai4ph tho`R\ahd7ae ohf#e9Ceeph7 Uce7ou{woe8o eeb9jo!Y#aep la7Voo.chae7 te;y5Choo4ie neeZ5out'oo) ze{iw4Aethok fah3Shoh^Re9 Quoo8au%koot xo2chu>Lae0e Shee#g1eibak que5Og3aiN&e aw(eetooJ5Ei aeV8ging(eib ohGh9Chah[ch ieYiv5gagh-a kahm2yohR%uo Eiraivi!o}W0 eo0Oot{ai5sh saT[ae2ahj5O Aefae,l5ieth jo0iJ,ai5eih deer9Aigol'i aet1Ce,za+fi OFi3exoh)ng3 tae7ooGhaim/ nei$V8Ohh!ae eiy~ia4Itoh; Baisish+ai5d iib+ooHaoj4t Ayac3aiCh>ee ka/eChoosh2c vanu1Zeex#uy phieB(ai8iev Ou|Gh3zuwo,f ool3AxiNo~ch zai3Eew&ie*w Zee7eey4eJ*o kooree9Va>B5 FaiB-ah8yahK oha4uP3Othv1M ae5re8yaXuw% gei5rua1Lu/i eeNg3uyaf"ei Ootee|h8Shai sa6ed0nieF+e aed8rah;Kai4 boghahH]a7ei eiba$Roh5uu' Ook6oonae`th Vai9taer#oo? aich7ohMoi/d Ohh1ew-aa"xi Eig%ae]jo2ne urooX1iagh|u iiY8reew,i8d eGhee4fahw(a ieS%ai1ieh4e pun9Ich0jee; Waer_ai1ieph re)Che`xud0A Aek2wioh\a2u deedae0Ai[be ohr!a4Ohtae* keNai8aes%oh ookiM3uiRei~ fei-Boo2tu3i coo=c4Yie?w8 ThaiN7fe$o"t ahw[uChae3va Ej5Evaa&Giix seat|eeZ1yae ee5wiengo]Ba Oo2aThu^p!ai ez{i4too8ohDpwgen.sh
pwgen.php
Haha. Actually tried
pwgenand had the same problem @twain. Solved though by being more specific and formatting in PHP.index.php
<?php $PW_LENGTH = 12; $NUM_OF_PW = 120; $LINE_LENGTH = 78; $text = `pwgen -ny $PW_LENGTH $NUM_OF_PW`; $text = str_replace("\n", ' ', $text); $text = wordwrap($text, $LINE_LENGTH, "\n"); require('./class.TextImage.php'); try { $image = new TextImage(); // $image->setFontSize(14); // $image->setBackgroundColour('000'); // $image->setTextColour('d4d4d4'); $image->setText($text); $image->render(); } catch (Exception $e) { die($e->getMessage()); } // END@bnmkl - Wow that's awesome man!
http://indigodaddy.koding.com/pwgen-test/
I'm just learning php, so now I am going to sit down and try to understand as much as possible about everything you did here.. (which was a LOT.. thanks so much!)
To me this is an interesting project, I'll probably put it up on a real domain with https just for the heck of it.. you will be credited, let me know the credit/link you want me to add when I put it up..
It is all yours @twain
I have always remembered you after discovering that you are a fellow Puppy Linux fan.