php-general Digest 8 Mar 2003 18:31:42 -0000 Issue 1926
Topics (messages 138725 through 138769):
Re: Access
138725 by: Uttam
Session hanling & session disabled
138726 by: Jacques Jocelyn
mysql connect to database problem
138727 by: Karl James
Re: Difference between & &&
138728 by: James Taylor
138729 by: Leif K-Brooks
138733 by: Leif K-Brooks
138736 by: Jome
138758 by: Ernest E Vogelsinger
138759 by: Ernest E Vogelsinger
Tryng To Prevent Caching on IE 5-6.0
138730 by: Kurst
138731 by: Bryan Lipscy
138734 by: Kurst
138741 by: Andre Dubuc
Re: Mining a file for data
138732 by: Hugh Danaher
138762 by: Ernest E Vogelsinger
Re: Displaying few words from record in mySQL
138735 by: Nik Makepeace
138755 by: chris
Re: $PHPSESSID
138737 by: Ernest E Vogelsinger
138757 by: Jim Lucas
Re: error while reading google-search-results]
138738 by: Jens Lehmann
138746 by: James
repost: cookie problem
138739 by: H. Miersch
138748 by: Marek Kilimajer
Re: Configure with register_globals on
138740 by: Frank Keessen
Video clip
138742 by: Anthony Rodriguez
138743 by: daniel
Re: Php +Xml?
138744 by: James
138747 by: daniel
138760 by: Alexandru COSTIN
Re: require_once adds a "1"
138745 by: James
Re: Executing PHP code in a database
138749 by: Ernest E Vogelsinger
Re: Is this possible? Group related results from mysql to one field…
138750 by: Marek Kilimajer
Text>Image
138751 by: Christopher Smith
138752 by: David Rice
Re: test for rtf
138753 by: bill
PHP removing data...
138754 by: Doug Coning
138761 by: Ernest E Vogelsinger
Functions internal to a class implementation
138756 by: trlists.clayst.com
Really simple question - /php directory above /web tree .htaccess contents
138763 by: news.php.net
138765 by: Ernest E Vogelsinger
Re: Calculate UTC Time from GPS device
138764 by: YC Nyon
Re: Displaying few words from record in mySQL [WORKS]
138766 by: Rahul.Brenda
Deleting Files
138767 by: Vernon
138768 by: Ernest E Vogelsinger
138769 by: Ernest E Vogelsinger
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 ---
Not yet.
And if there ever will it can not be odbc_connect(), may be something like
access_open()?
regds,
-----Original Message-----
From: Kiswa [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 08, 2003 01:03
To: [EMAIL PROTECTED]
Subject: Access
Hi.
Is their anyway to connect to a Access Db using only the filesystem like
$connect = odbc_connect("\Db\Webdb.mdb", "nobody", "nobody");
thus pointing directly to the file not using drivers???
--- End Message ---
--- Begin Message ---
Hi all,
Since the upgrade to php 4.3 I have several issue with my session handling
and my URL. First of all I currently use the following code :
<?
$chaine = "nav.php";
$url_array = explode("/", $_SERVER['REQUEST_URI']) ;
$url = array() ; $stop = true ;
while (list($key, $val) = each($url_array)){
if ($val == $chaine) $stop = false ;
if (! $stop) $url[] = $val ;
}
$i = 0 ;
while (list($key, $val) = each($url)){
$nom = $url[$i++] ;
$$nom = $url[$i++] ;
}
//Then I call my session lib
if (!$SID){
@session_destroy();
@session_start();
$SID=session_id();
}else{
session_start();
# . my customized code
}
?>
this allows me to have my URL in this format :
http://domain.tld/nav.php/page1/SID/abc123
instead of http://domain.tld/nav.php?page=page1&SID=abc123
Thus, all my link are in this format : <a
href="/nav.php/page/SID/<?=SID?>">
Since the upgrade to version 4.3, all my URL and link are in this format :
http://domain.tld/nav.php/page1/SID/abc123?PHPSID=abc123
As a result the Session ID becomes : abc123?PHPSID=abc123. the server cannot
find variables.related to the current session
I would like NOT to use cookies at all, but at soon as I start a session, a
cookies is sent to the browser.
I tried to change several ini variables (with no result), such as :
@ini_set("session.use_trans_sid","0");
@ini_set("session.use_cookies","0");
@ini_set("session.auto_start","0");
@ini_set("session.name","SID");
@ini_set("session.save_handler","files");
Do you have any idea how to force php to write the session information into
the session folder ?
the only way for me to keep my URL "clean" is to activate cookies. but if
cookies are refused by the visitor, the website will be unusable (member
section etc)
I will appreciate any help from you.
Thanks,
Jacques
--- End Message ---
--- Begin Message ---
Is there anyone online line that I
Can chat with realtime on MSN or IRC
Cause im having a problem where my stuff will
Work locally but when I upload the files to the webserver
They don't work at all.
And im pretty sure I uploaded to the write directory
And are using the right usernames and passwords.
Here is the site
And by the way all the code is to see if I am
Getting a proper connection to the database.
http://66.12.3.67/webdb/webdb13/assignment_1.php
thanks
ultimatefootballleague.com/index.php
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Where can I read more about this? I'm not sure that I understand why 4
& 4 == 4.
-----Original Message-----
From: Greg Beaver [mailto:[EMAIL PROTECTED]
Sent: Friday, March 07, 2003 11:04 PM
To: [EMAIL PROTECTED]; James Taylor
Subject: [PHP] Re: Difference between & &&
Hi James,
& is a bit-wise AND. && is a logical AND. The bitwise AND will return
a number, the logical AND will return true or false boolean values.
It's a subtle distinction, but important. 4 & 4 == 4 4 && 4 == true ==
1
Regards,
Greg
--
phpDocumentor
http://www.phpdoc.org
James Taylor wrote:
> Ok, this may have already been posted to the list already, but the
> archives don't seem to like the & and && characters.
>
> I'm running into some code that looks like this:
>
> <snip>
> Define('INPUT', 2);
> <snip>
> if($search->level & INPUT) $tmp.= $search->input();
>
>
> Ok, what's the & mean?
>
> As far as I could tell from the very little documentation I was able
> to scrape up on google, & is a bit-by-bit operator. Thus, if either
> INPUT or $search->level, we get TRUE... If that's the case, what's the
> point of using it instead of || ?
>
> Or, do I just totally not understand the point of this. Thanks
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Not sure where you can read more, but let me try to explain it. The
bitwise operators operate on a binary representation of a number. 4 is
100 in binary, 5 is 101. 5 | 4 results in 5, because the | operator
sets bits set in either number. 5 & 4 results in 4, because the &
operator only sets bits set in both. As for 4 & 4, the same bits are
set in both 4 and 4 (since they're the same number! :)), so it results
in the same number.
James Taylor wrote:
Where can I read more about this? I'm not sure that I understand why 4
& 4 == 4.
-----Original Message-----
From: Greg Beaver [mailto:[EMAIL PROTECTED]
Sent: Friday, March 07, 2003 11:04 PM
To: [EMAIL PROTECTED]; James Taylor
Subject: [PHP] Re: Difference between & &&
Hi James,
& is a bit-wise AND. && is a logical AND. The bitwise AND will return
a number, the logical AND will return true or false boolean values.
It's a subtle distinction, but important. 4 & 4 == 4 4 && 4 == true ==
1
Regards,
Greg
--
phpDocumentor
http://www.phpdoc.org
James Taylor wrote:
Ok, this may have already been posted to the list already, but the
archives don't seem to like the & and && characters.
I'm running into some code that looks like this:
<snip>
Define('INPUT', 2);
<snip>
if($search->level & INPUT) $tmp.= $search->input();
Ok, what's the & mean?
As far as I could tell from the very little documentation I was able
to scrape up on google, & is a bit-by-bit operator. Thus, if either
INPUT or $search->level, we get TRUE... If that's the case, what's the
point of using it instead of || ?
Or, do I just totally not understand the point of this. Thanks
--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt
to decrypt it will be prosecuted to the full extent of the law.
--- End Message ---
--- Begin Message ---
It says " We connected successfully!" for me. Is this the local copy?
It's kind of hard to pinpoint the problem with no code...
Karl James wrote:
Leif
Is there a chance you can help me with my parsing problem
I have file where im trying to upload to a server to check
To make sure I can get a connection to my mysql database
When I try to view the php file locally on my machine
I have no worries
But when I upload to the web I get a blank white page
This is the url
http://66.12.3.67/webdb/webdb13/assignment_1.php
Any advise would be helpful, I am struggling
Thanks
ultimatefootballleague.com/index.php
[EMAIL PROTECTED]
-----Original Message-----
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 08, 2003 2:20 AM
To: James Taylor
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Difference between & &&
Not sure where you can read more, but let me try to explain it. The
bitwise operators operate on a binary representation of a number. 4 is
100 in binary, 5 is 101. 5 | 4 results in 5, because the | operator
sets bits set in either number. 5 & 4 results in 4, because the &
operator only sets bits set in both. As for 4 & 4, the same bits are
set in both 4 and 4 (since they're the same number! :)), so it results
in the same number.
James Taylor wrote:
Where can I read more about this? I'm not sure that I understand why 4
& 4 == 4.
-----Original Message-----
From: Greg Beaver [mailto:[EMAIL PROTECTED]
Sent: Friday, March 07, 2003 11:04 PM
To: [EMAIL PROTECTED]; James Taylor
Subject: [PHP] Re: Difference between & &&
Hi James,
& is a bit-wise AND. && is a logical AND. The bitwise AND will return
a number, the logical AND will return true or false boolean values.
It's a subtle distinction, but important. 4 & 4 == 4 4 && 4 == true
==
1
Regards,
Greg
--
phpDocumentor
http://www.phpdoc.org
James Taylor wrote:
Ok, this may have already been posted to the list already, but the
archives don't seem to like the & and && characters.
I'm running into some code that looks like this:
<snip>
Define('INPUT', 2);
<snip>
if($search->level & INPUT) $tmp.= $search->input();
Ok, what's the & mean?
As far as I could tell from the very little documentation I was able
to scrape up on google, & is a bit-by-bit operator. Thus, if either
INPUT or $search->level, we get TRUE... If that's the case, what's the
point of using it instead of || ?
Or, do I just totally not understand the point of this. Thanks
--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt
to decrypt it will be prosecuted to the full extent of the law.
--- End Message ---
--- Begin Message ---
James Taylor wrote:
> Where can I read more about this? I'm not sure that I understand why
> 4 & 4 == 4.
http://se.php.net/manual/en/language.operators.bitwise.php
Jome
--- End Message ---
--- Begin Message ---
At 05:54 08.03.2003, James Taylor said:
--------------------[snip]--------------------
>Ok, this may have already been posted to the list already, but the
>archives don't seem to like the & and && characters.
>
>I'm running into some code that looks like this:
>
><snip>
>Define('INPUT', 2);
><snip>
>if($search->level & INPUT) $tmp.= $search->input();
>
>
>Ok, what's the & mean?
>
>As far as I could tell from the very little documentation I was able to
>scrape up on google, & is a bit-by-bit operator. Thus, if either INPUT
>or $search->level, we get TRUE... If that's the case, what's the point
>of using it instead of || ?
--------------------[snip]--------------------
These are two totally different operators:
& - bitwise AND
&& - logical AND
So: 5 && 2 yields true
5 & 2 yields 0
In your example we would need to know the value of INPUT - it is most
certainly one of 1, 2, 4, 8, etc, denoting a single bit. So the expression
$search->level & INPUT
would yield nonzero (a.k.a. true) if the bit denoted by INPUT was set in
$search->level.
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--- End Message ---
--- Begin Message ---
At 08:04 08.03.2003, James Taylor said:
--------------------[snip]--------------------
>Where can I read more about this? I'm not sure that I understand why 4
>& 4 == 4.
--------------------[snip]--------------------
Bitwise comparison means just that, i.e. comparing two numbers bit by bit.
Any number is represented by a bit combination (this has technical reasons
- if a single "wire" has some electric potential set it's "1", if not it's
"0" (or is it the other way round? Can't remember...). A single "Byte" is
comprised of 8 such lines, each line representig a "Bit" with increasing value.
To read this correctly you need to have a monospaced font:
line number 7 6 5 4 3 2 1 0
| | | | | | | |
| | | | | | | |
line value 7 6 5 4 3 2 1 0
as power of 2: 2 2 2 2 2 2 2 2
dec. value: 128 64 32 16 8 4 2 1
Taking this, the decimal number "4" would look
0000 0100
written in binary notation.
Ok, now let's bitwise AND 4 and 4, walking bits left to right. If both bits
are set the resulting bit is also set (for an AND operation), if one or
both bits are not set this yields a zero bit:
0 & 0 => 0
0 & 0 => 0
0 & 0 => 0
0 & 0 => 0
0 & 0 => 0
1 & 1 => 1
0 & 0 => 0
0 & 0 => 0
I hope it seems logical that the result of bitwise ANDing a number to
itself always will result in the same number...
There are a couple of bitwise operators:
& (AND): the result contains bits set in both operands
| (OR): the result contains bits set in either operand
^ (XOR): the result contains bits set in either one or the other operand,
but not in both (0 ^ 1 = 1, 1 ^ 0 = 1, 1 ^ 1 = 0, 0 ^ 0 = 0)
Unary operands:
~ (NOT) reverses all bits of the single operand, e.g.;
~4 => 251 (~0000 0100 => 1111 1011)
Bit-Shift operators move the bits of a number to the left or right:
<< left shift ($a << $b means shift bits of $a $b-times to the left)
e.g. 4 << 1 = 8 (0000 0100 << 1 = 0000 1000)
>> right shift ($a >> $b means shift bits of $a $b-times to the right)
e.g. 4 >> 1 = 2 (0000 0100 >> 1 = 0000 0010)
HTH,
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--- End Message ---
--- Begin Message ---
Hello,
I've looked for the answer to this for a while and I have no broken down for
asking for help.
My problem is I have a few dynamic PHP sites. And all of them seem to be
doing the same problem to me no matter what or how hard I try.
All my sites seem to be caching heavily on IE 5 and 6 and not on any other
browser.
This is happening on the front page of the site the index.php page, which
generates unique custom content for the user that is time critical for them
to see. Since it's the first page that is hit on the site I can't put
anything snazzy like extensions or anything to make it look more dynamic (At
least not that I know of ;) ).
I am currently using apache 1.3 and PHP 4.2.3 on one system. On another
system I am using Apache 2.0.40 and PHP 4.2.2
On one site I have (currently) no cache control on the meta tags and have
all the cache control in the header of the html. (previously I had meta tags
in there all over the place and well it didn't help either :( )
My headers (Currently) for one site look like this
HTTP/1.1 200 OK
Date: Sat, 08 Mar 2003 07:22:04 GMT
Server: Apache/2.0.40 (Red Hat Linux)
Accept-Ranges: bytes
X-Powered-By: PHP/4.2.2
Last-Modified: Sat, 08 Mar 2003 07:22:04 GMT
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Pragma: no-cache
Cache-Control: no-cache, no-store, pre-check=0, post-check=0,
must-revalidate, max-age=0
Set-Cookie: YA_SESSION_ID=81950aafabc92d23faf4e6e1d786447a; expires=Sun,
09-Mar-03 19:22:04 GMT
Vary: User-Agent
Content-Type: text/html; charset=ISO-8859-1
So any suggestion! Any ideas! I'm going batty here!
Thanks and have a good one :)
--- End Message ---
--- Begin Message ---
Try: header("Cache-control: private");
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Bryan Lipscy [mailto:[EMAIL PROTECTED]
> Sent: Saturday, March 08, 2003 1:38 AM
> To: 'Kurst'; [EMAIL PROTECTED]
> Subject: RE: [PHP] Tryng To Prevent Caching on IE 5-6.0
>
> Try: header("Cache-control: private");
It's a very good suggestion and I thank you for it but IE is still caching
the data :(.
For those people who are wondering -
I used almost ever variation of that cache control in the header
That includes:
The cache-control as the only command, added to my huge cache-control
statement, and put on it's own line.
Anybody else have any suggestions or different ways?
Thanks for the advice :)
I appreciate it!
--- End Message ---
--- Begin Message ---
Hi Kurst,
I don't know whether what I'm about to pass on will be of any help, or close
to solving your problem, but perhaps the idea might lead you somewhere.
I was faced with a problem: As my index page loaded, I had to test to see
whether 'cookies' were enabled, without resorting to javascript. The reason I
had to check: without cookies, sessions wouldn't work properly. The user
would not be aware of anything amiss, until he accessed something from the db
-- then all forms were messed up.
The solution I hit upon was to create a test schema that relied on two
additional 'pages' been called. On the 'index' page, the main one I wanted
displayed, (and the one called for by url), has a simple script at the
beginning. I have found that the 'index' page is not cached since it must be
processed through this two-page filter on every encounter with the url --
else it is re-directed. Maybe it will work for you, or you could adapt it to
your needs?? (I'm only a one-year 'php-veteran from the trenches' :>)
Code follows:
Index page:
<?php session_start(); ob_start(); ?>
<?php
if ($_SESSION['test'] == "") {
$_SESSION['test'] = "1";
header("location: index-load.php");
}
?>
Index-load page:
<?php session_start(); ob_start(); ?>
<?php
if ($_SESSION['test'] == "1") {
$_SESSION['test'] = "1";
session_write_close();
header("location: index.php");
}
else {
header("location: index-message.php");
}
?>
Index-message page:
<?php session_start(); ob_start(); ?>
<?php
switch ($_SESSION['test']):
case "1":
header(location: index.php")
break;
case ""
$_SESSION['test'] = "1";
/* you can put whatever message, commands in here */
break;
endswitch;
?>
Hth,
Andre
On Saturday 08 March 2003 03:03 am, you wrote:
> > -----Original Message-----
> > From: Bryan Lipscy [mailto:[EMAIL PROTECTED]
> > Sent: Saturday, March 08, 2003 1:38 AM
> > To: 'Kurst'; [EMAIL PROTECTED]
> > Subject: RE: [PHP] Tryng To Prevent Caching on IE 5-6.0
> >
> > Try: header("Cache-control: private");
>
> It's a very good suggestion and I thank you for it but IE is still caching
> the data :(.
>
> For those people who are wondering -
> I used almost ever variation of that cache control in the header
> That includes:
> The cache-control as the only command, added to my huge cache-control
> statement, and put on it's own line.
>
> Anybody else have any suggestions or different ways?
>
> Thanks for the advice :)
> I appreciate it!
--- End Message ---
--- Begin Message ---
depending on how the text file is organized, this can be an easy task or
impossible. But, here goes:
If a line in the text file contains all the info about the card and is
organized routinely and separated by a special character ("," , ; or tab,
then you should be able to do something like the following:
<html>
<body bgcolor=navy>
<?php
$db=" ";
$table=" ";
$user=" ";
$pass=" ";
$link=mysql_connect("localhost","$user","$pass");
if (! $link) die("Can't log in at this time");
mysql_select_db($db,$link) or die ("Can't log in at this time");
print "<table align=center cellpadding=7 cellspacing=0 border=1
bgcolor=silver>";
$fp=fopen("persons.txt","r") or die ("Couldn't open file!");
while (!feof ($fp))
{
$persons=fgets($fp,100); // looks for \n (carrage return) or 100 characters
before moving on
list($image,$title,$first,$date,)= split ("\t", $persons, 6); /// splits
on tab
print "<tr>
<td>$first </td>
<td>$title </td>
<td>$image </td>
<td>$date </td>
</tr>";
$query="insert into $table (first, title, date, directory, image)
values ('".addslashes($first)."',
'".addslashes($title)."',
'".addslashes($date)."',
'".addslashes($directory)."',
'".addslashes($image)."' )";
$result=mysql_query($query);
if (!$result) die ("couldn't update $table".mysql_error());
}
fclose($fp);
mysql_close($link);
print "</table>";
?>
</body>
</html>
----- Original Message -----
From: "John Wulff" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 07, 2003 5:25 PM
Subject: [PHP] Mining a file for data
> I'm just learning PHP so please excuse my ignorance. I'm trying to
extract
> the data from a simply formatted text file via a simple PHP script. The
> goal of this project is to take Magic the Gathering spoiler lists and dump
> them into a MySQL database. I've got plenty of experience with MySQL but
> not file parsing. How do I about parsing this data? What sort of pattern
> recognition do I use (if that's the right term).
> Thanks for the help. The format of the file is below.
> -John
>
> Card Name: Akroma, Angel of Wrath
> Card Color: W
> Mana Cost: 5WWW
> Type & Class: Creature - Angel Legend
> Pow/Tou: 6/6
> Card Text: Flying, first strike, trample, haste, protection from black,
> protection from red. Attacking doesn't cause Akroma, Angel
> of Wrath to tap.
> Flavor Text: No rest. No mercy. No matter what.
> Artist: Ron Spears
> Rarity: R
> Card #: 1/145
>
> Card Name: Akroma's Devoted
> Card Color: W
> Mana Cost: 3W
> Type & Class: Creature - Cleric
> Pow/Tou: 2/4
> Card Text: Attacking doesn't cause Clerics to tap.
> Flavor Text: "Akroma asked for only one thing from her troops: unwavering,
> unconditional loyalty."
> Artist: Dave Dorman
> Rarity: U
> Card #: 2/145
>
> etc.. etc...
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Dear Hugh,
please don't use background colors. Black text on darkblue background is
definetely hard to decipher.
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--- End Message ---
--- Begin Message ---
On Sat, 2003-03-08 at 05:21, Rahul.Brenda wrote:
> Kevin,
>
> Your program certainly makes very good sense to me.
I have written an extension of the idea available at
http://nikmakepeace.com/goodies/abbreviate.phps
It takes 5 arguments:
string to be abbreviated,
length in characters to abbreviate to
(-ve values mean reduce string by this many chars)
place you want to abbreviate at (end, start or middle),
string used to abbreviate (included in the total length)
(default is "..." html entity)
whether to enclose the abbreviation in the <abbr> element
(title includes the whole string for mouseover)
I hope you or anyone else likes it. Maybe some day I'll actually do some
proper work instead of writing silly utilities.
Nik
--- End Message ---
--- Begin Message ---
On Fri, 7 Mar 2003 10:22:01 -0800 (PST), Rahul.Brenda
<[EMAIL PROTECTED]> wrote:
Glory & Supreme Power
What i'm looking to do is.. i want to display only the
first few words of the record in my mySQL database..
For example.. i have a table with a field "title"..
and let's say my last record has the value in title
field as
"This is going to be really cool"
What i want to display is
"this is going..."
Basically this is for News Headlines. I have a page
which displays news but on the first page of the site
i have to give the first few words of the last 4
articles in the news table..
How can i do this? I have seen this in a lot of places
but i dont know how to do this.
Thanks,
Rahul S. Johari
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
Make mysql do the work for you.
select substring_index(title, ' ', 20), author from news order by date desc
limit 4
// this particular string selects everything before the first 20 spaces of
your title.
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
--- End Message ---
--- Begin Message ---
At 05:45 08.03.2003, Liam Gibbs said:
--------------------[snip]--------------------
>Here's the newest brain teaser: I have cookies disabled (well, I have IE set
>to the highest security mode, where it disables cookies). I understand that
>with cookies enabled, $PHPSESSID will return nothing when it works. However,
>it will return a value when cookies are disabled and the page is refreshed
>after a cookie is attempted. I'm still getting nothing either way. Anybody
>know why?
--------------------[snip]--------------------
You mean the SID constant I assume. This constant is only defined if the
client didn't send the right cookie.
There's no global variable holding the session identifier - you can use
session_id() to retrieve (and set!) the current session identifier, and
session_name() to retrieve (and set!) the name of the session (which
usually is PHPSESSIONID).
For further information check out http://www.php.net/manual/en/ref.session.php.
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--- End Message ---
--- Begin Message ---
I think it might have something to do with --enable-trans-sid
read up on that
Jim
----- Original Message -----
From: "Liam Gibbs" <[EMAIL PROTECTED]>
To: "php list" <[EMAIL PROTECTED]>
Sent: Friday, March 07, 2003 8:45 PM
Subject: [PHP] $PHPSESSID
First of all, thanks all who helped with the min and max functions (that
works) and the dollar sign bit (which also works). Kudos. Couldn't have done
it without y'all!
Here's the newest brain teaser: I have cookies disabled (well, I have IE set
to the highest security mode, where it disables cookies). I understand that
with cookies enabled, $PHPSESSID will return nothing when it works. However,
it will return a value when cookies are disabled and the page is refreshed
after a cookie is attempted. I'm still getting nothing either way. Anybody
know why?
--- End Message ---
--- Begin Message ---
James Holden wrote:
Welcome to a mine field of problems :-)
1. The url you have entered is invalid. Thats a good first check to
make usually. Try /search?q=test to get that bit sorted.
Ok, this was just a typo. :)
2. Google prevents known useragents from accessing it's content as it
believes you are acting as a spider or a search engine stealing thier
content. To counter this you need to use a new url capturing method and
specifically set the name of the useragent. Use 'MSIE'. You can use
curl, lwp etc to do this kind of thing.
Curl is excellent, fast, highly configurable and execellent with secure
connections.
I heard about curl, but not about lwp. I can't find documentation for
lwp on php.net. I must check out if I can use one of these.
3. I suggest you don't do this - they prevent it for a reason.
It's part of a larger project and not especially related to google. The
script should be able to read in any website and do some processing. One
of its functions should (later) be to determine search engine positions.
Is there a simple way to do this without reading in the search results
of google (or other search engines)?
Jens
--- End Message ---
--- Begin Message ---
LWP is a perl thing. Curl is probably the best thing to use.
Have you tried using googles php api which they provide free?
http://www.google.com/apis/
"Jens Lehmann" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> James Holden wrote:
> >
> >
> > Welcome to a mine field of problems :-)
> >
> > 1. The url you have entered is invalid. Thats a good first check to
> > make usually. Try /search?q=test to get that bit sorted.
>
> Ok, this was just a typo. :)
>
> > 2. Google prevents known useragents from accessing it's content as it
> > believes you are acting as a spider or a search engine stealing thier
> > content. To counter this you need to use a new url capturing method and
> > specifically set the name of the useragent. Use 'MSIE'. You can use
> > curl, lwp etc to do this kind of thing.
> > Curl is excellent, fast, highly configurable and execellent with secure
> > connections.
>
> I heard about curl, but not about lwp. I can't find documentation for
> lwp on php.net. I must check out if I can use one of these.
>
> > 3. I suggest you don't do this - they prevent it for a reason.
>
> It's part of a larger project and not especially related to google. The
> script should be able to read in any website and do some processing. One
> of its functions should (later) be to determine search engine positions.
> Is there a simple way to do this without reading in the search results
> of google (or other search engines)?
>
> Jens
>
>
>
--- End Message ---
--- Begin Message ---
i've posted this before to the newsgroup, and i don't think it got
through to the mailinglist, so i'll try again.
hello.
i'm new to this NG, so i don't know if this is the right mailinglist
/ newsgroup for my problem. if not, please let me know which one to
post it to. anyway, here goes:
i'm designing a new website with several php scripts. for that
purpose i've configuerd my server (apache under MacOSX 10.2.4) to
process php. the scripts get executed as they should be. so far so
hoopy. the problem is the cookie. i have a login.php which checks
user input and depending on the results either sets a cookie,
displays a message and proceeds to the next page or returns to the
login page. the problem is, it doesn't work, the browser (netscape,
safari,...) never gets the cookie. the next page checks the cookie
and if it isn't set, it returns to the login page. since the cookie
isn't set, this keeps happening even when it should proceed to the
order forms.
now the strange thing: before i had to reinstall OSX, it worked nicely.
what can i do about this? any suggestions?
--
Spam protection: http://spamarrest.com
--- End Message ---
--- Begin Message ---
First find out if the cookie is send as it should be - use a php script
to simulate sending the login form and look at the response you will
recieve. Curl is great for this.
H. Miersch wrote:
i've posted this before to the newsgroup, and i don't think it got
through to the mailinglist, so i'll try again.
hello.
i'm new to this NG, so i don't know if this is the right mailinglist /
newsgroup for my problem. if not, please let me know which one to post
it to. anyway, here goes:
i'm designing a new website with several php scripts. for that purpose
i've configuerd my server (apache under MacOSX 10.2.4) to process php.
the scripts get executed as they should be. so far so hoopy. the
problem is the cookie. i have a login.php which checks user input and
depending on the results either sets a cookie, displays a message and
proceeds to the next page or returns to the login page. the problem
is, it doesn't work, the browser (netscape, safari,...) never gets the
cookie. the next page checks the cookie and if it isn't set, it
returns to the login page. since the cookie isn't set, this keeps
happening even when it should proceed to the order forms.
now the strange thing: before i had to reinstall OSX, it worked nicely.
what can i do about this? any suggestions?
--- End Message ---
--- Begin Message ---
Hi Mike,
I've googled something for you!
http://www.entropy.ch/software/macosx/php/#install
Everything about PHP and running it on the MAC OS X..
Regards,
Frank
----- Original Message -----
From: "Mike Tuller" <[EMAIL PROTECTED]>
To: "php mailing list list" <[EMAIL PROTECTED]>
Sent: Friday, March 07, 2003 5:49 PM
Subject: [PHP] Configure with register_globals on
> I am running OS X 10.2 and am trying to work with PHP and Adobe GoLive.
> GoLive tells me that I don't have PHP running, which I do, and on
> Adobe's site someone said that register_globals needs to be on. I know
> that this is not something that should be done, but I want to see if
> this is the problem with GoLive saying PHP is not installed. I don't
> have a php.ini file to change the values for register_globals to be on,
> so what do I need to add when I run configure to have register_globals
> turned on?
>
> Thanks,
> Mike
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Hi!
In PHP, does anyone know how I would display a video clip (.avi?) on a
specific spot on a Web page?
Thanks!
Tony
--- End Message ---
--- Begin Message ---
definbately OT dude , use the windows media player object embed code
>===== Original Message From Anthony Rodriguez <[EMAIL PROTECTED]> =====
>Hi!
>
>In PHP, does anyone know how I would display a video clip (.avi?) on a
>specific spot on a Web page?
>
>Thanks!
>
>Tony
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
There is nothing to install.
By default php usually comes with XML parser methods - however if you want
to invest time in running XSLT/XPATH styles against XML you need to install
server side software such as Sablotron or Saxon. We run Sablotron and it's
very good. We've also invested in Stylus Studio which is a good xml/xslt
development tool.
I'm not really sure what you want to do so it's difficult to help you
further. If you give a small idea of what it is you want to achieve then
it might be easier to help you on your way.
Jim.
"Dhaval Desai" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello people,
>
> I want to start using Xml with php. How do I install xml on Apache with
Php?
> I am running redhat 7.2,Apache 1.3.12 and php latest version.
>
> How do I install xml? I am totally new to Xml....and want to start
> somewhere...
>
> -Dhaval
>
>
>
>
>
> _________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> http://join.msn.com/?page=features/virus
>
--- End Message ---
--- Begin Message ---
wot exactly does the xml parse do over sablot ? and what benfit do u get
xml'ing an entire site , where some processes which come easy to do in php are
insanely tedious to replicate in xsl :|
>===== Original Message From "James" <[EMAIL PROTECTED]> =====
>There is nothing to install.
>
>By default php usually comes with XML parser methods - however if you want
>to invest time in running XSLT/XPATH styles against XML you need to install
>server side software such as Sablotron or Saxon. We run Sablotron and it's
>very good. We've also invested in Stylus Studio which is a good xml/xslt
>development tool.
>
>I'm not really sure what you want to do so it's difficult to help you
>further. If you give a small idea of what it is you want to achieve then
>it might be easier to help you on your way.
>
>Jim.
>
>
>"Dhaval Desai" <[EMAIL PROTECTED]> wrote in message
>news:[EMAIL PROTECTED]
>> Hello people,
>>
>> I want to start using Xml with php. How do I install xml on Apache with
>Php?
>> I am running redhat 7.2,Apache 1.3.12 and php latest version.
>>
>> How do I install xml? I am totally new to Xml....and want to start
>> somewhere...
>>
>> -Dhaval
>>
>>
>>
>>
>>
>> _________________________________________________________________
>> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
>> http://join.msn.com/?page=features/virus
>>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hello,
> Hello people,
>
> I want to start using Xml with php. How do I install xml on Apache with
Php?
> I am running redhat 7.2,Apache 1.3.12 and php latest version.
If you want to use SAX, you should already have it installed if you have
compiled PHP with '--with-xml'. (BTW, have you compiled PHP yourself? - do
you know how to compile PHP?).
First of all you should upgrade to a newer apache, as as far as I know
Apache 1.3.12 had some problem when ran with Sablotron (this would be needed
if you will want to use XML with XSL transformations)
Then you should use the domxml extension (add '--with-dom'
'--with-dom-xslt' '--with-dom-exslt' to your configure patch when you are
compiling PHP). After you compile PHP, you should have support for SAX, DOM
and XSL transformations.
And if you want a bootstrap to start using XMLs for content publishing,
you should also look at Krysalis at
http://www.interakt.ro/products/Krysalis/
Alexandru
>
> How do I install xml? I am totally new to Xml....and want to start
> somewhere...
>
> -Dhaval
>
>
>
>
>
> _________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> http://join.msn.com/?page=features/virus
>
--- End Message ---
--- Begin Message ---
<?
if ([EMAIL PROTECTED]("topten.php")){
echo "Loading of top ten failed on line ".__LINE__;
}
?>
"Gary" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Thanks for your response James!
> but still I must be doing something wrong the "1" is a persistent little
> bugger. Have you any tips on how to rewrite:
>
> <?php
> echo @ require_once("topten.php");
> ?>
> using the ob_methods?
> Again thanx for your response
> Gary
>
> James Holden wrote:
> > The '1' is received simply because your requirement clause echoed the
> > result to the page.
> >
> > include, require and include_once all return boolean results of 1 or 0
> > which indicates a successful loading of said include. If you want to
> > suppress the output of an include use ob_ methods which prevent output
> > the stdout.
> >
> > Simply putting 'include_once("anyfile.php")' will output whatever
> > processes occur within that include.
> > Putting the echo statement will additionally output the status of the
> > include operation.
> >
> > Regards,
> > Jim
> > londontown.com
> >
> >
> > Ernest E Vogelsinger wrote:
> >
> >> At 17:28 07.03.2003, Gary spoke out and said:
> >> --------------------[snip]--------------------
> >>
> >>
> >>> Hi
> >>> I've included the following in a php document:
> >>> <?php
> >>> echo @ require_once("anyfile.php")
> >>>
> >>>
> >>> and it works exactly as I expect except at the end of the included
> >>> document theres a single "1" displayed. I've noticed also that if I
> >>> include a document in the included document the end result will be
> >>> the document I want exactly as I want it with the addition of two
> >>> ones "11"s can anyone tell me how to get rid of the ones?
> >>> (if I run anyfile.php by itself there are no "1"s)
> >>>
> >>>
> >> --------------------[snip]--------------------
> >>
> >> This happens if the included file returns some value, in your case
> >> it seems to return "true". Remove the return <something> statement
> >> (you may simply "return;" if necessary) and the 1 will be history.
>
>
--- End Message ---
--- Begin Message ---
At 06:15 08.03.2003, Leo Spalteholz said:
--------------------[snip]--------------------
>I have a table that stores all the "boxes" that my website will
>display on the sides. So far the content is simply stored in a text
>field and then substituted for the box body. However this way I
>can't have any php code in the boxes... What I thought I could do is
>have another field that will contain any php code that I want for
>that box and then execute that after I read it from the database.
>
>So I have two questions basically.
>1. How would I go about executing php code in a string?
>Say I have $code = "md5('blah');" how would I execute the code in
>the string?
To execute any code contained within a string you need to eval() it.
Assuming you have this piece of code
$uname = 'Leo';
$text = "<b>Hello there, <?php echo \$uname; ?></b>";
eval("?>$text<?php ;");
Note that you first escape from PHP in order to correctly "execute" plain text.
>2. If I instead include a file would it have access tio the local
>variables?
>
>Ie. In a class I have this:
>$strContent = "blah, this is the content I got from the database";
>include("includefilefromdatabase.php");
>
>Is the $strContent variable then available from the include file?
Yes. See http://www.vogelsinger.at/test.php for an example (will be
available for 1-2 days).
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--- End Message ---
--- Begin Message ---
The only way that comes to my mind is using a SET column type - in
related table you would not wave toid relating to categories, but
instead it would be of type SET("demonstrations","people"). This column
can be set to
"" -empty, no category
"demonstrations"
"people"
"demonstrations,people"
But SET column is limited to 64 different members, still you can use
more columns.
Victor Spång Arthursson wrote:
Hi!
Perhaps this is a little bit of topic, but if it's not possible to fix
directly when the result is returning from mysql I need some tips on
an intelligent solution...
This is the problem: I'm searching the database for files and i get
some results. In the sql I have a LIMIT to split the result up. Every
file can have none, one or several categories associated with it. This
is done by having an extra table between the table with the references
to the files and the table with the categories. What I want to do is
to get all categories associated with an file concatenated and
returned in _one_ field together with the other data. Look below for
visualisation.
I'm having this main table with references to files in it:
files
+-----+-------------+
| id | filename |
+-----+-------------+
|168 |v008-12.jpg|
+-----+-------------+
Then I have this table to relate one file to one or several categories:
relatedtable
+-----+--------+------+
| id | fromid | toid |
+-----+--------+------+
| 4 | 1 | 2 |
| 257 | 2 | 2 |
+-----+--------+------+
Which lies in this table for categories:
categories
+----+--------------+
| id | categoryname | stickword
+----+--------------+
| 5 | demonstrations |
| 6 | people |
+----+--------------+
The following sql:
SELECT DISTINCT
files.id, files.filename, categories.categoryname
FROM
files
LEFT JOIN
relatedtable
ON
files.id = relateratabell.fromid
LEFT JOIN
kategorier
ON
relatedtable.toid = categories.id
WHERE
(relatedtable.fromid IS NULL OR relatedtable.fromid IS NOT NULL)
AND
files.stickword LIKE '%basta%' //for example
ORDER BY
filename;
Gives the following result:
+---+-----------+--------------------------+
| id | filename | categoryname |
+---+-----------+--------------------------+
| 166| v007-86.jpg | demonstrations |
| 166| v007-86.jpg | people |
| 167| v008-03.jpg | demonstrations |
| 167| v008-03.jpg | people |
+---+-----------+--------------------------+
This is what I expected it to, but I'ld rather get a result as this one:
+---+-----------+--------------------------+
| id | filename | categoryname |
+---+-----------+--------------------------+
| 166| v007-86.jpg | demonstrations, people |
| 167| v008-03.jpg | demonstrations, people |
+---+-----------+--------------------------+
Where the categories have been collected together into the same field,
so that I don't get multiple rows for the same file… Is this possible
to achieve?
Many many thanks to the one who can give me some input!
Sincerely
Victor
--- End Message ---
--- Begin Message ---
Greetings,
I've recently searched newsgroup archives on how to convert text into an
image. However, I cannot seem to find a clear example on how to create the
image dimensions based on the size of a textfile and then once I create the
initial image how to paint the text on the image based on how it appears in
the textfile. Any help with this would be helpful. Thank-you for your time!
--- End Message ---
--- Begin Message ---
On Saturday, March 8, 2003, at 08:49 AM, Christopher Smith wrote:
Greetings,
I've recently searched newsgroup archives on how to convert text
into an
image.
Another good place to get start-up information, assuming that GD is
available on your setup, is the manual:
http://www.php.net/manual/en/ref.image.php
However, I cannot seem to find a clear example on how to create the
image dimensions based on the size of a textfile
What do you mean "based on the size of a text file"? Number of bytes?
Lines?
and then once I create the
initial image how to paint the text on the image based on how it
appears in
the textfile.
Again, it is unclear to me what you mean by "based on how it appears in
the textfile"?
Is your text file broken into lines, and you want to create your image
with the same line breaks? If so, there are a couple of examples in the
comments for the imagettfbbox() and
imagettftext() functions. I know the last comment contains an example
that can do multiple lines (Brian at PrintsMadeEasy dot com) There's a
link to the code and a working demo. When I modified the code to
anti-alias the text it looked rather good. YMMV
Any help with this would be helpful. Thank-you for your time!
HTH.
David
--- End Message ---
--- Begin Message ---
Just a note, testing for those characters is trickier than it sounds. The
backslash throws off the test. Here's what I did on a POST form. Note the
-two- backslashes.
$chkstring=substr($thisfile,0,5);
if ("$chkstring" != "{\\rtf") {
// fail
}
This seems to work, but I'm wondering if there's a better way.
Brady Hegberg wrote:
> You could always open it and see if the first few characters are
> "{\rtf1".
>
> Brady
>
> > Is there any way to test a file to confirm it is an RTF file?
> >
> > I'm thinking along the lines of how we can test for an image with
> > getimagesize().
> >
> > kind regards,
> >
> > bill
> >
--- End Message ---
--- Begin Message ---
Hi all,
I'm trying to save a text file from my server to a client machine through
PHP and am using the following headers:
header("Content-type: application/text");
header("Content-Disposition: attachment; filename=variables.txt");
The header does save a text file from the server to my desktop alright, but
it strips everything in the text file. I have a file named variables.txt
with nothing in it. I have uploaded a text file that does have test data in
it. Furthermore, I set all the user rights in Unix to Read / Write/Execute
but everytime PHP opens or saves it, it does so without any of the variables
I've entered.
Does anyone have a suggestion as to what I'm doing wrong?
Thanks!!!!
Doug Coning
--- End Message ---
--- Begin Message ---
At 17:12 08.03.2003, Doug Coning said:
--------------------[snip]--------------------
>Hi all,
>
>I'm trying to save a text file from my server to a client machine through
>PHP and am using the following headers:
>
>header("Content-type: application/text");
>header("Content-Disposition: attachment; filename=variables.txt");
>
>The header does save a text file from the server to my desktop alright, but
>it strips everything in the text file. I have a file named variables.txt
>with nothing in it. I have uploaded a text file that does have test data in
>it. Furthermore, I set all the user rights in Unix to Read / Write/Execute
>but everytime PHP opens or saves it, it does so without any of the variables
>I've entered.
--------------------[snip]--------------------
Try to add the Content-length header and see if this resolves your problem:
header("Content-type: application/text");
header('Content-Disposition: attachment; filename="variables.txt"');
header('Content-Length: ' . strlen($contents));
I made a habit to send the "filename" part in double quotes - some user
agents seem to require this although it's not required by RFC (RFC822,
RFC2183). Since doing this it always works for me :)
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--- End Message ---
--- Begin Message ---
I have a class for elements of an HTML form and a bunch of subclasses
for text box, radio, etc.
I need some utility functions which will be called by some of the
subclass implementations. These are utilities used within the class
only, they are not methods.
Is there a "best" way to implement this given that there are no private
functions in PHP? The options seem to be to define the utilities
globally, or define them as methods in the superclass and call them
with superclass::func(); in either case I would never call them
externally.
Thanks for any tips,
----------
Tom Rawson
--- End Message ---
--- Begin Message ---
Greetings,
I am using php on a Sun Cobalt Linux
server with many virtual hosts.
I want to have the /php directory
one directory above the /web root
so it is not accessible from browser command line execution but
will execute from a click on an
html page. CGI-PHP is installed
but I need to know the .htaccess
contents for the /cgi/php directory
If that is not possible.......
and I put the /php directory under
the /web root; would have to protect
it from browser command line execution
with a .htaccess file.
I would appreciate help with either of
the .htaccess contents that are required.
This question I think is very simple for
some of the more experienced php users
and I can't find the answer in any
documentation.
Thanks very much for any help.
Gerald Howse
###########
m2 mail ----- http://www.opera.com/m2/
--- End Message ---
--- Begin Message ---
At 17:58 08.03.2003, news.php.net said:
--------------------[snip]--------------------
>I want to have the /php directory
>one directory above the /web root
>so it is not accessible from browser command line execution but
>will execute from a click on an
>html page. CGI-PHP is installed
>but I need to know the .htaccess
>contents for the /cgi/php directory
Of course this is possible. You just cannot directly run any PHP script by
URL if it's located outside the web root, but you could easily use stub
files running that part of the application you wish to use.
I assume you have some libraries that you'd like to include in your stub files:
-- stub.php
<?php
require_once('../php/library1.php');
?>
So there's no real need for an .htaccess-based blocker.
However here's what you need in .htaccess )line numbers only for
explanation below):
1 AuthName "The name of your realm"
2 AuthType Basic
3 AuthUserFile /etc/httpd/.htpasswd
4 AuthGroupFile /etc/httpd/.htgroup
5 Require group authorized_users
6 Order deny,allow
7 Deny from all
8 Allow from 10.10.10.0/24
9 Allow from ##.##.##.##
10 Satisfy any
Explanation:
1 - This is the text that will appear on the authentication dialog at the
clients side.
2 - There are others (like NTLM) but I don't have any experience using
them. Take care that "Basic" doesn't provide any encryption of transmitted
UserID/Passwords; it just Base64-encodes it.
3 - Where the password file is located. It may be anywhere, even outside
the web root, as long as it is readable by Apache. You create and maintain
the .htpasswd file using the htpasswd command line utility.
4 - Optional; contains user groups. Maintained by text editor. Format:
group: user user user
group: user user user
5 - Names of user groups that may access the ddirectory. You may as well use
Require user user-id user-id
if you don't support groups.
6 - Order of ACL check (http://httpd.apache.org/docs/mod/mod_access.html#order)
7 - Deny all hosts and users (checked first, see 6)
8 - Allow from the internal network (example, not required)
9 - Allow from any other IP or subnet (example, not required)
10 - http://httpd.apache.org/docs/mod/core.html#satisfy
Allow access if _any_ of the above restrictions is met. If you specify
Satisfy all
the above example would never allow access since no host can be on
different addresses...
Note that "AllowOverride AuthConfig" must be set in the server or virtual
host definition if authentication is to be used via .htaccess.
The authentication directives can be used in the server config at the
<Directory> level, or in the .htaccess file.
Formore info on Apache directives read
http://httpd.apache.org/docs/mod/directives.html.
HTH,
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--- End Message ---
--- Begin Message ---
Hi,
I got time data from a GPS unit like 054544 which is rollback to 1970s or
something.
Has anyone got script to convert it into current time?
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
--- End Message ---
--- Begin Message ---
Chris..
2 words for you.. "WOW" and "WOW".
This works real well.. thanks. I didn't know it was
possible through an SQL statement.
Nik & Kevin, thanks a lot .. but this SQL Query works
too efficiently and fast.
Thanks again..
Rahul S. Johari
> Make mysql do the work for you.
>
> select substring_index(title, ' ', 20), author from
> news order by date desc
> limit 4
> // this particular string selects everything before
> the first 20 spaces of
> your title.
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
--- End Message ---
--- Begin Message ---
I need to have files that exist within a folder on my server based on the a
MySQL record that contains it's name. What command would I be looking for in
the php functions list? Anyone?
Thanks
--- End Message ---
--- Begin Message ---
At 19:14 08.03.2003, Vernon said:
--------------------[snip]--------------------
>I need to have files that exist within a folder on my server based on the a
>MySQL record that contains it's name. What command would I be looking for in
>the php functions list? Anyone?
--------------------[snip]--------------------
file_exists($filename);
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--- End Message ---
--- Begin Message ---
At 19:14 08.03.2003, Vernon said:
--------------------[snip]--------------------
>I need to have files that exist within a folder on my server based on the a
>MySQL record that contains it's name. What command would I be looking for in
>the php functions list? Anyone?
--------------------[snip]--------------------
Sorry, just saw you wanted to DELETE the files...
It's "unlink($filename);"
Note you need to have write access to the directory (not only the file) to
delete it.
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--- End Message ---