php-windows Digest 18 Jan 2003 00:11:22 -0000 Issue 1541
Topics (messages 17937 through 17954):
Re: It just doesn't make sense!
17937 by: Stephen Edmonds
17943 by: Brian 'Bex' Huff
PDF
17938 by: Brian McGarvie
17946 by: Dash McElroy
Undefined variable: PHP_SELF -- Need Help
17939 by: Ray
R: [PHP-WIN] Undefined variable: PHP_SELF -- Need Help
17940 by: Darvin Andrioli
Re: SQL-query
17941 by: Piotr Pluciennik
17945 by: Dash McElroy
17954 by: Cam Dunstan
Re: Subject: SQL-query
17942 by: Neil Smith
Re: Help needed about mailing!
17944 by: Dash McElroy
$PHP_SELF & change of bgcolor ?
17947 by: Wolfgang Schneider
17948 by: Dash McElroy
Re: What kind of Editor you used to build PHP script ?
17949 by: Roland Tarver
Re: PHP/PWS 3.0
17950 by: Luis Ferro
Re: PHP Search
17951 by: Radovan Radic
17952 by: Dash McElroy
17953 by: Chris Kranz
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Grr it just takes the biscuit. I found the problem in my menu system.
Basically, I was trying to send on two ? rather than using an &.
So incredibly annoying, yet so incredibly simple... ah well
Stephen
----- Original Message -----
From: "Stephen Edmonds" <[EMAIL PROTECTED]>
To: "PHP Windows Helplist" <[EMAIL PROTECTED]>
Sent: Friday, January 17, 2003 12:10 PM
Subject: [PHP-WIN] It just doesn't make sense!
> I am currently re-writing part of my website to allow people who don't use
> cookies to still use the site features. However, I have run into a
problem.
> I send the session ID from page to page via the query string, and retreve
it
> using $_GET. Everything works fine, and if set I store the details in
> $AppendStringToURL
>
> // Code for $AppendStringToURL
> if ( isset( $_GET[NonCookieLogin] ) ) {
> // Using other method to login
> $AppendStringToURL = "?NonCookieLogin=".$_GET[NonCookieLogin];
> }
>
> Again, this works fine. I then split the page into two frames as shown
> below:
>
> $FrameProperTarget =
> "http://".$_SERVER["HTTP_HOST"]."/".$FrameTarget.$AppendStringToURL;
> $OffsideTarget =
>
"http://".$_SERVER["HTTP_HOST"]."/members/interface/"."offside.php".$AppendS
> tringToURL;
>
> The problem is that $FrameProperTarget gets the bit added on the end so
that
> the ID is passed on, but $OffsideTarget does not get any value from
> $AppendStringToURL. For example:
>
> Value of $FrameProperTarget -
>
http://scryt.no-ip.com/members/columns.php?NonCookieLogin=896c972ac44a7babdf
> 2549ead6f30b86
> Value of $OffsideTarget -
> http://scryt.no-ip.com/members/interface/offside.php
>
> As you can see, it has not added the bit onto the end... and I have no
idea
> why. Since one works and the other doesn't, yet they both use the same
> construction method, they both use the same variable, and the
> $AppendStringToURL does not show up anywhere else in the source code of
the
> HTML page (i.e. its not outside any ", it doesn't excist. Something has
gone
> totally up the creek here... any ideas?
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Id just like to say, whaaaaaa???
maybe this is some wierd scope problem... what version of PHP are you using?
is $AppendStringToURL a global on the page? You might be able to work
around this by declaring it global, but be careful of doing this too
often ;)
You also might have to echo the value of $AppendStringToURL at several
places in your script to make sure its not getting wiped somewhere.
--
Brian 'Bex' Huff
[EMAIL PROTECTED]
Phone: 952-903-2023
Fax: 952-829-5424
I am currently re-writing part of my website to allow people who don't use
cookies to still use the site features. However, I have run into a problem.
I send the session ID from page to page via the query string, and retreve it
using $_GET. Everything works fine, and if set I store the details in
$AppendStringToURL
// Code for $AppendStringToURL
if ( isset( $_GET[NonCookieLogin] ) ) {
// Using other method to login
$AppendStringToURL = "?NonCookieLogin=".$_GET[NonCookieLogin];
}
Again, this works fine. I then split the page into two frames as shown
below:
$FrameProperTarget =
"http://".$_SERVER["HTTP_HOST"]."/".$FrameTarget.$AppendStringToURL;
$OffsideTarget =
"http://".$_SERVER["HTTP_HOST"]."/members/interface/"."offside.php".$AppendS
tringToURL;
The problem is that $FrameProperTarget gets the bit added on the end so that
the ID is passed on, but $OffsideTarget does not get any value from
$AppendStringToURL. For example:
Value of $FrameProperTarget -
http://scryt.no-ip.com/members/columns.php?NonCookieLogin=896c972ac44a7babdf
2549ead6f30b86
Value of $OffsideTarget -
http://scryt.no-ip.com/members/interface/offside.php
As you can see, it has not added the bit onto the end... and I have no idea
why. Since one works and the other doesn't, yet they both use the same
construction method, they both use the same variable, and the
$AppendStringToURL does not show up anywhere else in the source code of the
HTML page (i.e. its not outside any ", it doesn't excist. Something has gone
totally up the creek here... any ideas?
--- End Message ---
--- Begin Message ---
I'm looking to find out if PHP has the ability to do this...
OK I'm looking for a solution that could do the following.
We require to generate PDF files that can then be emailed or printed &
posted to clients.
I can create PDF Files from scratch using PDFLib.
What we will require to do though is, we presently have paper copies of
forms from various parties we deal with, our present Access-based system
simply prints on top of these, I am presently developing in PHP a system to
replace the Access database, we will want it to create these as PDF files
(we can get the printed forms in PDF format) based on supplied PDF files...
for example, generate a PDF for Customer X based on Supplier Z's PDF file.
Any solutions in PHP (open source, free, commercial etc etc.) would be very
much appreciated, or if we need to look at another Language to perform this
part of the solution (i.e. ASP).
The solution I'm developing is PHP, running on a Windows 2000 Server as we
require use of some windows-only software too. So if *cough* ASP is what's
needed to do the above then so be it :\ - really hope not though!!!
Thanks in advance!
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.438 / Virus Database: 246 - Release Date: 07/01/03
--- End Message ---
--- Begin Message ---
If the PDF forms you "print on top of" are forms, you can use FDF (Forms
Data Format) to fill out the form. There are several FDF options. One is
to use Adobe's FDF program thingie. Others are listed in the comments on
this page (http://www.php.net/manual/en/ref.fdf.php). I used one of the
ones listed in the comments with no problems, but it was for a super
simple form. (i.e., your mileage may vary)
Another option is to have the suppliers form to be turned into an image
and placed in the background (via pdf_place_image() if you're using
PDFlib). This works well enough, but could be extremely troublesome for
large forms. It also heavily increases the size of the PDF document.
PDFlib is really powerful, but to edit existing PDF documents, you may
need to use their PDI (Pdf Import Library). That is an added cost module.
Otherwise, you could create a function (or possibly class) to basically
redo the suppliers' form, and then pass over it (at the same time) with
the data you need to put on the form.
Good Luck!
-Dash
The scum also rises.
-- Dr. Hunter S. Thompson
On Fri, 17 Jan 2003, Brian McGarvie wrote:
> I'm looking to find out if PHP has the ability to do this...
>
> OK I'm looking for a solution that could do the following.
>
> We require to generate PDF files that can then be emailed or printed &
> posted to clients.
>
> I can create PDF Files from scratch using PDFLib.
>
> What we will require to do though is, we presently have paper copies of
> forms from various parties we deal with, our present Access-based system
> simply prints on top of these, I am presently developing in PHP a system to
> replace the Access database, we will want it to create these as PDF files
> (we can get the printed forms in PDF format) based on supplied PDF files...
> for example, generate a PDF for Customer X based on Supplier Z's PDF file.
>
> Any solutions in PHP (open source, free, commercial etc etc.) would be very
> much appreciated, or if we need to look at another Language to perform this
> part of the solution (i.e. ASP).
>
> The solution I'm developing is PHP, running on a Windows 2000 Server as we
> require use of some windows-only software too. So if *cough* ASP is what's
> needed to do the above then so be it :\ - really hope not though!!!
>
> Thanks in advance!
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.438 / Virus Database: 246 - Release Date: 07/01/03
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Hello all,
I get lots of these errors when I try using PHP_SELF as a variable. Is there
something in my php.ini file I have to change, or something I need to
install. I have IIS5, MySQL4.0.8, and PHP 4.3. Also running windows 2000
advanced server.
Thanks,
Ray
--- End Message ---
--- Begin Message ---
Hi Ray
you may use $_SERVER['PHP_SELF'] or turn on the parameter 'register_global'
For more info:
http://www.php.net/manual/en/reserved.variables.php#reserved.variables.serve
r
Darvin
> -----Messaggio originale-----
> Da: Ray [mailto:[EMAIL PROTECTED]]
> Inviato: venerd́ 17 gennaio 2003 13.40
> A: [EMAIL PROTECTED]
> Oggetto: [PHP-WIN] Undefined variable: PHP_SELF -- Need Help
>
>
> Hello all,
> I get lots of these errors when I try using PHP_SELF as a
> variable. Is there
> something in my php.ini file I have to change, or something I need to
> install. I have IIS5, MySQL4.0.8, and PHP 4.3. Also running windows 2000
> advanced server.
>
> Thanks,
> Ray
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Hi,
I don't use MYSQL, but the problem is common for
databases. One of the idea of auto increment field is
to have unique identifiers, so you can't insert a
record with auto increment fields set by yourself.
It's always done by DB. So you can't fill a "hole" in
numbering after deleting record. Of course in a normal
way of using DB... :-)
HTH
Piotr
--- Bobo Wieland <[EMAIL PROTECTED]> wrote:
> I hope this isn't to much OT... Sorry if it is...
>
> In my MySQL-db that I use for a php-driven site I
> have many tables with the
> Primary Key set as an auto increment value.
>
> If I have 4 records with id 1, 2, 3 and 4 and then
> delete number 3 and add
> one more record I get the id's 1,2,4 and 5. It isn't
> much of a problem, but
> it would be nice to check for the first "hole" in
> the id's and insert the
> record there instead. How would you do this? is
> there some simple way from
> either MySQl or PHP that doesn't take to much time
> to execute?
>
> thanks in advance
>
>
> . bobo . www.elstudion.com . [EMAIL PROTECTED] .
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--- End Message ---
--- Begin Message ---
Piotr is right. SQL shouldn't let you do that, if only for possible
consistency errors. Imagine if you had id 3 referenced in some other table
and then you put new data in the primary table with id of 3. Then all the
other stuff referring to 3 would then refer to the new data. Not a good
thing.
I've been digging through an SQL book lately... some mind bending (but
extremely logical) information.
-Dash
Don't look back, the lemmings are gaining on you.
On Fri, 17 Jan 2003, Piotr Pluciennik wrote:
> Hi,
>
> I don't use MYSQL, but the problem is common for
> databases. One of the idea of auto increment field is
> to have unique identifiers, so you can't insert a
> record with auto increment fields set by yourself.
> It's always done by DB. So you can't fill a "hole" in
> numbering after deleting record. Of course in a normal
> way of using DB... :-)
>
> HTH
>
> Piotr
>
> --- Bobo Wieland <[EMAIL PROTECTED]> wrote:
> > I hope this isn't to much OT... Sorry if it is...
> >
> > In my MySQL-db that I use for a php-driven site I
> > have many tables with the
> > Primary Key set as an auto increment value.
> >
> > If I have 4 records with id 1, 2, 3 and 4 and then
> > delete number 3 and add
> > one more record I get the id's 1,2,4 and 5. It isn't
> > much of a problem, but
> > it would be nice to check for the first "hole" in
> > the id's and insert the
> > record there instead. How would you do this? is
> > there some simple way from
> > either MySQl or PHP that doesn't take to much time
> > to execute?
> >
> > thanks in advance
> >
> >
> > . bobo . www.elstudion.com . [EMAIL PROTECTED] .
> >
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Amen to that - I really believe you are better off (if you have the freedom
to do so) changing autoincrement fields to an integer type and managing the
incrementing yourself. In addition to the problem Dash mentions there is
yet another "gotcha" - if you are ever faced with having to combine two
tables of existing data, each with an autoincrement fields you have a
serious problem on your hands and a lot of sweat work to change all the
related tables before you combine them. If I was Prime Minister I would
immediately pass legislation outlawing autoincrement fields ( my chances are
not good however).
----- Original Message -----
From: "Dash McElroy" <[EMAIL PROTECTED]>
To: "Piotr Pluciennik" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, January 18, 2003 4:54 AM
Subject: Re: [PHP-WIN] SQL-query
> Piotr is right. SQL shouldn't let you do that, if only for possible
> consistency errors. Imagine if you had id 3 referenced in some other table
> and then you put new data in the primary table with id of 3. Then all the
> other stuff referring to 3 would then refer to the new data. Not a good
> thing.
>
> I've been digging through an SQL book lately... some mind bending (but
> extremely logical) information.
>
> -Dash
>
> Don't look back, the lemmings are gaining on you.
>
> On Fri, 17 Jan 2003, Piotr Pluciennik wrote:
>
> > Hi,
> >
> > I don't use MYSQL, but the problem is common for
> > databases. One of the idea of auto increment field is
> > to have unique identifiers, so you can't insert a
> > record with auto increment fields set by yourself.
> > It's always done by DB. So you can't fill a "hole" in
> > numbering after deleting record. Of course in a normal
> > way of using DB... :-)
> >
> > HTH
> >
> > Piotr
> >
> > --- Bobo Wieland <[EMAIL PROTECTED]> wrote:
> > > I hope this isn't to much OT... Sorry if it is...
> > >
> > > In my MySQL-db that I use for a php-driven site I
> > > have many tables with the
> > > Primary Key set as an auto increment value.
> > >
> > > If I have 4 records with id 1, 2, 3 and 4 and then
> > > delete number 3 and add
> > > one more record I get the id's 1,2,4 and 5. It isn't
> > > much of a problem, but
> > > it would be nice to check for the first "hole" in
> > > the id's and insert the
> > > record there instead. How would you do this? is
> > > there some simple way from
> > > either MySQl or PHP that doesn't take to much time
> > > to execute?
> > >
> > > thanks in advance
> > >
> > >
> > > . bobo . www.elstudion.com . [EMAIL PROTECTED] .
> > >
> > >
> > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> > http://mailplus.yahoo.com
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
At 12:10 17/01/2003 +0000, you wrote:
Message-ID: <000a01c2be19$7e0df920$9df81e0a@elstudion>
From: "Bobo Wieland" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Date: Fri, 17 Jan 2003 12:13:35 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-9"
Content-Transfer-Encoding: 7bit
Subject: SQL-query
I hope this isn't to much OT... Sorry if it is...
In my MySQL-db that I use for a php-driven site I have many tables with the
Primary Key set as an auto increment value.
If I have 4 records with id 1, 2, 3 and 4 and then delete number 3 and add
one more record I get the id's 1,2,4 and 5. It isn't much of a problem, but
it would be nice to check for the first "hole" in the id's and insert the
record there instead. How would you do this? is there some simple way from
either MySQl or PHP that doesn't take to much time to execute?
SQL autoincrement fields don't work like that - if they did, the DBMS would
have to scan all the primary key IDs and find a hole to insert it - instead
I think it (internally) maintains the last increment ID and adds one to it,
which is much faster.
The DBMS in any case will maintain the file structure and occasionally
compact the DB file so the 'holes' if they exist are squeezed out.
Different DBs do this differently, but you can ask MySQL to compact the
table at any time appropriate to your DB - maybe run a timed script to
clean the blanks if required.
You may have to live with this, but really, its not a problem at all :-)
HTH
Neil Smith.
thanks in advance
. bobo . www.elstudion.com . [EMAIL PROTECTED] .
--- End Message ---
--- Begin Message ---
Try telnetting to port 25 of the server (armed with SMTP commands, of
course) and see if it will let you connect. Perhaps the new exchange
server of yours is disallowing relaying or something else odd.
Works great with mine, as long as I email to my internal domain (won't let
me relay. I've tried even!).
-Dash
To be intoxicated is to feel sophisticated but not be able to say it.
On Fri, 17 Jan 2003, Burak Ata wrote:
> Well I need some help about mailing I was using the IP of an exchange
> server as my SMTP and I was using mail function without any problem.
>
> Our exchange server has changed and now I am using the ip of that server
> but the mail function doesn't work. It always gives "Server Error".
>
> Any idea?
--- End Message ---
--- Begin Message ---
Hi
a bit of a newbie question ... :-)
Can php be used to set the bgcolor in a navigation menu depending on
what page one is on?
Let's say the menu consists of table with 4 cells / options, and the
option corresponding to the current page (somehow use $php_self to
determine?) have blue text on white background, whereas all other
options have white text on blue background ...
Can someone point me in the right direction, pelase?
Any help is much appreciated
God bless you with His grace and peace
Wolfgang
Looking for Biblical information? COME AND SEE!
http://classes.bibelcenter.de ... online classes
http://www.bibelcenter.de ... biblical studies
www.christianbook.com/Christian/Books/home?event=AFF&p=1009812 ... Christian bookstore
http://www.christian-ebooks.de ... Christian eBooks
--- End Message ---
--- Begin Message ---
Sure thing. Hopefully you have a central include() file... that would make
this easier so you don't have to put this code in all of your pages.
if ($_SERVER['PHP_SELF'] == "blahblah.php") {
$bgcolor = "white"; //change as needed
$text = "blue"; //change as needed
}
else {
$bgcolor = "blue";
$text = "white";
}
Then just echo the statements out.
echo "<tr bgcolor=$bgcolor><td><font color=$text>blahblah</font></td></tr>\n";
I would advise using CSS instead of bgcolor elements, though, as it would
make it so much easier (<tr class=$class><td>blahblah</td></tr>).
Look up http://www.w3c.org/Style/CSS for some good tricks. Also go to
http://www.htmlhelp.com and look up Cascading Style Sheets.
-Dash
"Just out of curiosity does this actually mean something or have some
of the few remaining bits of your brain just evaporated?"
-- Patricia O Tuama, [EMAIL PROTECTED]
On Fri, 17 Jan 2003, Wolfgang Schneider wrote:
> Hi
>
> a bit of a newbie question ... :-)
>
> Can php be used to set the bgcolor in a navigation menu depending on
> what page one is on?
> Let's say the menu consists of table with 4 cells / options, and the
> option corresponding to the current page (somehow use $php_self to
> determine?) have blue text on white background, whereas all other
> options have white text on blue background ...
> Can someone point me in the right direction, pelase?
> Any help is much appreciated
> God bless you with His grace and peace
> Wolfgang
>
> Looking for Biblical information? COME AND SEE!
> http://classes.bibelcenter.de ... online classes
> http://www.bibelcenter.de ... biblical studies
> www.christianbook.com/Christian/Books/home?event=AFF&p=1009812 ... Christian
>bookstore
> http://www.christian-ebooks.de ... Christian eBooks
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Definately, I use this all the time and it's great. You can download
*LOADS* of great plugins for it....
It's recommended by the w3c.
Upload files to you're web server directly from the program, so i guess
it's an 'live' IDE for PHP. If you're web server has postGreSQL or MySQL
your laughing.
erm, I think it's only on windows though :(
Roland
Check out HTML-Kit (www.chami.com). Fully functional (PHP preview and
validation), very powerful, and free!
At 03:14 PM 1/16/2003, skyweb wrote:
> I like SSEditor, because I made it. and I use it to build my web site:)
>
> What features should be in a PHP Editor ? can you tell me ?
>
> http://www.skyweb2k.com/sseditor
>
> [EMAIL PROTECTED]
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
To insure that you receive proper support, please include all
past correspondence (where applicable), and any relevant
information pertinent to your situation when submitting a
problem report to the GW Micro Technical Support Team.
Aaron Smith
GW Micro
Phone: 260/489-3671
Fax: 260/489-2608
WWW: http://www.gwmicro.com
FTP: ftp://ftp.gwmicro.com
Technical Support & Web Development
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
******************************************************************************
This email has been virus checked by the Eclipse Internet MAILsafe service
******************************************************************************
www: http://www.eclipse.net.uk/ email:
[EMAIL PROTECTED]
******************************************************************************
--- End Message ---
--- Begin Message ---
Or better yet... try Apache... (www.apache.org)... or switch to a better
application launcher like w2k...
Cheers
Luis Ferro
Waldemar Brand Neto wrote:
According Micro$oft PWS will not work under Windows ME, try Windows 98 or
2000.
----- Original Message -----
From: "Lewis J Hannah" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 15, 2003 12:49 PM
Subject: [PHP-WIN] PHP/PWS 3.0
Hello,
I am trying to get PHP to work under PWS 3.0/WinMe. However, every time
I try to access a virtual directory on the localhost, I receive an error
message stating that the server cannot be found, or DNS error. I check
all the configuration settings in the php.ini file and in the Registry,
and they seem to be correct. I don't know what else could be wrong.
Thanks,
Lewis J Hannah
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---
[This E-mail scanned for viruses by Declude Virus]
--- End Message ---
--- Begin Message ---
Either noone can read this message, or noone can help about it?
Come on ppl give me some feedbacl
"Radovan Radic" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all
>
> I got (i think) heavy task for my school project. I
> hope someone can help
> me.
> Script needs to find key words (for example: computer,
> science)
> It should search in url or mail
> Script should find words within meta-tags (i know how
> to do it) and:
> In the body of html (url or email) but only if the
> words are different color
> than the background!
> BG could be table, tr, td, body...
> Do i need to parse it, how can i obtain color of the
> found text, is preg()
> helpful...?
>
> Could anyone help me with the tips
>
> Thx,
> Radovan
>
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
--- End Message ---
--- Begin Message ---
Radovan,
Searching for words that are not the same color as the background could be
interesting depending on a lot of things.
1. Does the page use CSS?
2. Are background/font colors defined as "red" or "#FF0000"?
3. Where are background colors defined? (i.e. <body> or <table> or <td> or
...) (you already answered this one...oops)
4. Are you loading this into a database or is it a script to search just a
single page?
This sounds rather complicated, but nothing a clever hack couldn't fix :)
You'll likely want to read the file line by line, storing the most current
background color in a variable, then comparing to see if any text is NOT
that color, then loading those words to an array (likely). Then, if a
background color changes, you'll update the variable (at that point).
Perhaps, if background colors are always defined as bgcolor, you should
split the string up by that so if a bgcolor setting is midway through the
line it won't miss text before that bgcolor setting. i.e.:
<hr><font color=#555555>blah grey text<table bgcolor=#555555>
<tr><td>moretext</td></tr></table>
etc.
Just thoughts off the top of my head. No guarantees.
-Dash
LIBRA (Sep. 23 to Oct. 22)
Your desire for justice and truth will be overshadowed by your
desire for filthy lucre and a decent meal. Be gracious and
polite. Someone is watching you, so stop staring like that.
On Fri, 17 Jan 2003, Radovan Radic wrote:
> Either noone can read this message, or noone can help about it?
>
> Come on ppl give me some feedbacl
>
> "Radovan Radic" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi all
> >
> > I got (i think) heavy task for my school project. I
> > hope someone can help
> > me.
> > Script needs to find key words (for example: computer,
> > science)
> > It should search in url or mail
> > Script should find words within meta-tags (i know how
> > to do it) and:
> > In the body of html (url or email) but only if the
> > words are different color
> > than the background!
> > BG could be table, tr, td, body...
> > Do i need to parse it, how can i obtain color of the
> > found text, is preg()
> > helpful...?
> >
> > Could anyone help me with the tips
> >
> > Thx,
> > Radovan
> >
> >
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> > http://mailplus.yahoo.com
>
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
You could also take lumps of HTML. Read it all into one string, the
break it out into the tags. So everything inside <td>....</td> is
brought out. If there's a colour change in there, that can be brought
out too.
Use simple reg exp's to pull out everything between tags. You could then
categorise it in an array depending on what colour it's set too.
If you using CSS, this could get complicated, as you'd have to check the
class against whatever it's stored in the CSS.
Not a simple task, but certainly would make an interesting project!!!
If your going to make a database search, you could have a script to
index and categorise each page first. Pull out text and stick in in the
database with relations to what colour it is for instance. Would make
your actual search script run a lot faster that's for sure...
chris kranz
fatcuban.com
-----Original Message-----
From: Radovan Radic [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 17, 2003 7:46 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: PHP Search
Either noone can read this message, or noone can help about it?
Come on ppl give me some feedbacl
"Radovan Radic" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all
>
> I got (i think) heavy task for my school project. I
> hope someone can help
> me.
> Script needs to find key words (for example: computer,
> science)
> It should search in url or mail
> Script should find words within meta-tags (i know how
> to do it) and:
> In the body of html (url or email) but only if the
> words are different color
> than the background!
> BG could be table, tr, td, body...
> Do i need to parse it, how can i obtain color of the
> found text, is preg()
> helpful...?
>
> Could anyone help me with the tips
>
> Thx,
> Radovan
>
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---