On a Win2k server, using a WAPP stack (Windows,Apache,PostgreSQL,PHP). Running a PHP web application. Also tested using PHP interactive console.
The datetime is reported correctly, but for some strange reason the timezone is reported incorrectly:
php -a
<?php
echo date('c');
2009-04-19T16:52:35-04:00
C:\WAPP\php>time /t
17:06
C:\...
hello,
i have a page that shows a value from session, lets call it www.domain-a.com/master.php and if i type it directly from the browser, it shows me the session value.
but when i try to download it with file_get_contents (or other method) from another domain, like www.domain-b.com/slave.php, it is not retrieving the content protected...
Hi, I am going crazy starting off with Web Services. I am trying to call the following WSDL using PHP and keep getting nowhere:
http://webservices.sabre.com/wsdl/sabreXML1.0.00/usg/SessionCreateRQ.wsdl
I found the following piece of code on the net, from someone with similar problems, but I could not get it to work either:
$soap = new...
I'm currently displaying a random row from all the entries and that works fine.
SELECT * FROM $db_table where live = 1 order by rand() limit 1
now, i'd like to limit it to the last 100 entries in the db.
every row in the db has an ID and a timestamp.
it's a small database, so overhead-minimization is not a priority.
thanks!
EDIT:...
What is the best way to use a successful WordPress sign-in attempt to authenticate to a CakePHP application? I don't want to use password synchronization, if at all possible. I'd prefer to keep all of the user details within the WordPress database tables. I've been rolling this over in my mind this weekend and can't think of a good solut...
Hi I am trying to redirect all links to any pdf file in my site to a page with a form in it that collects user info before they can proceed to download/view the pdf.
Eg
I want to redirect *.pdf files in web site to request.php?file=name_of_pdf_being_redirected
Where request.php is the page with the form on it asking for a few details ...
I am in the middle of making a script to upload files via php. What I would like to know, is how to display the files already uploaded, and when clicking on them open them for download. Should I store the names and path in a database, or just list the conents of a directory with php?
...
So far, I've made sure I've installed libpng and libjpeg with DarwinPorts (I'm running on OS X Leopard), but that doesn't seem to do the trick. I've read in a number of places that you need the development files (i.e. libpng-devel, etc.) as well to make this work. I'm a little lost. Can someone help me understand what I'm supposed to ...
I have a page to edit user information, and I wish to show the current information and allow it for editing, to avoid overwriting existing information.
At the moment, I am fetching the data and displaying it in a text area like so:
$usernameQuery = "select username, firstname from USERS where username = '" . $con->escape_string($userna...
I've been coding php for a while now and have a pretty firm grip on it, MySQL, well, lets just say I can make it work.
I'd like to make a stats script to track the stats of other websites similar to the obvious statcounter, google analytics, mint, etc.
I, of course, would like to code this properly and I don't see MySQL liking 20,000,0...
Hi all,
I myself am one of these types of coders, who never learned coding in a formal setting, but am instead, self-taught by the use of copy and paste scripts, and pre-authored works available through GPL projects and premium software's(which is often the way commerical script companies show you how to change, or update code in their ...
I've tried following the PHP.net instructions for doing Select queries but I am not sure the best way to go about doing this.
I would like to use a parameterized Select query, if possible, to return the ID in a table where the name field matches the parameter. This should return one ID because it will be unique.
I would then like to us...
Hi All
I am looking for an advanced open source pop3 class for php. For outgoing mails im using phpmailer, and i need pop3 class to handle incoming mails(read, delete. decode).
Thanks for reading and your help would be highly appreciated
...
I am looking here for some hints and tips on how to manage multiple versions of a projet.
Currently I have a development version of the application which includes some improvements and new functionnalities. In meanwhile I have to do some bug resolving. It is easy to fix the bugs on files that have not been touched by new functionnalitit...
Hello,
I am trying to do a mysql dump via php.
This is the code
$backupFile = $table. "-". date("Y-m-d-H:i:s") . '.gz';
//Command nog aanpassen....
$command = "mysqldump --opt -h $dbhost -u $dbuser -p $dbpass $dbname | gzip > $backupFile";
//$status = system($command);
echo $backupFile ."<br>";
$status = passthru...
I have a SimpleXMLElement object $child, and a SimpleXMLElement object $parent.
How can I add $child as a child of $parent? Is there any way of doing this without converting to DOM and back?
The addChild() method only seems to allow me to create a new, empty element, but that doesn't help when the element I want to add $child also has...
I'm working with arrays of image filepaths. A typical array might have 5 image filepaths stored in it.
For each array, I want to pull out just the "best" photo to display as a thumbnail for the collection.
I find looping and arrays very confusing and after 4 hours of trying to figure out how to structure this, I'm at a loss.
Here are...
I have the following prepared query I am using with mysql and php. It is to allow users to be added to a particular category, passed in via $subcat.
$alterQuery = "UPDATE AUCTIONS SET subcat= ? WHERE article_no= ?";
if ($altRecord = $con->prepare($alterQuery)) {
$altRecord->bind_param("ss", $subcat, $pk);
$altRecord->e...
I'm using strtotime to create a timestamp from some ropey XML, but the timezone is incorrect.
How can I remove 5 hours from the time?
...
I am retreiving a feild from a database, into $subcat. If $subcat is null, I want to show the form to add to a category, otherwise I want to display the category. $subcat definitly exists and is correctly retrieved. It is either null or a string.
if ($subcat != null) {
$showCategory = "<p><strong>Auction Category: </strong> ".$tmp['subc...