When users input their images, their images are any size. I want to be able to resize all the images to a specific dimension. Is there a function that allows me to do that in PHP?
thanks
I understand that I can set the option on any specific instance, however what I would really like is to set something up php.ini or somewhere similar which will handle this across all projects and all instances.
Does anyone know a way for me to accomplish this?
Hi,
I have a common script which Im including in my php cron files and the files which are accessing through the browser. Some part of the code, I need only for non cron files. How can I detect whether the execution is from CLI or through browser (I know it can be done by passing some arguments with the cron files but I dont have access to crontab). Is there any other way ?
Regards
Binoy
can any one please let me know is there any way to grab a screen shot of a web page when we pass the URL as parameter. I have a requirement to capture a screen shot of that page when posting a blog.
This i need in php script.
I guess if it is possible, that it will be some crazy convoluted way, but my client has asked me to try to create a log file of people who log in to the site.
Is there a way to do this? I don't know php/smarty so well, I'm more of a layout person.
Thanks.
This is the solution for linux:
http://stackoverflow.com/questions/45953/php-execute-a-background-process/45966#45966
Is there one for windows?
Maybe this?
start "window1" /min cmd.exe /c batch1.cmd
But I don't know what it does exactly:(
Where can I find tutorials about creating a social network (like db structure, sql query samples eg.) using PHP & MySQL ? I do not need a ready script, I just want to learn how to do it..
I recently asked a question regarding the resolution of dependencies between Unit of Work and Data Mapper classes: http://stackoverflow.com/questions/3012657/dependency-injection-and-unit-of-work-pattern - (which was answered by Gabor de Mooij - thx)
In PoEAA, Martin Fowler suggests using Separated Interface to manage these dependencies. My question is simple - is it actually possible to implement this pattern in PHP, or is it specific to Java interfaces? I've searched high and low and it's hard to find references to this pattern anywhere outside of PoEAA.
Just wondering if there are any good tutorials on PHP/MySQL on the web that's free. I looked at youtube and the tutorials they have there are a bit too easy.
here's a definition of marshaling from Wikipedia:
In computer science, marshalling
(similar to serialization) is the
process of transforming the memory
representation of an object to a data
format suitable for storage or
transmission. It is typically used
when data must be moved between
different parts of a computer program
or from one program to another.
I have always done data serialization in php via its serialize function, usually on objects or arrays. But how is wikipedia's definition of marshaling/serialization takes place in this serizalize() function?
Hi,
As far as I know when writing a conditional statement in C such as the following:
if ( some_function() == 100 && my_var
== 5 ) { //do something }
is slower to execute than
if ( my_var == 5 && some_function() ==
100 ) { //do something }
because it's faster to execute the my_var == 5 rather than all of the code in the function ( because if my_var != 5, then the rest of the if statement would not even be executed )...so I am wondering if the same is true for conditional statements in PHP?
What sort ort of programming paradigm (sockets,RPC,Web services,Distributed objects middleware) is usually used between web server and application server in PHP n-tier architecture?Whats the difference of using DOM or Web services for this purpose?
In my php application, I'm using $_SESSION to track whether a user is logged in. If a user leaves any page on my site at http://mysite.com and goes to http://someotherwebsite.com, I want to automatically log them out, such that if they return to any page on http://mysite.com, they need to login again.
Is there an easy way to do this?
Hello. Does anyone know how I can make a live chat on a webpage? Maybe using PHP and have the text stored into a database? If so, how could I get the text to automatically show on the users live chat, without refreshing?
Any ideas? Thanks.
Is there free and good line-level profiler for PHP? I'm using xdebug and it's relatively good but it gives me function level output and sometimes it's hard to see where exactly all the time spent in the function goes.
We all know the infamous "cannot redeclare class" error. Is there any method to overcome this and actually declare a new class with the same name, or is this impossible in PHP 5?
How a programming call is usually made between web server and application server in a PHP n-tier architecture when the servers are on separate machines in the network?Whats the difference of using DOM(Distributed object middleware) or Web services for this purpose?
I am looking to start a community based on user posted scripts such as bashrc, screenrc, aliases, etc.
Does anyone know of a web application in PHP that would do that?
I am not looking for a snippet program, or a link directory.
Users can store linux/UNIX/Windows configuration files, as well as maybe an option to attach a screenshot.
I know that I can use DOMDocument and DOMXPath to manipulate XML files. But, I really love JQuery, and it would be great if there was something more like JQuery in the PHP world that I could use for sever side DOM manipulation.
NOTE: I'm only interested here in how
JQuery Selects and Manipulates the DOM, not all
the other parts of JQuerry (I guess
you can say just the Pop and the Sizzle
parts).
Hi
How do I know how many seconds it will be until a php session expires?
I'm building a web application where users might spend a lot of time typing into big text fields, but for security reasons I still want sessions to time out after a reasonably short period. I want to warn them if their session is about to expire so they can save or take some other action to keep it alive.
Any tips?
thanks!
Hi there,
I have a php site that lets registered users login (with a valid passord) and sets up a session based on their UserID. However I'm pretty sure thisis being hijacked and I've found "new" files on my server I didn't put there. My site cleans all user input for SQL injections and XSS but this keeps happening. Has anyone got any ideas on how to solve this?