Skip to content

Tag: php

Is it possible to remove a Password from a PDF file using PHP?

I would like to ask if it’s possible to use PHP in removing a password from a password-protected PDF file in which I already know the password? I’ve seen this page which provides many options but using bash script. 🙁 I was required to use PHP as much as possible. Any suggestions appreciated! Answe…

How do I convert output of number_format back to numbers in PHP?

PHP can’t recognize 1,200.00(generated by number_format) but only 1200.00, What’s the general solution for this problem? Answer You could remove any character that is not a digit or a decimal point and parse that with floatval: And if the number has not . as decimal point:

PHP Store User Data without Sessions

Is there anyway to store users data such as userid, email, etc to be accessible from all pages of a website after they have logged in, but without using sessions or cookies? For example: after they login at login.php now, how do I access $currentUser from another page, such as index.php if I shouldn’t u…

How add class=’active’ to html menu with php

I want to put my html navigation in a separate php file so when I need to edit it, I only have to edit it once. The problem starts when I want to add the class active to the active page. I’ve got three pages and one common file. common.php : index.php : All three pages are identical except their

Pause-able download for Apache

I have an Apache server running which hosts a php web application. This server also provides provisions for downloading a file size of around 900MB from it. However, while testing the application I found out that it’s not possible to pause the downloads and resume them later on. Could someone help me? I…