I have a PHP application.
I allow users to upload files to my web application.
Question: What's the best way for me to sanitize the file names of the uploaded documents $_FILES["filename"]["tmp_name"] in PHP?
UPDATE:
Can I take an MD5 of the uploaded filename and use that as the newly assigned filename? If so, how do I do that in PH...
I'm building a webapp. HTML+AJAX <--> PHP <--> MySQL; very traditional. What I need to do is have some state that all sessions can read from, and something that drives state changes even when there are no users looking at the site.
A simple example would be a counter. We start the counter running from zero, and then whenever any use...
I have a site who's search ranking has plumetted. It should be quite SEO friendly because its built using XHtml/CSS and has been run against the SEO toolkit.
The only thing I can think that may be annoying Google is
The keywords are the same accross the whole site rather than being page specific. (cant see why this would be a massive ...
I've seen some of these...:
@media print { ... }
@media screen, handheld, print, projection { ... }
@media all { ... }
@media all and (property:value) { ... }
@media screen and (property:value) { ... }
@media only screen and (property:value) { ... }
@media screen and (property:value) and (property:value) { ... }
@media screen and (prope...
This is not language specific. What are the best methods to limit how many times a person may submit a web form, not knowing any info about that person. Example: Voting for the all star game online, only allowed 1 per 24 hour cycle. Something where you don't have to "log in". My thoughts were:
Use Captcha to keep bots at bay
Drop a...
Is there any way to access the current instance of CodeIgniter from an error page? For example, I want to load views from application/error/error_404.php, but using $CI =& get_instance(); to get a reference to the CodeIgniter system doesn't work. Is this a limitation of working in error pages, and are there any workarounds?
...
So all of the pages on my web application have URIs of the form http://www.example.com/#some-hash and the like. But of course, if the user visits http://www.example.com/some-hash they should get redirected and experience the site in its usual glory.
OK, no problem, right? Just write some kind of global HTTP request interceptor that auto...
Hi,
We are using the ebay API "findItemsByCategory", and we want to filter the results based upon the location, for example mountainview, phoenix, miami, brooklyn etc.
Is there any way to do that?
Another thing is, if we get zero results for some location, then we want the results for a location which is nearby to this location. How c...
I have a modal popup I am using to get some data from the user and save back to a table. I have them pick a customer and then create checkboxes for each shipto associated with that customer. I want the user to be able the select from the shiptos and then I want to save the choices to the database. I get the list of customers and creat...
I've got the following...
<hr style="color:#292929;background-color:#292929;"/>
but the colour isn't changing to the HTML colour code I've declared. Why not?
...
How do I make a huge organization upgrade from IE6 to something....better?
Think tens of thousands of people.
Although funny solutions will be read gladly, corporate people are, sadly, without any kind of a sense of humor.
...
how can i use expose prive gallery in joomla?
...
I am in the process of creating a web app. Since I admire the directness of Twitter's URL scheme for user pages, I'm trying to emulate them. I'd like my users' profile pages to be available at http://myapp.com/user_chosen_identifier. Right now I have some basic code for ensuring RFC3305 compliance with what I put in a URL, but I'm more...
I'm designed a web application in PHP which conects to a database in MySQL, this application will generate reports according to the fields that a user choose from diferents tables, there is a way to do this, preference by code. (and software tool is acceptable too)
...
Hi, I'm developing a web-project based on Spring (MVC), Hibernate, PostgreSQL (using Maven). Now I'm trying to get a new customer who requires some differences in several parts of the application. I've read the Maven Definitive Guide from Sonatype to get a feeling about Multi-modules Maven Projects but one of my most important questions ...
Hey Folks,
I am developing a project using J2EE and Spring ..
I need to create JAVADOC [API] inmean time i nedd the CSS File of
Spring Source API
Please help me with this.
...
Hey there, I'm kinda stuck trying to optimise a query which has a NOT EXISTS clause on a nested SELECT. I've been rewriting my queries containing nested selects, changing them to joins, but on this occasion I'm not sure how to combine that with the NOT EXISTS clause. I have the following query:
SELECT `reg_no`, COUNT(*) AS `records_foun...
I have an app. that displays objects and tags related to these objects (not a very original app). One difference is that tags have "types". Most have the simple type=object, but others have type=file. Depending on the tag, they will have different renderings. For example clicking an object tag shows other objects that match, but on the f...
Client is building a web based Digital Asset Management system. Here is the scenario: We have a large file, say 100 MB or more. Client needs to track both when a download of that file is requested (easy) and then if that download was successful. The large file takes a while to download, so almost needs some kind of callback of when t...
I've been looking for a system which performs installation of other CMS systems on the server, is there any solutions?
...