Hi,
It's possible to know if a MySQL server is overloaded (with PHP), and if it's overloaded show a static page (something like Twitter's fail whale)? How can I do it?
Thanks!
I need a regular expression which replaces a string like this
"Myname _MySurename" with "Myname"
that means i just need Myname, so _MySurename should be cut.
i tryed something like "/_*/" but that replaces just the _ (underscore)
how can i do that in PHP ?
Hi there just wondering;
How do i deny direct access to files in a specific folder. I have an upload script that uploads to /uploadedFiles and currently i just have an index.php which redirects the user to the login page however how do i stop users from accessing a file directly such as;
www.myurl.com/uploadedFiles/thisFile.jpeg
Thanks in…
Is there a function in PHP that can decode, for example "\u00ed" to "í" and all other similar occurrences?
I found similar question here but is doesn't seem to work.
Hello,
Does anyone know how to retrieve a piece of data and display the results in php file?
A similar query that I would enter is something like this:
SELECT 'email' FROM 'users' WHERE 'username' = 'bob'
Thus, the result would be just the email.
Thanks,
Kevin
I have two Fedora-based apache webservers making the same SSL PUT/POST calls with php/cURL. One works fine, but with the other the call succeeds but takes a VERY long time to return a response (~10 min). (GETs don't seem affected)
The working server's cURL uses OpenSSL for SSL, while the non-working version uses a later version of cURL that…
I have always been confused that .e,g in php i have sql statement
$qry = "select * from table where id = $id";
now can i insert "$" directly inside the quotes or i have to use
$qry = "select * from table where id =".$id." ";
or
$qry = 'select * from table where id = $id';
or
$qry = 'select * from table where id = '$id'';
…
Hey,
The PHP SOAP client is constructing a soap request that uses "href" to reference other parts of the message. The web service i'm trying to consume does not like this. Is there a way to force it to construct the soap envelope without references?
Thanks in advance
Hi every body I am uploading file with php
every thing is fine but move_uploded_file is not working
every variable displayed record and all permission for file is set
function uploadfile($filename)
{
$filetype=$filename["type"];
$filename=$filename['name'];
$filetempname=$filename['tmp_name'];
…
Just a little confused here...
I have a function in postgres, and when I'm at the pg prompt, I just do:
SELECT zp('zc',10,20,90);
FETCH ALL FROM zc;
I'm wondering how to do this from php?
I thought I could just do:
$q = pg_query("SELECT zp('zc',10,20,90)");
But, how do I "fetch" from that query?
I have looked over the PHP list of supported timezones, but the whole list is a little long to include in a drop-down menu, for the user to select his or her timezone. Is there a list with the main city/area on that can be used?
My geography is terrible and add that to not knowing all the area and which timezone…
Hello,
I want to be able to read any random RSS/ATOM XML file. That would mean I would not not know the tags, start the loop and the fields. How do I go about doing it in PHP.
Thanks
Jean
Hi All,
I am using mysql_real_escape_string($_REQUEST['page']) in my code. Is it able to prevent SQL Injection in my php code else i will have to do more protection ?
Thanks
I'm looking for a PHP CMS which can let me to:
1-Uploade and manage files ( pdf, words..) between users by allowing to view, to print or to download.
2-Know who accessed what and when, who download what and when... who do what and when.
Hello,
I'm still quite new to CodeIgniter and I was wondering, where should I place my PHP functions that has nothing to do with Controllers and Views, for example, a function that access a local file.
Thank you.
I am trying to convert a block of text that contains html text - i'd like to find all http links and convert them for link tracking purposes.
So eg anything like this in a string would be converted to the latter
<a href="http://www.google.com">Some Link</a>
<a…
I am trying to workaround CORS restriction on a WebGL application. I have a Web Service which resolves URL and returns images. Since this web service is not CORS enabled, I can't use the returned images as textures.
I was planning to:
Write a PHP script to handle image…
Hello,
I have:
$page_file_temp = $_SERVER["PHP_SELF"];
which will output: /templates/somename/index.php
I want to extract from that path only "/templates/somename/"
How can I do it?
Thanks!
we are going to develop proxy and sock4 and sock5 servers they will provide the list of proxy servers.in the site we need to maintain that list and when user want select particular proxy there will be one pop up window open in that have proxy and socks server field. how…
Hello there!
If I have a code like this:
$file = basename($filename);
How do i get the file extension of $file? The variabel file could contain any kind of file, like index.php or test.jpeg.
I can't seem to get the correct Unix epoch time out of this PHP DateTime object.
$startingDateTime = "2005/08/15 1:52:01 am";
$foo = new DateTime($startingDateTime, new DateTimeZone("America/New_York"));
echo $foo-format('U');
which gives
1124085121
…
Hi friends,
I've spent all day to find but can't find :(
How can I display CCK Field value with php in views_customfield? I tried the ones below, but no result
$node->field_homepage_linking["0"]["view"]
$node->field_homepage_linking["0"]["value"]
…
How do I delay a PHP script that writes to a text file and then reads from the same file long enough to make sure changes have been written before I attempt the read?
I'm looking for an open source php form builder or form generator to add/edit/delete/search records?
I have to create a simple manager for some records, it's a common application that should be found easily, but I can't find any good…