I have the following stripped down php code...
foreach ($xpath->query('/html/body//a')} as $queryitem) {
$nodeposition = ???;
$parentposition = ???;
}
...from this is it possible to find the position of each node and the position its parent?
for example:
0..<html>
1....<head>
2......<title>
3......<meta>
4......<meta>
5....<b...
Hi All
I am trying to find a piece of regex to match a currency value.
I would like to match only numbers and 1 decimal point ie
Allowed
10
100
100.00
Not Allowed
Alpha Characters
100,00
+/- 100
I have search and tried quite a few without any luck.
Hope you can advise
...
I would like to load/refresh a particular page for every 10 secs to view updated data's fetched from Database.
I used META for doing it
<META HTTP-EQUIV=Refresh CONTENT='10; URL=livedata.php'>
But still i agree we also do this by
using :
Javascript to load a div by settimeout
Ajax dynamic refresh
Would be great ...
I ready this article: http://www.mysqlperformanceblog.com/2006/09/27/apc-or-memcached/ from way back when.. I want to get the best cacheing engine available so that my application is really fast. Of cource I don't want to overcache but I want to at least choose the best thing out there. In that article it says memcached is slow and apc i...
I had the default Apache2.2 and PHP installation working on my MacBook Pro, but it stopped working at some point. I've read many online articles to try and fix this problem, but none of them have pointed out anything that I am not already doing to get PHP working again. I am completely stumped:
My basic Apache configuration appears to b...
I've just finished writing a web server in C#. Its pretty basic and only serves static content like html, xml, and images at the moment. I would like to implement a dynamic language, however. I'm trying to choose between one of the following:
ASP.NET
PHP
Python
I'd prefer to implement PHP or Python because I am much more familiar wit...
Casus:
How to edit and advance with the same code, from several distanced locations and computers as easily as possible?
I have this thought for some time now. I am regularly having problems when I have to work on one project from different computers, as I have not taken any measures or whatsoever to ease myself in this situation. Tha...
Hi experts,
I am trying to connect to an Yahoo Messenger account and send PMs using PHP or CURL.
I downloaded the below class from phpclasses.org which connects to eBuddy Web Messenger(http://www.ebuddy.com/) to send messages to the desired IM
The original code was not working, so I made some changes(the original statements are commente...
Trying to use an onmouseover event
echo $html->link("Dashboard",
"/dashboard/index",
array("onmouseover" => "Tip('Test');") );
becomes
<a href="/dashboard/index" onmouseover="Tip('Test');">Dashboard</a>
How do I prevent the link function from removing the single quotes?
...
Hi,
I am using XAMPP on a localhost windows VISTA m/c...using gmail as smpt server
I am trying to send an email using simple PHP script
here is the configuration details on sendmail.ini(I have the sendmail.exe and the other 2 dll in that directory)
smtp_server=smtp.gmail.com
; smtp port (normally 25)
smtp_port=465
; the default do...
Almost any working PHP programmer has faced having to use CURL to send raw HTTP requests, whether it's for credit card payment processing, nefarious screen scraping, or something in-between.
Almost any forum where PHP programmers congregate has a large number of people who can't get the cURL functions to do what they want.
When cURL is...
Right now I'm trying to serve CSS and JS files from a server that won't let me enable mod_gzip or mod_deflate. So I wrote a small PHP script to compress with GZIP and return to the user.
Example Code:
$filename = "style.css";
if (!file_exists($filename) || !($info = stat($filename))) {
header("HTTP/1.1 404 Not Found");
die();
}
...
Howdy Guys,
What I am trying to do is the following: I have an array of values, these values will eventually be used to generate a random unique string but that's a little later. First I would like to loop through all the values in the array (foreach loop) then I would like to limit this (while loop) Is this a correct method for doing t...
Hello,
I'm developing a single serving site in PHP that simply displays messages that are posted by visitors (ideally surrounding the topic of the website). Anyone can post up to three messages an hour.
Since the website will only be one page, I'd like to control the vertical length of each message. However, I do want to at least par...
I run a fantasy basketball league. My php website/sql database is designed to let the person running the team do everything through the website - they can waive a player, and the player automatically goes into the FA pool, etc.
Everything has worked perfectly until about a week ago. Anytime now that a team goes to sign a player, after c...
i have php5.2.9 +mysql5.1+apache2.2.6 installed on win xp. I'm not able get php connect with mysql. here is the code.`
<? php
$link=mysql_connect('localhost','root','godismine');
if(!$link)
echo "fail";
else echo "success";
mysql_close();
?>
i don't think there is any error in code. phpinfo is showing mysql support so it can...
I have an array of user ids in a query from Database A, Table A (AA).
I have the main user database in Database B, Table A (BA).
For each user id returned in my result array from AA, I want to retrieve the first and last name of that user id from BA.
Different user accounts control each database. Unfortunately each login cannot have ...
I'd like to contact an FMS server through a script and download the persistent Remote SharedObject.
The Flash program connects to the FMS server, opens a NetConnection, makes a SharedObject.getRemote call. I'd like to access this info through PHP, Ruby, Perl, etc to work with in a script.
I understand this info is sent to the Flash pl...
Hi, I am trying to use the tinymce text editor, but am not being able to get the contents of the editor using jQuery , and also if I use the simple post method to get the value I get the text, but am not getting the image?
The code I tried using jQuery was:
$(document).ready(function()
{
$("#save").click(function()
{
$....
Hi,
I am trying to insert to date,time fields using a php script but I am getting a syntax error. Can someone please tell me, where I am doing the mistake.
Thanks fellows
INSERT INTO calendar(event,from,to,day)
VALUES
('".$_REQUEST['event']."',
'".$_REQUEST['from_time']."',
'".$_REQUEST['to_time']."',
'".$_REQUEST['date_event']."')
...