I need to convert Pdf file to byte array conversion in php. I am looking for like this result.
This result have byte conversation of Pdf file.
What id did:
$file = file_get_contents("pdf.pdf");
$fileData = base64_encode($file);
echo $fileData;
It does not works for me. how to convert PDf file to byte array?
This will get you the whole file into a string:
$fileContents = file_get_contents($file);
If you want an array of one-character strings, you can do this:
$byteArray = str_split($fileContents);
If you want an array of integer ASCII values, you can do this:
$byteArray = unpack('C*', $fileContents);
i'm provided with a JSON object and i can output the values as i want to, but i also want to use the numbers (83 & 167 generated randomly) as shown in the code as an unique identifier, but i can't seem to get only the numbers, can someone point me in the right direction?
i make facebook chatbot with PHP but i want to send to all subscribe users the last news automatically every day (programming by specific time)
I have a live streaming site I'm currently working on and am running into an issue hiding the stream key fullyI've only thought of one option to get around this, but you're still able to see the stream key in view source and web console output:
(question edited) I been struggeling with this script for while and cant get it to work right