Encrypt and Decrypt String With Key PHP
Hi, I'm looking for some functions to encrypt and decrypt strings in php using a key specified. Thanks! ...
Hi, I'm looking for some functions to encrypt and decrypt strings in php using a key specified. Thanks! ...
The mail() function is bad, because it is so permissive with headers that you pretty much can't use it with any user input without subjecting yourself or others to spam. So what is the simplest substitute that can still ensure that it's use is secure? Ideally something that can be included in an external file. ...
This is what I would like -- a shopping area on my website. A user goes to this shopping page, they select the products they like, and they add them to shopping cart. When they are ready to check-out, they are transferred with all items in cart to Amazon to complete purchase. Here's the twist: I would like to sell some DVD's from my hom...
I have a PHP app that is running on an Apache server with MySQL databases. Based on the subdomain that users access, I am connecting them to a database (sub1.domain.com connects to database_sub1 and sub2.domain.com connects to database_sub2). Right now there are 10 subdomain-database combos, but that number could potentially grow to wel...
I have several PDF files stored in Amazon S3. Each file is associated with a user and only the file owner can access the file. I have enforced this in my download page. But the actual PDF link points to Amazon S3 url, which is accessible to anybody. How do I enforce the access-control rules for this url?(without making my server a prox...
How to translate .PDF files using google APIs? (translate from language the pdf's are to for example russian (new pdf file orplain text or html).) (code example needed) ...
So I have Apache Web Hosting from some provider. how to determin how much freespace (mb's) for hosting files I have using php function? ...
I am working on a large multilingual website and I am considering different approaches for making it multilingual. The possible alternatives I can think of are: The Gettext functions with generation of .po files One MySQL table with the translations and a unique string ID for each text PHP-files with arrays containing the different tra...
In a MySQL master-slave replication enviroment if I have 4 slave servers how can I execute load balanced select queries? Should I write a PHP class to dealing with the 4 slaves or it is possible to address queries to MySQL's own load balancer solution? Is there any MySQL load balancing solution? Can I use some other tool to distribute...
How can I connect to a MySQL database that requires an SSH tunnel using PHP and the Zend Framework? ...
What is the common pattern to structure web application where part of it has to be secured. So lets say I have page_a and page_b which do not need to be secured, although should display login information (login fields or login details once user logged in). This web app. also would have secured pages (admin, checkout or similar) secure_pa...
Its been a while since I updated my pagination on my web page and I'm trying to add First and Last Links to my pagination as well as the ... when the search results are to long. For example I'm trying to achieve the following in the example below. Can some one help me fix my code so I can update my site. Thanks First Previous 1 2 3 4 5 ...
I'm trying to install PEAR on OS X, using the built-in PHP 5.3 installation. I did this: curl http://pear.php.net/go-pear > go-pear.php php go-pear.php After answering some prompts, I start getting tons of errors like this: Deprecated: Assigning the return value of new by reference is deprecated in /Users/username/bin/pear/temp/PEAR....
How do I tell if my script was accessed as http://localhost/myfile.php or, for example, http://222.22.22.22/myfile.php? I need to get the 222.22.22.22 part as a string ...
Hello! I have a problem with writing cookies in cakephp and even don't know how to debug it or where too look for a clue. I've inherited a project where cookie were only created using the Session component, of course i added 'Cookie' to $components array in app_controller and put this in beforeFilter: $this->Cookie->name = 'foo'; $this...
So I have a .png file. I am using windows OS. How can I embed my png file/image into (blank by default) file.html so that when you open that file in any browser you see that image, but the file is not anyhow linked to it - it is ebbeded into it? Step by step instructions would be nice. ...
What I'm doing I'm pulling an image from the database and sending it to the browser with all the proper headers - the image displays fine. I also send an ETag header, using the SHA1 of the image's content as the tag. The images are getting called semi regularly, so caching is a bit of an issue (won't kill the site, but nice to have). ...
Each item in my array is an array of about 5 values.. Some of them are numerical ending in "GB".. I need the same array but with "GB" stripped out so that just the number remains. So I need to iterate through my whole array, on each subarray take each value and strip the string "GB" from it and create a new array from the output. Can a...
I am trying to create an array for years which i will use in the DOB year piece of a form I am building. Currently, I know there are two ways to handle the issue but I don't really care for either: 1) Range: I know I can create a year array using the following <?php $year = range(1910,date("Y")); $_SESSION['years_arr'] = $y...
In smarty is it possible or is there any kind of function to render a template and return the result? for example: $rendered_content = $smarty->render("content.html") ...