I set a header in the following way:
header('Content-Length: ' . filesize($strPath));
On my PC with ZendServer it works fine and I can download a file with the correct file size. On the production server, a Solaris with Apache and compiled PHP, I get a file with the file size equal to zero, so an empty file.
Is there a config paramet...
Helllo All,
I'm looking to aggregate photos from various streams into one stream in a similar manner as to friend feed.
I'd like to be able to watch flickr and picasa and other sites with RSS feeds of my choosing and then create a timeline of top photos.
For example, assume that X's below are photos:
Event Name -- March 15th
X ...
Directory is something like:
home/
file1.html
file2.html
Another_Dir/
file8.html
Sub_Dir/
file19.html
I am using the same PHP Zip class used in PHPMyAdmin http://trac.seagullproject.org/browser/branches/0.6-bugfix/lib/other/Zip.php . I'm not sure how to zip a directory rather than just a file. Here's what I hav...
INTRODUCTION
I'm using excel downloads as a way of users downloading a score sheet,
filling out scores and then re-uploading this score sheet into the
system.
Part of this requires the data in the database to be put into a CSV.
Then its opened on the client computer.
PROBLEM
The problem I'm having is that the CSV does not allow me to...
I am going to create a script that sends out an email. I am currently using PHPMailer. I have been told that they would like the email to request a receipt from the user indicating they read it. (like what you often see in outlook). I have no clue if this is possible. Can anyone tell me if this is possible and if so how to do it?
Thanks...
Hi %,
I've found a strange behaviour in pdflib while trying to get a text
rotated in a table, in order to save page space.
The pdflib documentation states, that:
fittextflow={rotate=90}
Should produce the effect I want. The strang is, that my pdf creation
codes failes to run, loging:
ExceptionHandler: cell in column(s) 1 and row(s...
It appears the class constants only cover PDO::PARAM_BOOL, PDO::PARAM_INT and PDO::PARAM_STR for binding. Do you just bind decimal / float / double values as strings or is there a better way to treat them?
MySQLi allows the 'd' type for double, it's surprising that PDO doesn't have an equivalent when it seems better in so many other way...
Is it possible to suppress the status messages set by drupal_set_messages() for certain roles? One client does not want certain roles (anonymous) to see these messages.
...
Hello All,
I have a set of integers that I would like to change to a US money format.
Here are some examples of what I would like to do. The first number is what is in the database and the second is what I would like the money format to look like.
4500 = $45.00
395 = $3.95
19000 = $190.00
I'm really just unsure what function...
Hello, how do i make so when you click on this image you will begin to download it?
This is my code
} elseif (isset($_REQUEST['animeinput']) && !empty($_REQUEST['animeinput'])) {
echo "<a href=\"sig.php?user=".$_REQUEST['user']."&anime=".substr($_REQUEST['animeinput'],0,32)."&color2=".$_REQUEST['color2']."\"><img type=\"im...
I have a table with some fixed columns id,title,created.., but there I need put some optional data from the user that I cant define a specif column, but I need this data for search from others users. What the best way?
Store a serialized array
Leave some column optionals (
exemple:leaves any 10 column
opt1,opt2,opt3...)
Create a new ta...
I am building a employees page.
Some of the information goes into an 'employees' table but some of it goes into a 'availability' table that is referenced to the 'employee' table:
availability:
id / employeeid (unique id from employees table) / monday available / and on and on /
So I don't have that unique ID from the employees table ...
What is efficient way to determine if a list is a subset of another list?
Example:
is_subset(List(1,2,3,4),List(2,3)) //Returns true
is_subset(List(1,2,3,4),List(3,4,5)) //Returns false
I am mostly looking for efficient algorithm and not too concern how the list is stored. It can be stored in array, link list or other data struct...
I am maintaining a C# app that's been cracked by people creating spoof auth servers.
I want to encrypt all the communications between the client and server to prevent this happening to my next release.
I can see that PHP has a way to secure stuff.
http://www.php.net/manual/en/function.openssl-private-decrypt.php
What I can't find ...
$conn = mysql_connect('localhost', 'root', 'xyvz5j');
mysql_select_db('rata2', $conn);
How can I do so this so that it won't print a lot of garbage like "Failed to connect" or something (if there's a MySQL error)?
...
Hi,
I'm working with a framework, but for sometimes I need to alter some methods by overloading classes.
My problem is when a class B inherits from a class A and where I need to overload them both, eg:
class B extends A {}
First I overload A and B, in order to alter some of their methods:
class AA extends A {}
class BB extends B {}...
Hi,
I'm just starting out to develop my first facebook app in php and I'm having difficulty
installing the library files onto the server that I'm using(hyperphp).
I've copied all the files (facebook.php, +2 others) into the folder with my index.php file, but I can't get the
sample facebook code to work. It can't seem to access the li...
I'm looking for something like http://validator.nu/, I'll be validating html input ( string ) and I want to notify the user if there are any missing end tags, whether a certain element can't have a certain attribute, things of that nature ( HTML 4.01 Strict validation basically ).
Sidenote: I won't be dealing with XML/DTDs, and I don't ...
My PHP web application is divided into modules, and I use the data model and data mapper patterns. My mapper methods are static, and they exist specifically to interact with the database.
I have the following method:
ModuleMapper::getRecordCountByModuleIdAndSiteId($moduleId, $siteId)
This method is only meant for a set list of module...
From a maintenance and code organization standpoint, in PHP5, does it make sense to create/define objects and classes for XML data coming from a web service?
Using Twitter's API as an example, I would have a class for each API method (statuses, users, direct_messages, etc). For statuses/public_timeline, I would have something like this...