|
Author |
Message |
kepler
Junior WebHelper
Joined: 08 Feb 2002
Posts: 37
|
Posted:
Fri Feb 08, 2002 5:48 pm (22 years, 2 months ago) |
|
I,ve a problem related to one script I'm doing. Everything is going well, except for one thing: the result of the cgi script is as follows: (sorry for the size)
Code: |
<![color=red]DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML><HEAD><TITLE>Untitled Document</TITLE>
</HEAD><BODY BGCOLOR="#f5f5dc" TEXT="black"><PRE><FONT SIZE=3><FONT COLOR=midnightblue><STRONG> <BR></STRONG><STRONG> ####################################################################################### <BR></STRONG><STRONG> EPHEMERIDES DES CORPS DU SYSTEME SOLAIRE <BR></STRONG><STRONG> ####################################################################################### <BR></STRONG><STRONG> <BR></STRONG><STRONG> Planete 1 Mercure <BR></STRONG><STRONG> Theorie planetaire DE405/LE405 <BR></STRONG><STRONG> Repere Astrometrique J2000 <BR></STRONG><STRONG> Centre du repere : geocentre <BR></STRONG><STRONG> Coordonnees equatoriales (R.A, Dec.) <BR></STRONG><STRONG> <BR></STRONG><STRONG> ####################################################################################### <BR></STRONG><STRONG> <BR></STRONG><STRONG> Date UTC R.A Dec. Distance V.Mag Phase Elong. <BR></STRONG><STRONG> h m s h m s o ' " ua. o o <BR></STRONG><STRONG> <BR></STRONG></FONT><STRONG> 8 2 2002 16 3 9.00 20 0 44.32778 -17 55 36.2888 0.756110555 0.72 114.60 21.23 <BR></STRONG></FONT><BR> <STRONG><P><IMG WIDTH=100% HEIGHT=3 SRC=/ephem/ephepos/icons/blurulr1.gif><P> <br> <A HREF=/ephem/ephepos/ephepos_datapos.html target=formulaire>> Signification des paramètres calculés</A><BR> <A HREF=/tmp/datapos/tmp10356.Mercure>> Fichier résultats au format ascii</A></STRONG></PRE><P><IMG align=top WIDTH=100% HEIGHT=3 SRC=/ephem/ephepos/icons/blurulr1.gif><P><b><FONT SIZE=3 COLOR=blue> Si vous désirez utiliser ces données en vue d'une diffusion publique, veuillez nous consulter au préalable.<BR>©
Jérôme Berthier et Pascal Descamps - Institut de Mécanique Céleste / Bureau des longitudes, 1999.</b></font></BODY></HTML>[/color]
|
but I just want to appear with
Code: |
Date UTC R.A Dec. Distance V.Mag Phase Elong. <BR></STRONG><STRONG> h m s h m s o ' " ua. o o <BR></STRONG><STRONG> <BR></STRONG></FONT><STRONG> 8 2 2002 16 3 9.00 20 0 44.32778 -17 55 36.2888 0.756110555 0.72 114.60 21.23 |
How can I do this? Can you help me (please)?
Best regards,
Rui Fernandes |
|
|
|
|
Gandalf
WebHelper
Joined: 08 Jan 2002
Posts: 52
Location: Israel
|
Posted:
Fri Feb 08, 2002 7:52 pm (22 years, 2 months ago) |
|
I personally don't know any CGI, but even if I knew, without the actual script I could do very little. Why not put a link to the script code, so that anyone who wants to can go and have a look? (DO NOT post it as a forum post) |
________________________________ Everything should be made as simple as possible, but no simpler. |
|
|
|
jayant
Team Member
Joined: 07 Jan 2002
Posts: 262
Location: New Delhi, India
|
Posted:
Sat Feb 09, 2002 12:26 am (22 years, 2 months ago) |
|
|
|
|
kepler
Junior WebHelper
Joined: 08 Feb 2002
Posts: 37
|
Posted:
Sat Feb 09, 2002 8:48 am (22 years, 2 months ago) |
|
Well, the problem is this: the script itself is complicated; but one variable gives the first result ($out). What I was trying to do was to transform that first one into the second - like those simple scripts wich elimimate the html tags, for example.
I've tryed to locate "Date UTC" and get the next line, by using the split command with the <BR> separator. But it didn't work - I'm doing something wrong...
Best regards,
Rui Fernandes |
|
|
|
|
kepler
Junior WebHelper
Joined: 08 Feb 2002
Posts: 37
|
Posted:
Sat Feb 09, 2002 8:53 am (22 years, 2 months ago) |
|
Sorry, I've forgot to put the script. Here it is:
$flag=0;
$output="";
$break="<br>";
@lines = split(/"<BR>"/, $out);
foreach $line (@lines)
{
if (($flag >0)&($flag<2))
{
$output=$output.$break.$line;
}
if ($line =~ /"Date UTC"/i )
{
$output=$output.$break.$line;
$flag = $flag + 1;
}
}
best regards,
Rui Fernandes |
|
|
|
|
kepler
Junior WebHelper
Joined: 08 Feb 2002
Posts: 37
|
Posted:
Sat Feb 09, 2002 2:54 pm (22 years, 2 months ago) |
|
Problem solved!
But thanks anyway.
Rui Fernandes |
|
|
|
|
|
|
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.145899 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
| |