thanx rehfeld
My page is not quite coded right just yet, if at all possible can anyone help, I will be more specific with the result.
The first response, I tried the script and the result grabs all fields:
<TITLE>
Array
(
[0] => 1392
[1] => macdonaldg
[2] => 01/15/2005
[3] => Gerry M
[4] => Private Seller
[5] => FOR SALE:
[6] => 1997 Ford Mustang
[7] => Red with black interior
)
</TITLE>
If possible to only grab fields:
[5] => FOR SALE:
[6] => 1997 Ford Mustang
example:
<TITLE>
FOR SALE: 1997 Ford Mustang
</TITLE>
My attempts fail trying:
$lines = file('/home/2015/public_html/cgi-bin/data/As.data');
foreach ($lines as $line) {
$parts = explode('|', $line);
if ($parts[0] == $_GET['db_id']) {
// this is the line you want
print_r($parts)
$field[5] $field[6]
;
}
}
Now this is where Im totally lost, this is a cgi program.
The code is part of a txt template and displayed in the cgi main page:
cs.cgi
http://domain.com/cgi-bin/cs/cs.cgi?db_id=1392
IF this is any indication, parts of the template have %% around them
<META name="keywords" content="%%KEYWORDS%%">
Can the below code be translated into cgi ?
$lines = file('/home/2015/public_html/cgi-bin/data/As.data');
foreach ($lines as $line) {
$parts = explode('|', $line);
if ($parts[0] == $_GET['db_id']) {
// this is the line you want
print_r($parts);
}
}
If cgi is not an option here because I did post to PHPBUILDER.com,
the program also makes seperate html templates:
http://domain.com/html/car.1352.html
could I still use the code to search using the number 1352 ??
$lines = file('/home/2015/public_html/cgi-bin/data/As.data');
foreach ($lines as $line) {
$parts = explode('|', $line);
if ($parts[0] == $_GET['1352.html']) {
// this is the line you want
print_r($parts);
}
}