I have a C# application that communicates with a PHP-based SOAP web service for updates and licensing. I am now working on a feedback system for users to submit errors and tracelogs automatically through the software. Based on a previous question I posted, I felt that a web service would be the best way to do it (most likely to
Tag: php
How can I allow a download to pause/resume?
Normally, when I want to allow a user to download a file without revealing the exact location, I just use something like this to let them download the file: But if they are using a modern browser or other download client, and they pause the download and try to resume it, the script (assuming they are still authenticated or whatever)
Return a PHP page as an image
I am trying to read a image file (.jpeg to be exact), and ‘echo’ it back to the page output, but have is display an image… my index.php has an image link like this: and my php script does basically this: 1) read 1234.jpeg 2) echo file contents… 3) I have a feeling I need to return the output back
Sanitizing form data in PHP
Is it possible to sanitize all input sent by one method in PHP by simply doing and then access elements of $var as I would have of $_POST ? Answer I don’t think you can call mysql_real_escape_string on an array. But this would work array_map works by calling the function named in quotes on every element of the array passed
Split text using multiple delimiters into an array of trimmed values
I’ve got a group of strings which I need to chunk into an array. The string needs to be split on either /, ,, with, or &. Unfortunately it is possible for a string to contain two of the strings which needs to be split on, so I can’t use split() or explode(). For example, a string could say first
How to base64-decode large files in PHP
My PHP web application has an API that can recieve reasonably large files (up to 32 MB) which are base64 encoded. The goal is to write these files somewhere on my filesystem. Decoded of course. What would be the least resource intensive way of doing this? Edit: Recieving the files through an API means that I have a 32MB string
PHP Pass variable to next page
It seems pretty simple but I can’t find a good way to do it. Say in the first page I create a variable And the form’s action for that page is “Page2.php”. So in Page2.php, how can I have access to that variable? I know I can do it with sessions but I think it’s too much for a simple
How to access the form’s ‘name’ variable from PHP
I’m trying to create a BMI calculator. This should allow people to use either metric or imperial measurements. I realise that I could use hidden tags to solve my problem, but this has bugged me before so I thought I’d ask: I can use $_POST[‘variableName’] to find the submitted variableName field-value; but…I don’t know, or see, how to verify which
ASP.Net (C#) & SQL Server -or- PHP & MySQL for performance? [closed]
Money, Staff, Skill and preference to open source or commercial is neutral. Let’s take the best of the best programmers (for arguments sake) and think about this: What will perform better overall: …
Why can’t CakePHP bake connect to MySQL running under EasyPHP on Windows Vista Ultimate?
I have CakePHP (cake_1.2.2.8120) and EasyPHP (3.0) installed on Windows Vista Ultimate. I followed the “baking” tutorials online and successfully set the database connection with the “cake bake” command from the CLI. I baked the controller for my “Users” table using the “php cake.php bake controller Users” command – worked fine. However, when I tried baking the view similarly, I