Hi,
Is it possible to have Javascript compute a timestamp returned from php's time() function and present it in a readable format such as "Sun, 18th April 2010 at 4:00 pm"?
Thanks:)
Hi,
I want to get time zone through IP Address in PHP. Actually i have an application which will run at the client machine. I have IP address of client machine. But not able to get the time zone for each client machine.
Please reply me.
Thanks
Devesh M
As far as file permissions are concerned, when you use a php script to unzip a tar file, who is the "owner" user of the files created?
I'm wondering if its my ftp user because I uploaded the script file? Or does apache own the file? I know their are flags to be set to preserve the original permissions which I don't want (files where created and archived by someone else). I want my user to be the creater/owner of the files.
Hi, I'm looking for a grid control for a project I'm doing in PHP.
Are there any good recommendations?
Ideally, it'd have a data entry mode similar to a spreadsheet where the user could enter row after row after row, without needing to click new/edit buttons or links.
Can anybody point me towards a PHP library or script that would allow me to split a pdf consisting of multiple pages into separate files, each containing 1 page. The PDFLib documentation doesn't appear to allow this and Google hasn't been particularly helpful.
I could possibly also use Perl, but it would be very inconvenient to do so.
Hi,
I'm sending email with PHP's mail function.
It works just as it should except all email clients show blank From-field.
Here's how i'm using the function:
mail( '[email protected]', "Example subject", $msg,
implode( "\r\n", array( Content-Type: text/html; charset=UTF-8', 'From: [email protected]') ) );
As i said everything works fine except From field is all blank when the message arrives.
Any ideas why this is happening?
I have a php script that execute a bash script. I try to pass parameters like this:
$script="/opt/lampp/htdocs/adapt.sh"
$file="/opt/lampp/htdocs/videos/video1.mp4"
$prefix="Test"
exec ('.$script.' '.$file.' '.$prefix.');
What's wrong? How can I pass the parameters?
I want to write a PHP script to output some data as a plain-text table using spaces to get the data into columns (just like the Linux top command). I can't use a HTML table as the script output will be saved to disk and viewed in a plain-text editor.
Is there anything available that can do this automatically (format the data into columns)?
Hi.
I'm looking for a jQuery Plugin to create a graph like that http://www.panic.com/blog/2010/03/the-panic-status-board/. To update the graph every x miliseconds from a PHP page and the numbers that are on the top. Is it possible?
Do you know any plugin that does that? Thanks!
Hello.
I want to fetch all my emails available in different online accounts eg:(gmail, yahoo, hotmail, aol, etc..) using PHP such that if necessary to reply any email then I could reply.
How it is possible?
I am trying to use an update query to change values held in a database, the new values I am trying to store are held in php variables. I'm not sure what it is I'm doing wrong.
mysql_query("UPDATE user SET
status='full' WHERE user_id =
'$user_id'")or die(mysql_error());
thanks in advance
I have a set of 5 HTML dropdowns that act as filters for narrowing results returned from a mySQL database. The three pertinent filters are for "Province", "Region", and "City" selection, respectively.
I have three functions:
findSchools(), which runs when any of the filters (marked with CSS class .filter) are changed, and fetches the results via AJAX from a PHP script. Once that is done, two other functions are called...
changeRegionOptions(), which, upon changing the "Province" filter, and updates the available options using the same method as the first function, but posting to a different script.
changeCityOptions(), which runs if the "Region" filter was changed, and updates options, again using the same method.
The problem is that since I want these AJAX functions to run simultaneously, and they by nature run asynchronously, I've tried using $.when to control the execution of the functions, but it doesn't fix the problem.
The functions run, but the Region and City filters return blank (no options); the FireBug report shows absolutely no output, even though the POST request went through. The posted parameter for filter_province gets sent normally, but the one for region gets cut off at the end -- it sends as filter_region=, with no value passed. So I'm presuming my logic is wrong somewhere. The code is below:
// When any of the filters are changed, let's query the database...
$("select.filter").change(function() {
findSchools();
});
// First, we see if there are any results...
function findSchools() {
var sch_province = document.filterform.filter_province.value;
var sch_region = document.filterform.filter_region.value;
var sch_city = document.filterform.filter_city.value;
var sch_cat = document.filterform.filter_category.value;
var sch_type = document.filterform.filter_type.value;
$.post("fetch_results.php",
{ filter_province : sch_province,
filter_region : sch_region,
filter_city : sch_city,
filter_category : sch_cat,
filter_type : sch_type },
function(data) {
$("#results").html("");
$("#results").hide();
$("#results").html(data);
$("#results").fadeIn(600);
}
);
// Once the results are fetched, we want to see if the filter they changed
was the one for Province, and if so, update the Region and City options
to match that selection...
$("#filter_province").change(function() {
$.when(findSchools())
.done(changeRegionOptions());
$.when(changeRegionOptions())
.done(changeCityOptions());
});
};
This is just one of the ways I've tried to solve it; I've tried using an IF statement, and tried calling the functions directly inside the general select.filter.change() function (after findSchools(); ), but they all return the same result.
Any help with this would be great!
I'm working with a database that has a bunch of serial numbers that are prefixed with leading 0's.
So a serial number can look like 00032432 or 56332432.
Problem is with PHP I don't understand how the conversion system with octals works.
A specific example is that I'm trying to convert and compare all of these integer based numbers with strings.
Is it possible to convert an octal, such as 00234 to a string like "00234" so that I can compare it?
So I need to encode an array in PHP and store it in plain text in MySQL database, my question is should I use serialize() or json_encode()? What are the advantages and disadvantages of each of them?
I think either of them would do in this situation. But which one would you prefer and why? If it is for something other than an array?
Does anybody have a PHP (or other language) script for drawing a spiral. A simple (Archimedean spiral) would be just fine. Of course the principle is simple but coding it in SVG or GD would take some time, so I wonder if somebody has one ready :-)
Trying to output the following 5 but not sure how to do it. Any ideas?
<?php
$other='What are you like?';
$content['my_name']=4;
$str=<<<JT
here is some info. $other Do
you like the number {$content['my_name']+1} ?
JT;
echo $str . '<br />';
Can anyone explain if it is possible to have a web server for all of these technologies:
ColdFusion, PHP, MS SQL Server, MySQL
I have a web developer insisting that they require all of the above however it doesn't quite make sense to me.
Any help or clarification is appreciated.
Hey,
I have a simple "live search" (results displayed while typing) web site. This make up is Ajax to PHP querying a pretty large XML document (10,000+ lines). This is all been hosted on a local Apache server (xamp). The scale of the xml document seems to be causing huge performance issue with results taking 10ish seconds to give the results.
I'm very new to PHP (this actually being my first play about) so there below is a snippet of code in case there is something obvious
for($i=0; $i<($foodListXML->length); $i++){
$type=$foodListXML->item($i)->getElementsByTagName('type');
$foodnote=$foodListXML->item($i)->getElementsByTagName('foodnote');
$style=$foodListXML->item($i)->getElementsByTagName('style');
if ($type->item(0)->nodeType==1)
{
//find a link matching the search text
if (stristr($type->item(0)->childNodes->item(0)->nodeValue,$q)){
$currentFoodName = $type->item(0)->childNodes->item(0)->nodeValue;
$currentFoodStyle = $style->item(0)->childNodes->item(0)->nodeValue;
$currentFoodNote = $foodnote->item(0)->childNodes->item(0)->nodeValue;
if ($hint==""){
$hint= $currentFoodName . " , " . $currentFoodNote . " , <b>" . $currentFoodStyle. "</b>" . "<br>" ;
}
else{
$hint=$hint . $currentFoodName . " , " . $currentFoodNote . " , <b>" . $currentFoodStyle. "</b>" . "<br>" ;
}
}
}
}
}
Also if having the data in a DB and accessing that is faster, then I'm open to that.. All ideas really!!
Thanks.
Hello Tech Jargons,
I have developing messenger in php. In my application in need to reload the content of div in a page while any user post their comments on database of server.
Please kindly help me...
Thanks in Advance
Mayan Alagar.
Hi Everyone,
I am doing a newsletter Management in php. I need to track the visitors who opens our newsletter, I have inserted the tracking image in newsletter thats seems to work little.
Using Shift mailer there is option to embed an inline image to newsletter. Is it possible to track using this inline image?
Is there any other techniques for tracking email.
wpdb class in wordpress use to make connection to database.
is there any substitute to this class in PHP repository?
So i can access different database then the original database that have been initiate in wp-config ?
I have another problem with this script:(
Here it is:http://www4.zippyshare.com/v/47586838/file.html
It says me: Undefined variable: arr in C:\wamp\www\FlashChat_v607\chat\inc\config.php on line 76
Please help me!I will appreciate your help:)