logs archiveIRC Archive / Freenode / #php / 2006 / March / 30 / 1
TML
!tell kanzie about guidelines
BigTrucK
TML: Ahhh gotcha... working on php4 code where var is used profusely :(
kanzie
I am trying to write a mailer that uses a form on my webpage, takes the content (message) and mails it to the list of subscribers. But I have problems with encoding. I want to give the ability to use " ' \ and so on... but it just turns into jibberish, how do you accomplish a reliable mailer without making it complicated ?
weedar
Hm, now TML, I hate beating a dead horse - but how come everything BEFORE the seek is nulled when you write to the file? (I tried opening it with "r+"?
fr3sh
kanzie
HTML email?
kanzie
preferrably not...
to achive maximum compatibility...but if that is the best solution to use, then HTML-mails it'll be!
fr3sh
Just make a loop
loop it until you have read every row in the database
and send an email to each member of each row
kanzie
oh... all that is already in place and working like a charm
but the mails get a \ in front of all " and ' and it bugs me... so I would like to add a format-function to the actual message so that it always looks nice to the receipents
Ajaxamander
TML: got the TNS variable set, but it's still not resolving it... so it's possible that the configuration file is just b0rked, you say?
         

kanzie
I set the header to "Content-type: text/plain; charset=iso-8859-1\n";"
philip
kanzie: you don't find all the \ everywhere.. sexy?
beerdeliveryguy
anyone familiar with the sleep() problems in execution
?
BigTrucK
TML: http://pastebin.com/629644 -- $this->testVar holds nothing :(
Jymmm
(Action) looks for his ATX Power Supply testing tool
sequethin
kanzie: I use stripslashes
kanzie: to remove the slashes;)
BigTrucK
(Action) points out to Jymmm that he has 4 on each hand
kanzie
philip: hehe...nah...only at first ;-)
ill try that
philip
so sexy that it's almost magical
fr3sh
How do i upgrade my php?
philip
kanzie: yes, what was said will work, also figure out where they come from... odds are magic_quotes_gpc
Jymmm
BigTrucK: lol
sequethin
kanzie: actually what I did was write a small function that runs htmlentities, mysql_escape_string, and stripslashes...
kanzie
Im just afraid Ill write unsecure code that will be exploited by mistake (i trust my users, but not their skills)
nater
how do i insert a variable into an array while pushing all other array values back?
fumanchi
TML: yoe were right... i found php is not able to handle files the way i told...
alecs
hi!
fumanchi
TML: but its no OS-problem.. our operating systems are able to do so...
kanzie
sequethin: Thats what I have been working on with not much of success...do you mind pastebin it to me?
Jymmm
BigTrucK: I'm suspecting nobody else "got it" =)
         

fumanchi
TML: i will show it to you tomorrow.. my girlfriend is screaming...
philip
nater: consider array_merge
BigTrucK
Jymmm: I suspect your right
nater
philip: would array slice work as well?
sequethin
kanzie: /msg ? i can email the file to you if you like
kanzie
msg works great for me
please
Jymmm
BigTrucK: Ok, NOW to grab the fluke =)
solipsist0x01
array_shift I think?
BigTrucK
Jymmm: haha
Jymmm
11.1v & 5.4v
ify
philip
array_unshift()
Jymmm
oh, no load.
solipsist0x01
yeah, unshift
Jymmm
BigTrucK : http://www.torontosurplus.com/tes/DATA1395.JPG
BigTrucK
Jymmm: much better than fingers
Jymmm
BigTrucK: Fingers? You pu**y... use your tounge! =)
ShortWave
WTF...
Uh news flash
don't listen to Jymmm
heh
BigTrucK
...
Jymmm
ShortWave: wth you doin here slummin?
ShortWave crawl back under your rock!
ShortWave
Jymmm: heh, fighting with Sugar
BigTrucK
hmmm TML must have went out for lunch...
Jymmm
ShortWave: who's Sugar, and does your wife know about her?
BigTrucK
anyone know why my $this->testVar is still null? http://pastebin.com/629644
ShortWave
Jymmm: http://www.sugarcrm.com
Jymmm: and yes, the wife uses Sugar on a daily basis.
Jymmm: She works here with me ya know.
Jymmm
ShortWave: Oh, we dont support pkgs here.
ShortWave: Yeah, she has to keep her eye on you =)
ShortWave
Jymmm: I'm aware of that. That's what #sugarcrm is for
Jymmm
ShortWave wth do you need a crm for? you aint tech support
ShortWave
Jymmm: We be an engineering firm, and it does work well for what we do. We're using it not only for crm, but project management.
Ajaxamander
anyone else ever used the OCI8 (Oracle) features of PHP?
Jymmm
ShortWave: Eh for Q&D, I guess that would work
ShortWave
Jymmm: works great actually. I wrote a timesheet system around it.
Jymmm
timecards?!
for an eng firm?
you got some lousy workers or what
ShortWave
well we have to charge our time to whatever project we happen to be working on.
mad_phoenix
so, am I crazy, or does count($array) return 1 if the array is empty?
ShortWave
And we need to track B&P time too.
Jymmm
oh for billing, ok.
philip
mad_phoenix: what thes the manual say?
ShortWave
yes
we do our own billing
philip
oh it doesn't say doh :)
Jymmm
ShortWave: Just put me down for 200 hours
philip
mad_phoenix: btw, yes you are crazy
mad_phoenix
well the manual says count() returns 1 if the variable is not an array
philip
try var_dump() on your variabe to see what it actually is
mad_phoenix
so how do you distinguish between a non-array and an array with 1 element?
philip
you know your data
kadigibox
I have a scope question. Any varable declared outside of a function can be viwed inside a function but a varable declared inside a function is not viewable outside the function right?
sequethin
how about is_array
philip
kadigibox: wrong
kadigibox: php.net/variables.scope
change your 'can' to 'can not'
mad_phoenix
you know your data? thats an excuse for a function with ambiguous return results? why wouldn't it return -1?
ShortWave
Jymmm: Pfft. You better show some results.
philip
mad_phoenix: count() is not specific for arrays
mad_phoenix
its specific to arrays and objects with a countable interface
im aware, i rtfm
sequethin
mad_phoenix: is_array will certainly tell you... if... it's....
Jymmm
ShortWave: NP there
sequethin
(Action) shrugs
philip
mad_phoenix: you know the rules of the function, now, deal with them... that's all one can say i suppose
Jymmm
ShortWave:But... I dont' play well with politics or bullsh*t.
mad_phoenix
thats fair, it just seemed illogical
but thanks for the help all
philip
it is odd, i'll agree :)
kanzie
sequethin: Where did you go man?
sequethin
kanzie: I tried to /msg you?
Jymmm
ShortWave: Check this... called mfg to get some sample switches. Got a call back to day and their whining becasue of the cost.
itrebal
http://www.oconus.com/photocontest/..%5CuploadPhotos%5COCari_19May2005_113949.JPG does it seem like that comes up often in websites?
kanzie
And I got that... I replied and chattet on like mad, with no reply! =(
sequethin
interesting. looks like the wonders of the intarweb ;)
Jymmm
itrebal what, tulips?
itrebal
Jymmm: that sort of image though, with bunches of flowers and one of them a different color
Jymmm
itrebal: it's symbolism
itrebal
Jymmm: right, i'm just asking if you've seen it too much (whether i should use it, or do something else..)
Jymmm
itrebal "Standing apart from the crowd" sorta thing
sequethin
kanzie: I pasted the function I use into the msg, since you said you can read it
kanzie
sequethin: Thanks man, looks great, I got it!
Jymmm
itrebal as long as you dont do a three column website, you'll be fine.
sequethin
it's worked so far...
itrebal
Jymmm: heh, i'm not a fan of 3 columns usually.... they *can* be effectivly used though
sequethin
kanzie: if you want to send text and html mail you might want to look into the phpmailer class... works like a charm for me
Jymmm
itrebal: they're like as****es... everybodys got em... they are used and abused
itrebal
Jymmm: hehe, very true
Jymmm
and full of sh*t
itrebal
:P
kanzie
phpmailer...
Ill google it and see what I find
chasep_work
I have no problem printing regular text to my printer using php_printer. However, if I try and print a buffer created by pdflib, it, obviously, prints out the raw contents of the pdf....how can i convert it to where the printer prints out the PDF as if printing from acrobat?
sequethin
kanzie: I find it's very useful. there are many tutorials for it as well
Jymmm
ShortWave you guys still work on Smith?
chaoscon get a PS printer
chasep_work Get a PostScript printer
chasep_work
Jymmm: not an option....any other ideas?
Jymmm
chasep_work Use PCL instead of PDF
sequethin
kanzie: between phpmailer, tinymce, and some quality time with vim I came up with a solution that the client really enjoyed. I can never let him find out just how simple it all is ;)
Jymmm
chasep_work try googling for 'pdf to pcl'
kanzie
sequethin: Mohaha... lovely!
sequethin: Thats how its supposed to be you know
sequethin: we should not charge for pain, but for knowledge! ;-)
MACscr
anyone know how to turn off php notices with an htaccess file?
sequethin
kanzie: of course :)
TML
MACscr: php.net/error-reporting
MACscr
unfortunatley i didnt find anything to do with htaccess there
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 next »