Hello All,
I'm sure there is a simple answer to this, but I have been fumbling with everything for almost a week now and surrender. I am trying to build a shopping cart app and every coding solution I build will work when I include the code on the same page, but when I try to use an external page to run the function it does not seem to r...
I've found a PHP script that lets me do what I asked in this SO question. I can use this just fine, but out of curiosity I'd like to recreate the following code in Python.
I can of course use urllib2 to get the page, but I'm at a loss on how to handle the cookies since mechanize (tested with Python 2.5 and 2.6 on Windows and Python 2...
Any Ideas? I asked the question "Is it possible to have a default parameter for a mysql stored procedure?" today and the answer was a very strong "no this is not possible."
So my next question then is how do you as a php/mysql developer handle this problem? Do you pass null and in the SP have an IF block that sets the variable if its nu...
We have a SOAP-based webservice that our client uses to validate their updated live streaming video URLs. We implemented this service so our client can rotate their live streaming publishing points multiple times a day to obscure their location.
The problem is that we do a number of checks on our end to validate these new publishing poi...
Whenever a new user signs up on my site, I want to do some pre-processing to shorten their searches in the future. This involves anywhere from 30 to 2 minutes processing time. Obviously I cannot do this when they click the submit button on signup... or on any PHP page they visit. However, I would like this done within 5 minutes of the...
I have a PHP script that needs to be run at certain times every weekday. Is cron or Windows task scheduler the only way to do this?
Is there a way to set this up from within another PHP script?
...
I want to manage error message display control,
and I Googled for a while,
and I found that there are several ways
to do it.
which method do I have to choose?
The thing I want to do is that
I don't want to PHP
shows up any
errors on users display,
on Production Server.
...
It's a bit of a leading question, I know, but this question came up in a PHP Users group discussion and I was interested to see if there were any studies done comparing the two (regardless of who "wins").
I can see there are many tangibles to compare in licensing, IDEs, hosting, etc., as well as the intangibles of amount of time spent o...
I'm doing some pro-bono work for a non-profit and need to cobble together some functionality, preferably without rolling it all myself. Here's the synopsis:
I have a CRM-like system that has Persons and Groups (made up of Persons). I want to set up:
A dynamic email routing, so [email protected] is routed to the Joe User's email (...
I need an application to be running in the background on my web server, but I need to be able to start/stop the application with root privileges.
In order to do this, I want to have a service running that has root privileges, so that it can kill the application, and start it up again if need be.
Finally, I need to be able to send the s...
Hey
I'm working with a SQL Server stored procedure that returns error codes; here is a very simple snippet of the SP.
DECLARE @ret int
BEGIN
SET @ret = 1
RETURN @ret
END
I can get the return value with the mssql extension using:
mssql_bind($proc, "RETVAL", &$return, SQLINT2);
However, I can't figure out how to access the return va...
i m trying to fetch random no. of entries from a database by using SELECT QNO FROM TABLE ORDER BY RAND() LIMIT 10
it returns a column of databse
if i want to save all the entries in a array then which php function is to used to save the column................
...
A weekly mp3 is uploaded to an external server.
I manually copy this to my server and link it for podcasting and archive etc.
The external file is then replaced the following week.
I can copy the file directly to my server when available:
copy("http://source.com/file.mp3", "newfile.mp3");
I need to know when the file is available b...
I am trying to make an online kickstart config file creator. After the file is created on the server how do I get the download dialog to pop up so the user can download it?
...
PHP allows you to send RAW HTTP headers, which must be sent before any of the content.
For instance(straight from the PHP documentation):
<?php
// We'll be outputting a PDF
header('Content-type: application/pdf');
// It will be called downloaded.pdf
header('Content-Disposition: attachment; filename="downloaded.pdf"');
// The PDF sour...
.htaccess files are not my strong point.
I have document uploads going to /uploads. The user should be able to view the documents they've just uploaded by clicking on the document link that appears via ajax after uploading is completed.
However, I would like to be able to password protect the /uploads folder BUT still enable the curre...
What is encapsulation with simple example in php?
...
I want to retrieve the first 10k bytes from a URL with curl (using PHP in my case). Is there a way to specify this? I thought CURLOPT_BUFFERSIZE would do this, but it just appears to determine the size of a buffer that is reused until all of the content is retrieved.
...
I have current PHP codebase written in procedural (mainly) style that our client is using for some time now. What we want is to "strangle" (as in concept Strangler Application) that code and add Zend Framework to enable new development.
What I have now is custom route that routes all "old" HTTP request to one controller (i.e. Strangler ...
simple one really, i've written a regular expression to find and replace tags with php constants from within a html snippet. my solution, which works, just doesn't feel right. how can this be improved?
preg_match_all('/\{CONSTANT_(.*)\}/', $final, $result, PREG_PATTERN_ORDER);
for ($i = 0; $i < count($result[1]); $i++) {
...