logs archiveIRC Archive / Freenode / #php / 2015 / November / 5 / 1
SyntaxTerrorCat
oojacoboo, this? http://php.net/manual/en/control-structures.declare.php
oojacoboo
SyntaxTerrorCat: no
DateTime.UTCNow.Ticks
A single tick represents one hundred nanoseconds or one ten-millionth of a second. There are 10,000 ticks in a millisecond, or 10 million ticks in a second.
__adrian
php knows about microseconds. that's about it.
oojacoboo
can someone explain to me how the current UTC ticks is 635822995148345724?
I guess the issue is that everything I've seen for calculations is just adding the nanoseconds onto the number of seconds
which doesn't work b/c you have to calculate the number of nanoseconds from the start 01-01-1970
zro
ok, im continuing on my search to make pdfs w php well. im on my 3rd try now, any suggestions?
Motoko
zro, you could look through the packages listed at https://packagist.org/search/?q=pdf
Maybe one of those will help you.
oojacoboo
zro: you want wkhtmltopdf bin
zro
thats my current mo. digging thru packagist and github. just hoping someone has a pointer
oojacoboo
then call that with php
         

zro
i need to generate a pdf AND embed some metadata i can get back later.
oojacoboo
zro
i was generating with snappy (wkhtml2pdf) and then trying to edit metadata with zend (cuz wkhtml2pdf wouldn't edit metadata as far as i know) but it corrupts the bookmarks
oojacoboo
metadata?
what metadata?
I don't know much about pdf metadata, can't help you there - that's a rare request
most people just want to generate a pdf and call it a day
zro
ya, so like user fills out a form and app generates a pdf and doesnt persist the data on the server. but im embeding the array of data in the pdf so user can upload the pdf later and prepopulate thje form
oojacoboo
omg that sounds horrible
why not just save a copy on the server?
zro
against policy
not my policy
oojacoboo
lol
zro
clients
oojacoboo
b/c a pdf, ya know... is SOOO much more secure
zro
ya
oojacoboo
ignorance - can't progress
zro
its a little weird. kind of a fun puzzle tho?
oojacoboo
not sure I'd get over that part
I'd probably refuse
unless they could justify it to me somehow
but that seems unlikely
tell them you'll just print the sh*t on page 2 of the pdf
zro
honestly, i find it less offensive than clients who want to store peeps personal data on their server and let it rot in a cess pool of insecurity
oojacoboo
well, I wasn't suggesting that either ;)
zro
but i need to be able to get the data out of the pdf when they upload it back to the server too
oojacoboo
lol, OCR a nice pretty QR code
zro
hmmmmmmm
damnit y cant wkhtml2pdf just write keywordsbased on meta tags or something sensible.blar
EoN
Hey guys. I need to interface with a web service written in java, and the documentation says that "it is possible ot generate functional stubs against the WSDL definitions". So the WSDL itself defines XML class structures and objects that you're supposed to be able to instantiate. Is php able to do this?
or is this only available for Java and .NET?
         

oojacoboo
EoN: SoapClient?
EoN: I'm unsure about actually constructing the shell classes though
honestly, I think I recall reading something about this at some point
EoN
so like after seeing the WSDL, i need to be able to do a $obj = new WebServiceDefinedClass()
oojacoboo
I just haven't toyed around with Soap much in a while
EoN
in .net you can just 'import' the web service. and it defines all of it.
oojacoboo
EoN: I think in PHP you'll need to define the class that matches the WSDL
EoN
well, that's painful.
oojacoboo
I know that's how I've already done it
EoN
yeah me too in the past
oojacoboo
well, maybe... but WSDL is painful itself
EoN
i was just thinking - surely there must be a way by now
oojacoboo
people just quit using WSDL
instead of trying to fix it
zro
oojacoboo
EoN
yeah i literally just found that wsdl2php just now lol
might give it a shot.
zro
bah, why is dompdf the way it is....
oojacoboo
lol
DOM lol PDF
zro
globals? seriously? wtf
and a zillion constants, jesus
ok, i hate pdfs more than ever now
oojacoboo
pdfs are rought man
rough*
wkhtmltopdf is as good as it gets
zro
maybe ill suggest they use word docs instead. or maybe lotus notes files ya. or quark documents
oojacoboo
and will probably remain that way for a long time
zro
why o why can i only edit the titale attribute tho. bah
oojacoboo
docx are xml
zro
i can't even do this all hacky and try to much the pdf as text can i.
oojacoboo
pdfs are proprietary - that's most of the issue
zro
like i think its just something like "/Keywords (blah blah)"
oojacoboo
adobe wants you to author them with their acrobat app
zro
but i dont know where to add it. and i dont know anything about the character encoding, and i think theres some kind of checksum or something damnit
i wonder if I just smash text after the %EOF if that breaks it
bah, this is all hacky death why am i thinking like this, theres gotta be a way to do this
oojacoboo
yep
you put a number at the bottom of every file
and store the form contents on the server
it's pretty simple :P
anonymous and encrypted
zro
:)
EoN
ugh.. i'm so out of touch. i don't even use composer
oojacoboo
it's pretty new
EoN
installation notes for wsdl2php: "Add wsdl2phpgenerator to your Composer project: composer require wsdl2phpgenerator/wsdl2phpgenerator"
am i just old & jaded? or are they sh*t instructions?
oojacoboo
most people use Composer now
but just download the zip from github
EoN
i guess i better get with the program. why cant i just download it and run it
oojacoboo
you can
you just have to deal with autoloading on your own ;)
Composer will handle that for you
1 2 3 4 5 6 7 8 9 10 11 12 13 next »