Menu
Hi, im looking for a code, and im not sure what to look for.
I have 2 documents: Show_user.php and history.xml
Both documents contain a word they have in common.
Is it possible to create an action in a third dokument, which is triggered by the “match” in the other two dokuments?
If its a bit blurry, then maybe til image will help:
[URL=”http://bindslevdesigns.com/overview.jpg”]http://bindslevdesigns.com/overview.jpg
Thank you very much
Lars
[CODE]<?xml version="1.0"?>
<dataroot version="XXX" vendor="XXX" url="http://www.XXX.com" mail="[email protected]" created="11/22/2008 20:51:54" comments="XXX">
<entry Radio="LARS" Name="Tom" Address="XX:XX:XX:XX:XX:XX" Producer="" LastSeenTime="10:14:57 11/20/2008" LastUsedTime="02:00:00 01/01/1970" Type="XXX" Services="XXX" Image="XXX"/>
</dataroot>[/CODE]
[CODE]--
-- Struktur-dump for tabellen club_new_user
--
CREATE TABLE IF NOT EXISTS club_new_user
(
Navn
varchar(255) collate latin1_general_ci NOT NULL,
MAC
varchar(17) collate latin1_general_ci NOT NULL,
PRIMARY KEY (MAC
)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
--
-- Data dump for tabellen club_new_user
--
INSERT INTO club_new_user
(Navn
, MAC
) VALUES
('Tom', 'XX:XX:XX:XX:XX:XX');[/CODE]
[code=php]
<?PHP
$match_string = $_POST['mac'];
$file1 = "";
$file2 = "";
$compare_file1 = file_get_contents($file1);
$compare_file2 = file_get_contents($file2);
$mac_file1 = strpos($compare_file1, $match_string);
$mac_file2 = strpos($compare_file2, $match_string);
if($mac_file1 > 0 && $mac_file2 > 0)
{
echo "<meta HTTP-EQUIV='REFRESH' content='0; url=www.MacFoundAMatch.com'>";
} else {
echo "<meta HTTP-EQUIV='REFRESH' content='0; url=www.NoMatch.com'>";
}
?>
[/code]
[CODE]<?xml version="1.0"?>
<dataroot version="1.3.8.0" vendor="XXX" url="XXX" mail="XXX" created="11/22/2008 20:51:54" comments="XXX">
<entry Radio="LARS" Name="Tom" Address="aa:aa:aa:aa:aa:aa" Producer="" LastSeenTime="10:14:57 11/20/2008" LastUsedTime="02:00:00 01/01/1970" Type="XXX" Services="XXX" Image="XXX"/>
</dataroot>[/CODE]
[CODE]<?xml version="1.0"?>
<dataroot version="1.3.8.0" vendor="XXX" url="XXX" mail="XXX" created="11/22/2008 20:51:54" comments="XXX">
<entry Radio="LARS" Name="Tom" Address="aa:aa:aa:aa:aa:aa" Producer="" LastSeenTime="10:14:57 11/20/2008" LastUsedTime="02:00:00 01/01/1970" Type="XXX" Services="XXX" Image="XXX"/>
<entry Radio="LARS" Name="Emil" Address="bb:bb:bb:bb:bb:bb" Producer="" LastSeenTime="10:14:57 11/20/2008" LastUsedTime="02:00:00 01/01/1970" Type="XXX" Services="XXX" Image="XXX"/>
<entry Radio="LARS" Name="Lars!" Address="cc:cc:cc:cc:cc:cc" Producer="" LastSeenTime="20:51:37 11/22/2008" LastUsedTime="15:03:01 11/22/2008" Type="XXX" Services="XXX" Image="XXX"/>
</dataroot>[/CODE]
[CODE]<?PHP
$match_string = $_POST['Address'];
$file1 = "show_users.php";
$file2 = "show_users2.php";
$compare_file1 = file_get_contents($file1);
$compare_file2 = file_get_contents($file2);
$Address_file1 = strpos($compare_file1, $match_string);
$Address_file2 = strpos($compare_file2, $match_string);
if($Address_file1 > 0 && $Address_file2 > 0)
{
echo "<meta HTTP-EQUIV='REFRESH' content='0; url=virker.html'>";
} else {
echo "<meta HTTP-EQUIV='REFRESH' content='0; url=virkerikke.html'>";
}
?> [/CODE]
[CODE]<?php
include ($_SERVER['DOCUMENT_ROOT'] . "/connect.php");
if (!$_SERVER)
{
die('Could not connect: ' . mysql_error());
}mysql_select_db("bindslevdesigns_com", $con);$result = mysql_query("SELECT * FROM club_new_user");while($row = mysql_fetch_array($result))
{
echo $row['Address'];
echo "<br />";
}mysql_close($con);
echo "Address";
?> [/CODE]
[CODE]
<?php
include ($_SERVER['DOCUMENT_ROOT'] . "/connect.php");
if (!$_SERVER)
{
die('Could not connect: ' . mysql_error());
}mysql_select_db("bindslevdesigns_com", $con);$result = mysql_query("SELECT * FROM club_new_user");while($row = mysql_fetch_array($result))
{
echo $row['Address'];
echo "<br />";
}mysql_close($con);
echo "Address";
?>
[/CODE]
[CODE]echo "Address";[/CODE]
0.1.9 — BETA 5.26