Hi all
I followed the tutorial here: http://www.shadow-fox.net/site/tutorial/45-Create-Dynamic-URLs-With-Mod-Rewrite-and-PHP-Functions to create a rewrite rule so that
http://blah/index.php?id=7&page=4 could be written
http://blah/index//id/7/page/4/ for search engine friendliness, but it's not...
Sorry if I wasnt clear
The code above successfully appears to add a unique integer to any blank id attributes it finds, what I need to be able to do is update $file with the change. From what I read of XPath, there is a way to dump all of the nodes out as one string and write them to a file, but...
Hi
Is it possible to save a modifed XML file in Perl's XPath?
I have a script that looks for blank id attributes in an xml file and populates them with a unique ID...
my $updated=0;
my $xp = XML::XPath->new(filename => $file);
my $nodeset = $xp->find('//@id'); # find all ids
foreach my...
Hi
I come from a PHP background and would like to know the code to include content from an external URL. In PHP, it's
<?
include("http://www.blah.com");
?>
and to include content from a secure URL, it's
<?
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL...
Hmm, that doesnt seem to work.
1. I opened the Library and duplicated the symbol by right-clicking and choosing Duplicate
2. Renamed it when prompted
3. Left dragged it onto the Stage
4. If I edit the text in this new instance of the duplicate symbol, the text also changes in the instance of the...
Hi, this is a newbie question, but how do I copy and paste a symbol in such a way that it is no longer linked to the original, ie so the copy does not become an instance? I have a symbol I want to use innumerous places but with different text and despite using the techniques in the help, I cant...
Hi
Whats the best approach to overwriting a file from an ftp site with PHP?
I know you cant overwrite a file with fopen, but I dont want to use ftp functions to log in and delete the file because I am using fopen to stream data from a variable into a file, i.e. I'm opening the connection with...
Hi
How can I have an event fire off (i.e. a popup) when a user closes their browser or clicks an offsite link, but not when they submit a form or follow a link on the page.
I have an "edit article" page where a user updates details in a form. During this time the article is locked. If...
Hmm that didnt work
<SCRIPT LANGUAGE="JavaScript"><!--
var today = new Date();
var difftime = (today.getTimezoneOffset()+420) *60000;
today.setTime(today.getTime()+difftime);
document.form.clienttime.value=(today.parse)/1000;
//--></SCRIPT>
Gives me NaN for the value of clienttime on...
OK, so this will return the difference between the client machine's time and UTC/GMT. So, in order to calculate the difference between the server's time and the client's time, I need to get the offset between the server's time and UTC as well and then take the difference, is that right?
Ah OK, then the answer is no, because when I convert the server time from a unix timestamp to human readable form (<?=date("F j Y, g:i a")?>) I get May 5 2003, 4:05 am and this javascript:
<SCRIPT LANGUAGE="JavaScript"><!--
var now = new Date();
var...
Yes but my question is, where is it getting the time from? The web server or the client's machine? The code I posted seems to return identical values for both time() (PHP) and epoch_seconds (Javascript) yet they should be different because Javascript is getting the time from my machine and php...
But doesnt Date.getTime() run on the client machine, and return the client's time? My machine is set to NZT i.e. New Zealand Time, and the server is in Florida...
Hi
I am trying to bypass the whole issue with a server being in one timezone and clients in the other by being a bit clever. Having the user choose a tiemzone froma dropdown isnt working for me - daylight savings etc always seems to screw the time up, so what I am doing is passing a hidden...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.