How to remove all types of quotes (different languages) from $string? Answer I assume you mean quotation marks? Otherwise, go for some regex, this will work for html quotes for example: C-style quotes: CSS-style quotes: bash-style quotes: Etc etc…
PHP passing $_GET in the Linux command prompt
Say we usually it access via How do we execute the same on a Linux command prompt? But what about passing the $_GET variables? Maybe something like php -e index.php –a 1 –b 2 –c 3? I doubt that’ll work. Answer Typically, for passing arguments to a command line script, you will use eith…
How to disguise your PHP script as a browser?
We’ve been using information from a site for a while now (something that the site allows if you mention the source and we do) and we’ve been copying the information by hand. As you could imagine this …
MySQL sorting single field in multi orders
hi i am trying to sort a field with multiple orders for example here is my table 1st rule is to sort by Status. in following order: Active, Inactive, Merged, Promo A, Promo B, Promo C, Promo D, Defunct Once they are sorted like this within each of these categories the 2nd rule in following Order: Traditional,…
PHP – Uploading multiple files
I’m working on a plugin for wordpress and I want to be able to upload multiple pictures from a form. Right now when I have a form for two pictures and submit it empty, my $_FILES array looks like this: Now the problem is that I want to use wordpress’ upload handler, wp_handle_upload. It expects th…
Message: Undefined index: REMOTE_HOST in $_SERVER
Why do I get this error when I try to retrieve host name of remote user ? Message: Undefined index: REMOTE_HOST When reading documentation I came to know that it needs to be enabled in httpd.conf. …
I need a free php bug tracker [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed 1 year ago. Improve this quest…
How can I use Basic HTTP Authentication in PHP?
I’m trying to use Basic HTTP Authentication and followed the example on the PHP manual page. But it doesn’t work for me. The variable $_SERVER[‘PHP_AUTH_USER’] doesn’t seem to be set. When a user try to log in, the user is prompted whith a new login-dialog. The server is running …
How to detect whether a PHP script is already running?
I have a cron script that executes a PHP script every 10 minutes. The script checks a queue and processes the data in the queue. Sometimes the queue has enough data to last over 10 minutes of …
session wiped out between pages
I’m making a login page and for some reason the session will not persist between where I set it and the page where I am forwarding to. I can comment out the header in the page where the session was initialized and see that the session has the data in it. However, when I do a print_r in the target