[PHP] diffence between two numbers...

2005-04-15 Thread Tristan . Pretty
I need to know the difference between two numbers...
eg:

$a = 7;
$b = 27;
somefunction($a, $b)
// outputs 20

$a = 10;
$b = 12;
somefunction($a, $b)
// outputs 2

etc...
does that exist?

Re: [PHP] file upload

2005-03-24 Thread Tristan . Pretty
http://www.hotscripts.com/Detailed/24113.html
take a look at this.. perhaps you can reverse engineer it





William Stokes [EMAIL PROTECTED] 
24/03/2005 09:18

To
php-general@lists.php.net
cc

Subject
[PHP] file upload






Hello,

I'm (slowly) learning how to make a file upload stuff with php. Now I 
would 
like to know how to define the servers upload directory in the code?

For example I have the upload script in folder /www in the www.domain.com 
server and I want upload the files to /www/uploads folder. So how do write 

the  path in the php script?

Thanks
-Will

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Got to be an easier way to get a list of files/folders?

2004-12-22 Thread Tristan . Pretty
I'm writing a photo gallery for my site.
I want to make it as idiot proof as possible...
What I'm planning, is to is upload my pics to a folder in the photo 
directory, and then run a scan to see what new folders there are.
All good, I've built a DB backend to lsit teh folders etc...
but I need to be able to list all the folders Vs my list of folders in my 
DB...

How can I get a list of folders and files within them, without using a 
massive script like this:?
http://uk.php.net/manual/en/function.readdir.php

I'm new to file manipulation, and if I'm being dumb, sorry...
Tris...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Got to be an easier way to get a list of files/folders?

2004-12-22 Thread Tristan . Pretty
Ignore me.. I'm dumb after all...
I found what I needed in my very first PHP book...!
Jeeez, is it Friday yet???







[EMAIL PROTECTED] 
22/12/2004 16:20

To
php-general@lists.php.net
cc

Subject
[PHP] Got to be an easier way to get a list of files/folders?






I'm writing a photo gallery for my site.
I want to make it as idiot proof as possible...
What I'm planning, is to is upload my pics to a folder in the photo 
directory, and then run a scan to see what new folders there are.
All good, I've built a DB backend to lsit teh folders etc...
but I need to be able to list all the folders Vs my list of folders in my 
DB...

How can I get a list of folders and files within them, without using a 
massive script like this:?
http://uk.php.net/manual/en/function.readdir.php

I'm new to file manipulation, and if I'm being dumb, sorry...
Tris...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] URL variables, and the $_GET[xxx] function...

2004-10-21 Thread Tristan . Pretty
I'm moving hosts for a freelance site I do...

They have an events section, and it's sortable by date, name and category 
etc...
To achieve this, I passed the search/sort variables via the URL...
However, I'm testing the new server, and those variables are not being 
detected?

I've put this code at teh top of the code on events page '$sort_by = 
$_GET[sort_by];' etc...
And while that sorts out the problem, I'm curious as to why I need to do 
that, and if those changes will cause me probs elsewhere?

Perhaps a rookie Q, but I guess we all learn something every day eh?

Any thoughts?
Tris...

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] converting from name - id and PHP not seeing it?

2004-09-23 Thread Tristan . Pretty
I jsut finished converting my pages to be W3C compliant...
One of the recuring 'errors' I had was my form elements were all using the 
'name' atrtribute...
apparently, this is bad, and I was suggested to switch them ti use the 
'id' attribute...

all good, I did that, but for some reason, when I post that info to 
another page, it's not carried over...
name works fine, id does not...

Am I being a tool?
What am I supposed to use...?

I use $_POST[variable] in my code..., so I tried just $variable... that 
failed too...?

Thoughts?

Tris...

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] mail() and the From: attribute...

2004-08-13 Thread Tristan . Pretty
I'm sending out a mail, en mass to about 25 people, using the while loop from a MySQL 
query...
 
Anyhoo,
In the mail() function, if I use the final field for the From: attribute.
I'm having probs...
 
HAving:
...From: [EMAIL PROTECTED]); doesn't work on all recipients... BUT..
... From: justaname); Works on others... but not all...?
 
Surely this can't be? I've never come accross this before?
Any ideas what's up?
 
Tris...
*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***


Re: [PHP] mail() and the From: attribute...

2004-08-13 Thread Tristan . Pretty
I've tried just having a name, and it still doesn't reach my notes based E-mail... :-(
Hmmm, also, how do you specify to send in the BCC field, using the mail() function?
 
All in all, we're getting there..!
 

 
-John Nichel [EMAIL PROTECTED] wrote: -


To: [EMAIL PROTECTED]
From: John Nichel [EMAIL PROTECTED]
Date: 08/13/2004 01:52PM
Subject: Re: [PHP] mail() and the From: attribute...

[EMAIL PROTECTED] wrote:
 I'm sending out a mail, en mass to about 25 people, using the while loop from a 
 MySQL query...

You could send out just one mail, and put all the names in the BCC 
field.  Save yourself a few SMTP connections.  I think there's a limit 
to how many addresses you can have in a field but you should be safe 
with a small number like 25 (if not, you can break it up into like 3 
emails).

 Anyhoo,
 In the mail() function, if I use the final field for the From: attribute.
 I'm having probs...
  
 HAving:
 ...From: [EMAIL PROTECTED]); doesn't work on all recipients... BUT..
 ... From: justaname); Works on others... but not all...?
  
 Surely this can't be? I've never come accross this before?
 Any ideas what's up?

My guess would be that it's on the client end.  Have you tried 
formatting it like this...

From: John Doe 

-- 
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***


[PHP] Combining two variables...

2004-08-04 Thread Tristan . Pretty
I'm trying to create a links page, and I wanna filter by category.
Anyhoo,
What I need to do, is have one block of code that I repeat ad neaseum, based on each 
category, so if I adda  new category, I don't need to add new code...
 
All good so far.
So I have a variable $show_links but I wanna change that slightly each time to include 
the category name.. eg:
$show_links_$category
 
But PHP gets all confused...
What can I do to enable that?
 
Tris...
 
 

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***


[PHP] PHP upgrade... issues???

2004-07-15 Thread Tristan . Pretty
I've just got this mail from my host...
=
Dear customer,

This email is sent to inform you that we'll upgrade the PHP version on 
your
server to the latest stable version 4.3.8 within the next hour.
=

Are there any issues that I need to panic about...?
I'm off to google now, but am just having a panic attack, and hope that I 
can sit back knowing that my PHP pages will still work...

Cheers...
Tris...

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP upgrade... issues???

2004-07-15 Thread Tristan . Pretty
Phew!
However, While reading about php upgrades, I've got the impression that 
version 5, will not support MySQL by default...
Does that mean that I'll have to ensure my hosts install an extra module, 
or worse case senario, I'll have to re-write all my pages, to take new 
code into effect...
I' know I'm sounding liek a worried mother hen, but I can't seem to find 
confirmation on line?!?!

Ho hum, nearly Friday eh?




John W. Holmes [EMAIL PROTECTED] 
15/07/2004 17:40

To
[EMAIL PROTECTED]
cc
[EMAIL PROTECTED]
Subject
Re: [PHP] PHP upgrade... issues???






[EMAIL PROTECTED] wrote:
 I've just got this mail from my host...
 =
 Dear customer,
 
 This email is sent to inform you that we'll upgrade the PHP version on 
 your
 server to the latest stable version 4.3.8 within the next hour.
 =
 
 Are there any issues that I need to panic about...?
 I'm off to google now, but am just having a panic attack, and hope that 
I 
 can sit back knowing that my PHP pages will still work...

I wouldn't be too worried.

PHP 4.3.8 Changelog: http://us2.php.net/ChangeLog-4.php

-- 
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals  www.phparch.com






*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***


[PHP] Email, Hotmail and PHP?

2004-07-13 Thread Tristan . Pretty
Hi there...
My misses has just started a new job, but has got loadsa websites blocked, 
including hotmail.
So I've decided to see if there's a php alternative, that I can code/steal 
etc...

If I can host a series of php pages, that can get a list of emails, and 
access to read them... replying would be cool, but not essential...
she can reply via work...

Anyone ever heard of such a thing, and event know if it's possible...?
I presume that the firewall at work simply blocks the address 
www.hotmail.com, rather than some deeper blocking...

Tris...

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Email, Hotmail and PHP?

2004-07-13 Thread Tristan . Pretty
You're very welcome...
Indeed... who doesn't enjoy a brief break to see what's happening in their 
world?
I ended up using 'hail' (http://www.hailware.com/)
As far as I can tell, it doesn't allow attatchments...

Spending lunch hour checking personal mails... who can honestly admit that 
it never happens?

Cheers for the words of encouragement James...! ;-)





James E Hicks III [EMAIL PROTECTED] 
13/07/2004 13:18

To
[EMAIL PROTECTED]
cc
[EMAIL PROTECTED]
Subject
Re: [PHP] Email, Hotmail and PHP?






On Tuesday 13 July 2004 04:57 am, [EMAIL PROTECTED] wrote:
 Hi there...
 My misses has just started a new job, but has got loadsa websites 
blocked,
 including hotmail.
 So I've decided to see if there's a php alternative, that I can 
code/steal
 etc...

 If I can host a series of php pages, that can get a list of emails, and
 access to read them... replying would be cool, but not essential...
 she can reply via work...


I want to be the first to thank you for making your misses's work network 
less 
safe. I'm sure they won't mind all the virus laden emails you're sneaking 
through the back door. I'm sure I don't need to mention how much work your 

misses gets done while she's reading personal emails.

James Hicks

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Email, Hotmail and PHP?

2004-07-13 Thread Tristan . Pretty
I get the distinct impression that this idea is not a favourable one?
Just trying to earn brownie points with the misses... not trying to annoy 
'the man'.

Ho hum...
Back to surfing for porn at work ;-)



raditha dissanayake [EMAIL PROTECTED] wrote on 13/07/2004 14:56:38:

 [EMAIL PROTECTED] wrote:
 
 Hi there...
 My misses has just started a new job, but has got loadsa websites 
blocked, 
 including hotmail.
  
 
 Let's hope what ever solution you come up with does not include an auto 
 responder. :-)
 
 -- 
 Raditha Dissanayake.
 -
 http://www.raditha.com/megaupload/upload.php
 Sneak past the PHP file upload limits.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Email, Hotmail and PHP?

2004-07-13 Thread Tristan . Pretty
really? me..
I've not turned that on in over a year?
That's a worry... when was this...?

I'll tell our tech support group, perhaps there was a problem.. cheers for 
the heads up!





raditha dissanayake [EMAIL PROTECTED] 
13/07/2004 16:46
Please respond to
[EMAIL PROTECTED]


To
[EMAIL PROTECTED]
cc
[EMAIL PROTECTED]
Subject
Re: [PHP] Email, Hotmail and PHP?






[EMAIL PROTECTED] wrote:

I get the distinct impression that this idea is not a favourable one?

 

Let's hope what ever solution you come up with does not include an auto 
responder. :-)
 

I was referring to the barrage we used to recieve from your auto 
responder.


-- 
Raditha Dissanayake.
-
http://www.raditha.com/megaupload/upload.php
Sneak past the PHP file upload limits.





*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] email formatting

2004-06-02 Thread Tristan . Pretty
When you create $selections
Make sure you add a '\n' to the end of each line...

EG:
$selection .= $myrow[result1]\n;





BigMark [EMAIL PROTECTED] 
03/06/2004 08:28

To
[EMAIL PROTECTED]
cc

Subject
[PHP] email formatting






Is it possible to have this code changed easily to make the output run
horizontally instead of vertically.  example of current output to email
below code



//
//email selections to all users
$sql = SELECT email_address FROM Users;
$result = mysql_query($sql);
while ($myrow = mysql_fetch_array($result)) {

$email = $myrow['email_address'];
$subject = Mark's Footy Tipping Competition;
$message =
Hi,
Round $Round is now closed.  Selections were:
$selections
Thanks!
Mark
This is an automated response, please do not reply!;
mail($email, $subject, $message, From: Mark$fromemailaddress\nX-Mailer:
PHP/ . phpversion());

}

///

outputs like this

Hi,

Round 10 is now closed.  Selections were:


Glen Gosnay - Game 1 Essendon
Glen Gosnay - Game 2 Hawthorn
Glen Gosnay - Game 3 West Coast
Glen Gosnay - Game 4 Kangaroos
Glen Gosnay - Game 5 Sydney
Glen Gosnay - Game 6 Geelong
Glen Gosnay - Game 7 St Kilda
Glen Gosnay - Game 8 Brisbane
Wayne Gosnay - Game 1 Essendon
Wayne Gosnay - Game 2 Hawthorn
Wayne Gosnay - Game 3 West Coast
Wayne Gosnay - Game 4 Collingwood
Wayne Gosnay - Game 5 Sydney
Wayne Gosnay - Game 6 Port Adelaide
Wayne Gosnay - Game 7 St Kilda
Wayne Gosnay - Game 8 Brisbane
Sean Dsouza - Game 1 Essendon
Sean Dsouza - Game 2 Adelaide
Sean Dsouza - Game 3 West Coast
Sean Dsouza - Game 4 Collingwood
Sean Dsouza - Game 5 Sydney
Sean Dsouza - Game 6 Port Adelaide
Sean Dsouza - Game 7 St Kilda
Sean Dsouza - Game 8 Brisbane

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] making selection in drop down

2004-05-28 Thread Tristan . Pretty
I use a javascript to help me with bigger dropdowns...
script
function get_links() {
document.all[field_name].value='?echo$field_name; ?'
/script






Torsten Roehr [EMAIL PROTECTED] 
28/05/2004 16:12

To
[EMAIL PROTECTED]
cc

Subject
Re: [PHP] making selection in drop down






Alex Hogan [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

  Use HTML attribute selected in the option field you want to
  set as default...

 Yes.., thank you.., however I am more interested in how to force that
selection to a specific option tag in the dropdown from a search.  If I'm
missing your point please excuse me.  I'm a little brain dead this 
morning.

 If I have something like this what I'll want to do is to identify the
point in the array where I can force the selected to be the default based 
on
the previous search.

 select name=sellocation class=body_text id=sellocation
 option value=0 ?=$option[0]?Make Selection/option
 ?
 $i = 1;
 while($row = mssql_fetch_array($result))
 {
 $v = $row['loc_id'];
 $n = $row['loc_city'];
 echo option value=\$v\ $option[$i]$n/option;
 }

Try this:

while ($row = mssql_fetch_array($result)) {
$v = $row['loc_id'];
$n = $row['loc_city'];

echo option value=\$v\ ;

// if current loc_id is previously selected loc_id set selected
echo ($_POST['sellocation'] == $v) ? 'selected' : '';

echo $option[$i]$n/option;
}

Regards,

Torsten Roehr

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] IF statement question...

2004-05-19 Thread Tristan . Pretty
Is it possible to request that a string CONTAINS another string...?

EG:
$string = 1, 2, 3, 7, 8, 9;
if ($string CONTAINS 7) {
// Do stuff
}

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] IF statement question...

2004-05-19 Thread Tristan . Pretty
If I'm being Dumb, I apologies...
but When using this:

$row[bands] = 1,2,3,4,5,6,7,8;
$row2[id] = 7;
if (strpos($row[bands], $row2[id]) != FALSE) {
// do stuff
}

I get the No 13 (as it's inthe 13th place in the string) as my result.

Now I'm aware that it should work, as it's not returning a false value...
But I'm still not getting the correct output on my page...

Any other ideas?






Oliver Hankeln [EMAIL PROTECTED] 
19/05/2004 15:49

To
[EMAIL PROTECTED]
cc

Subject
Re: [PHP] IF statement question...






Curt Zirzow wrote:

 * Thus wrote Oliver Hankeln ([EMAIL PROTECTED]):

10 Searches in a rather small string took
0.38s with strpos() and 0.55s with preg_match()

 
 Make sure your benchmarks aren't bias:
   - assignment takes time
   - concating string takes time

You are right. I updated the script to:
[...]
$regexp=/.$needle./;
$t1=getmicrotime();
for($i=0;$i10;$i++)
 strpos($haystack,$needle);
$t2=getmicrotime();
for($i=0;$i10;$i++)
 preg_match($regexp,$haystack);
$t3=getmicrotime();
[...]

Now the time is 0.33s vs. 0.46s.
preg_match needs 139.4% of the strpos time

Oliver

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] A work around my HTTP_REFERER Prob...

2004-05-07 Thread Tristan . Pretty
To recap...
We have two servers:
1. USA - holds most of our databases, and E-mail. but specifically, the 
usernames and passwords, or all our users (Lotus Domino Server)
2. UK - Runs our website. (Unix Server)

We wanted to be able to allow people to login on on server 1, and getr 
authenticated etc, and then get redirected to server 2.
Using http_referer we would confirm that they came from server 1

However, as I discovered, that is not possible.
So what we did was this:

On the login form on server 1, the referering URL to server 2, contains a 
varibale called 'secure'
we asign that variable that value of '4654376534' and divide it by the day 
(eg: if it's the 12th of may, we divide by 12.. 7th of June, we divide by 
7)
I know that this is crackable, but it's just a stop gap measure...

My problem today is this:
It's not confirming the values?
See my code below

session_start();
$today_day = date(d);
$code1 = ($today_day+1) * $secure;
$code2 = $today_day * $secure;
$code3 = ($today_day-1) * $secure;
$master_code = 4654376534;
if (($code1 == $master_code) || ($code2 == $master_code) || ($code3 == 
$master_code)) {
$_SESSION[logged] = 'true';
$login_info = You are now bLogged in/b;
} else if ($_SESSION[logged] == 'true') {
$login_info = You are still bLogged in/b;
}
=

I start by getting the date $today_day
As we're in two time zones, I don't wanna get caught out by the time 
difference, so I've created a +/- 1 each side ($code1-3)
and fianlly, asigned the master input variable (the decoder)

Now it all works great..! (all variables echo what they should) however, 
I'm not getting logged in?
I'm really stumped...
any ideas?

Tris...

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] A work around my HTTP_REFERER Prob...

2004-05-07 Thread Tristan . Pretty
I looked into getting PHP to talk to a  Lotus notes database, and was 
really really scared..!
I think this is my best bet, for now at least... however, my simple code 
does not work?
Wierd...
Any other ideas?




Richard Harb [EMAIL PROTECTED] 
07/05/2004 11:38
Please respond to
Richard Harb [EMAIL PROTECTED]


To
php-general [EMAIL PROTECTED]
cc

Subject
Re: [PHP] A work around my HTTP_REFERER Prob...






What about allowing your UK server to access the database of your USA
Server? You could open a port to that specific IP address only, ...

Then authenticating users on the UK server would work like a charm.
You could even create a 'shared' database for basic session
information.

I think if sessions are used the overhead would not be overly serious
except for the one time a user has to log in.

Ok, I have no idea whatsoever about how to access a Domino Server, but
there just has to be a way... XMLRPC?

just a thought ...
Richard


Friday, May 7, 2004, 11:39:12 AM, thus was written:
 To recap...
 We have two servers:
 1. USA - holds most of our databases, and E-mail. but specifically, the
 usernames and passwords, or all our users (Lotus Domino Server)
 2. UK - Runs our website. (Unix Server)

 We wanted to be able to allow people to login on on server 1, and getr
 authenticated etc, and then get redirected to server 2.
 Using http_referer we would confirm that they came from server 1

 However, as I discovered, that is not possible.
 So what we did was this:

 On the login form on server 1, the referering URL to server 2, contains 
a
 varibale called 'secure'
 we asign that variable that value of '4654376534' and divide it by the 
day
 (eg: if it's the 12th of may, we divide by 12.. 7th of June, we divide 
by
 7)
 I know that this is crackable, but it's just a stop gap measure...

 My problem today is this:
 It's not confirming the values?
 See my code below
 
 session_start();
 $today_day = date(d);
 $code1 = ($today_day+1) * $secure;
 $code2 = $today_day * $secure;
 $code3 = ($today_day-1) * $secure;
 $master_code = 4654376534;
 if (($code1 == $master_code) || ($code2 == $master_code) || ($code3 ==
 $master_code)) {
 $_SESSION[logged] = 'true';
 $login_info = You are now bLogged in/b;
 } else if ($_SESSION[logged] == 'true') {
 $login_info = You are still bLogged in/b;
 }
 =

 I start by getting the date $today_day
 As we're in two time zones, I don't wanna get caught out by the time
 difference, so I've created a +/- 1 each side ($code1-3)
 and fianlly, asigned the master input variable (the decoder)

 Now it all works great..! (all variables echo what they should) however,
 I'm not getting logged in?
 I'm really stumped...
 any ideas?

 Tris...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] A work around my HTTP_REFERER Prob...

2004-05-07 Thread Tristan . Pretty
Cheers for all ideas/suggetions so far..
I've made a little progres...
Visit this URL:
http://www.risk.sungard.com/secure.php?secure=126807.714285714

and here's the code..
?
$today_day = date(d);
$code1 = ($today_day+1) * $_GET[secure];
$code2 = $today_day * $_GET[secure];
$code3 = ($today_day-1) * $_GET[secure];
$master_code = 887654;

if (($code1 == $master_code) || ($code2 == $master_code) || ($code3 == 
$master_code)) {
$woopee = h2DONE IT!!!/h2;
}

?
html
head
titleSecure Test/title
/head
body
?=$woopee ?
bDebug:/b
br /Secure: ?=$_GET[secure] ?
br /Day: ?=$today_day ?
br /Master: ?=$master_code ? 
br /Code 1: ?=$code1 ?
br /Code 2: ?=$code2 ?
br /Code 3: ?=$code3 ?
/body
/html

If I change the GET requests to simple variables, and assign a new 
variable called $secure, and asign it the value: 126807.714285714
The page works!
Makes me think there's a GET error?

Can anyone spot my potentially obvious error?

Tris...






Jason Wong [EMAIL PROTECTED] 
07/05/2004 13:37

To
[EMAIL PROTECTED]
cc

Subject
Re: [PHP] A work around my HTTP_REFERER Prob...






On Friday 07 May 2004 20:05, [EMAIL PROTECTED] wrote:

  varibale called 'secure'
  we asign that variable that value of '4654376534' and divide it by the

 day

  (eg: if it's the 12th of may, we divide by 12.. 7th of June, we divide

 by

  7)

That would result in a floating point number ...

  if (($code1 == $master_code) || ($code2 == $master_code) || ($code3 ==
  $master_code)) {

... which does not lend easily to such comparisons.

If you're still intent on using this *ahem* 'security' scheme then I 
suggest 
you use multiplication instead (just make sure that the largest number 
you're 
processing is less than 2147483648 - or use the BCMath functions).

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
After all, it is only the mediocre who are always at their best.
 -- Jean Giraudoux
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: HTTP_REFERER ... ?

2004-05-06 Thread Tristan . Pretty
I echoed it, and got a blank variable...
We ahve full admin rights on my server, and the one we're checking the 
referer from...

Basically, our system has an exsiting user database, and we wanna allow 
users to loging as per usual, and but allow them (and only them) to veiw 
pages on the new server...
I just thought that htt_referer was the easiest way to do that, as I only 
wanna let people in, who have signed in on the first server first..

Am I making any snece?





David Robley [EMAIL PROTECTED] 
06/05/2004 02:46

To
[EMAIL PROTECTED]
cc

Subject
[PHP] Re: HTTP_REFERER ... ?






[EMAIL PROTECTED] (Tristan Pretty) wrote in 
news:OF19FCC4A7.F49C9B83-ON80256E8B.00544E7D-
[EMAIL PROTECTED]:

 if ($_SERVER['HTTP_REFERER'] == 'http://www.mysite.com/') {
 // Stuff
 }
 
 Now why does this not work?
 I wanna asign varibales based on certain referers...
 but this is not working?
 
 Any ideas why?

HTTP_REFERER is empty because the page was not called from a link? Or 
HTTP_REFERER is empty because the browser doesn't supply the value?

Echo the variable and see what you get.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] HTTP_REFERER ... ?

2004-05-05 Thread Tristan . Pretty
if ($_SERVER['HTTP_REFERER'] == 'http://www.mysite.com/') {
// Stuff
}

Now why does this not work?
I wanna asign varibales based on certain referers...
but this is not working?

Any ideas why?

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] HTTP_REFERER ... ?

2004-05-05 Thread Tristan . Pretty
Sadly, I get nothing...
the other server I'm talking to is owned by our company, it's a Lotus 
Domino server...
so in theory, they'll be able to enable this variable to be passed?





John Nichel [EMAIL PROTECTED] 
05/05/2004 17:07

To
[EMAIL PROTECTED]
cc

Subject
Re: [PHP] HTTP_REFERER ... ?






[EMAIL PROTECTED] wrote:
 if ($_SERVER['HTTP_REFERER'] == 'http://www.mysite.com/') {
 // Stuff
 }
 
 Now why does this not work?
 I wanna asign varibales based on certain referers...
 but this is not working?
 
 Any ideas why?

What do you get when you echo out $_SERVER['HTTP_REFERER']?

-- 
John C. Nichel
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Maths not working.. or is it me?

2004-04-15 Thread Tristan . Pretty
Im trying to implement some really simply credit card encryption...
I know it's not perfect, but it's a stop gap measure until I do this 
properly... however...

To Encrypt before I put into my DB, I'm using this formula...
$encrypt = $CardNumber / ($ExpiryYear * 41.9);
(41.9 is just a random No to help encrpt the data)

To see the correct credit card No later, I'm using this formula:
$decrypt = $row[encryptedno] * $row[expiryyear] * 41.9;

The credit car No I'm testing with is:
1234123412341234
and the Exp year is 2008

However, I keep getting this result...
1.2341234123412E+15

What on earth am I doing wrong?


*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] View folders...

2004-04-15 Thread Tristan . Pretty
I'm trying to create a page where I can show all folders in a directory.
I've looked on google and php.net, but have yet to find an answer...

Any clues?

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] combining variables...

2004-04-06 Thread Tristan . Pretty
Simply put, can I connect 2 variables, to make one...

I want to output:
$view_request_$i

making for example a string:
view_all_2

But I'm getting errors..?
Parse error: parse error in /home/risk/public_html/download/results3.php 
on line 675

is there a simple explination...?


*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] combining variables...

2004-04-06 Thread Tristan . Pretty
Sadly, it didnb't work...

here's my code... I wanna repeat and output final variables 6 times...

==

for ($i = 1; $i = 6; $i++) {

if ($view_request_bu_$i != '') {
$view_request_$i = strtolower($view_request_bu_$i);
} else if ($view_request_email_$i != '') {
$view_request_$i = strtolower($view_request_email_$i);
} else if ($view_request_company_$i != '') {
$view_request_$i = strtolower($view_request_company_$i);
} else if ($view_request_datestart_$i != '') {
$view_request_$i = date;
} else if ($view_request_filename_$i != '') {
$view_request_$i = strtolower($view_request_filename_$i);
} else if ($view_request_filecat_$i != '') {
$view_request_$i = strtolower($view_request_filecat_$i);
} else if ($view_request_filetype_$i != '') {
$view_request_$i = strtolower($view_request_filetype_$i);
} else if ($view_request_display_name_$i != '') {
$view_request_$i = 
strtolower($view_request_display_name_$i);
} else if ($view_request_region_$i != '') {
$view_request_$i = strtolower($view_request_region_$i);
} else if ($view_request_id_$i != '') {
$view_request_$i = strtolower($view_request_id_$i);
} else {
$view_request_$i = Error;
}

}

=





Richard Davey [EMAIL PROTECTED] 
06/04/2004 18:27
Please respond to
Richard Davey [EMAIL PROTECTED]


To
[EMAIL PROTECTED]
cc

Subject
Re: [PHP] combining variables...






Hello Tristan,

Tuesday, April 6, 2004, 6:14:19 PM, you wrote:

TPrsc Simply put, can I connect 2 variables, to make one...

TPrsc I want to output:
TPrsc $view_request_$i

TPrsc making for example a string:
TPrsc view_all_2

I believe it's $view_request_$$i

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] faking $HTTP_REFERER

2004-03-29 Thread Tristan . Pretty
My boss wants to combine the previously build security, that we have 
within a notes Domino server, with a few pages that we run on PHP.

As I've tried to use PHP to talk to a notes database, and failed I've 
decided that the easiest option is to:

1. Add a link on the notes site to the PHP site.
2. On the first PHP page, do a check (if ($HTTP_REFERER 
=='http://notessite') {$_SESSION[loggedin] = true;})
3. Simply check for the session named logged in.

So I'm worried that while ths will work, it's a bit flimsy.
Can a user overwrite the $HTTP_REFERER?

Any other clever ideas to enable what I'm after?

Cheers,
Tris...


*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] the '' character and PHP...?

2004-03-18 Thread Tristan . Pretty
I've a script that uses ''
However, if I pass that as a variable to another page, everything after 
it, gets ignored...
I've tried:

1. Esacping the character with '\'
2. Using amp;

But nothing works...
Any ideas how to include an '' in my variable?

Tris...


*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mail() to own domain not working

2004-03-17 Thread Tristan . Pretty
Ooo, I had this recently when we moved to beamhost.co.uk

I'll mail them and ask them what they did to fix it...
I'll be back...





Gerard L Petersen [EMAIL PROTECTED] 
17/03/2004 14:59

To
Php-General [EMAIL PROTECTED]
cc

Subject
[PHP] mail() to own domain not working






Hi all

Im having a problem with sending mails using the mail function to my own
domain.
Mails to any other domain works perfectly. Also our mail server sitting on 
a
different machine.

Any ideas how to fix this?




*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mail() to own domain not working

2004-03-17 Thread Tristan . Pretty
Well, they replied:
Do you mean the email is not working at the moment or you\'re asking for 
the solution we did last time? We modified your code and changed @ to \\@ 
within the mail header.

Any use?





[EMAIL PROTECTED] 
17/03/2004 15:21

To
Gerard L Petersen [EMAIL PROTECTED]
cc
Php-General [EMAIL PROTECTED]
Subject
Re: [PHP] mail() to own domain not working






Ooo, I had this recently when we moved to beamhost.co.uk

I'll mail them and ask them what they did to fix it...
I'll be back...





Gerard L Petersen [EMAIL PROTECTED] 
17/03/2004 14:59

To
Php-General [EMAIL PROTECTED]
cc

Subject
[PHP] mail() to own domain not working






Hi all

Im having a problem with sending mails using the mail function to my own
domain.
Mails to any other domain works perfectly. Also our mail server sitting on 

a
different machine.

Any ideas how to fix this?




*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above. 
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mail() to own domain not working

2004-03-17 Thread Tristan . Pretty
Sorry, had an extra \
==
Do you mean the email is not working at the moment or you're asking for 
the solution we did last time? We modified your code and changed @ to \@ 
within the mail header.




Tristan Pretty/Infinity
17/03/2004 15:37

To
[EMAIL PROTECTED]
cc
Gerard L Petersen [EMAIL PROTECTED], Php-General 
[EMAIL PROTECTED]
Subject
Re: [PHP] mail() to own domain not working






Well, they replied:
Do you mean the email is not working at the moment or you\'re asking for 
the solution we did last time? We modified your code and changed @ to \\@ 
within the mail header.

Any use?





[EMAIL PROTECTED] 
17/03/2004 15:21

To
Gerard L Petersen [EMAIL PROTECTED]
cc
Php-General [EMAIL PROTECTED]
Subject
Re: [PHP] mail() to own domain not working






Ooo, I had this recently when we moved to beamhost.co.uk

I'll mail them and ask them what they did to fix it...
I'll be back...





Gerard L Petersen [EMAIL PROTECTED] 
17/03/2004 14:59

To
Php-General [EMAIL PROTECTED]
cc

Subject
[PHP] mail() to own domain not working






Hi all

Im having a problem with sending mails using the mail function to my own
domain.
Mails to any other domain works perfectly. Also our mail server sitting on 


a
different machine.

Any ideas how to fix this?




*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above. 
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php







*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advanced PHP Mailing List?

2004-03-05 Thread Tristan . Pretty
I use 12All from Active campaign...
Great site, GREAT support... and the code was not beyond me in most 
places...




Galen [EMAIL PROTECTED] 
05/03/2004 08:58

To
[EMAIL PROTECTED]
cc

Subject
[PHP] Advanced PHP Mailing List?






Hi,

Don't mind if I ask this, but are there any other large PHP mailing 
lists out there that target the mid to high range of PHP development?

This list is great, and incredible for beginners, but a large portion 
of it is stuff like what's broken with this code (simple typo) and 
how do I write SQL and discussing plain weird problems, often due to 
pretty simple user error. Really, this is very important to the 
community for this kind of zero-prerequisite list to exist. But I'm 
wondering if there are more complex lists where I might at least start 
just listening and see what's going on. I would like to hear about very 
complex, high-end PHP coding and techniques and perhaps interact a 
little too.

Anyone got suggestions? Anyone else have the same interest?

Feel free to reply off-list if you don't think this is on-topic.

-Galen

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Forms, or multiple headers?

2004-03-05 Thread Tristan . Pretty
I'm talking to a MySQL database that contains info on all downloads from 
our site.
I list all these entries, on a PHP page.
The table structure etc, are static, but the fields retrieved, are 
dynamic, based on the users search criteria.
Within each result, I've added a small form, that posts that data, to an 
external site (salesforce.com).
Each field looks like this:
http://www.risk.sungard.com/del.gif
But one can have entries on a page..

At present, a user can submit a field to salesforce one at a time, no 
probs, and I'll probably wanna keep it that way.
However..

TO enable multiple deletions, I must place the whole table in another 
form.
What happens is that no matter how many deletions I select, it only picks 
up the one at the top of the page, or none, if the top one isn't selected.

I'm using the following PHP...

if ($submit == 'DELETE SELECTED') {

foreach($_POST[select] as $del) {
$res = mysql_query(DELETE FROM $table_name WHERE 
id='$del');

}
}

But I presume that the embedded forms that talk to sales force, are 
disrupting it...

So I need to either:

1. find out how to let the page detect what's selected anotehr way.. OR
2. enable multiple post to salesforce.com, WITHOUT opening potentially 
dozens of new windows (one for each submision)

Any takers on a unique way to acheive this?

Tris..

(P.S. Glad you asked ;-)  )


*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Delayed mail()... ?

2004-02-20 Thread Tristan . Pretty
I've been asked to add a small amount of functionality to a site I've 
built
(It's a techer at home web site)

Basically, prospective teachers/students, can sign up for more info etc.
Currently, that info is captured, and the site admin people are 
E-mailed...
all good so far..

What they've asked for, is that when they reply to the enquiry, they are 
reminded to chase up the enqiry a few days later...
Now I could give them a message on screen, if they happen to be in the 
admin area, but what i'd like to do , is simply mail the admin users, 
after say, 3 days.
regardless if they even visit the admin area at all...

is this possible at all?

I use 12All E-mail software at work, and that has a delayed sending 
option, but [EMAIL PROTECTED] NO idea how it works...

Any suggetions?



*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Delayed mail()... ?

2004-02-20 Thread Tristan . Pretty
Right,
I'm off to php.net, to learn all about cron jobs...
i've never heard ofit ;-)
(I'll come out from under my rock now)
Cheers everyone




Ben Ramsey [EMAIL PROTECTED] 
20/02/2004 13:36

To
[EMAIL PROTECTED], Tristan Pretty 
[EMAIL PROTECTED]
cc

Subject
[PHP] Re: Delayed mail()... ?






Probably the best way to do this is the use cron to schedule a script to 
run at a specified time.

The way I'd do it is to create a PHP script that compares the current 
date with the date they registered (you'd save that date to the 
database, of course).  If the current date is greater than 3 days and 
less than 4 days older than the date they registered, then you'd use 
mail() to send them another message.

Use cron to schedule the script to run the script once every day.

For the PHP script that cron will be running, you'll need to put this 
line in above the first ?php tag:

#!/usr/bin/php -q

That way, it'll execute on the system.  And you may have the chmod the 
file 755, though I can't remember if that's necessary.

Finally, your system must be Linux (or other unix-type system) for this 
to work correctly.  If it's Windows, you can use the task scheduler, but 
I don't think it'll execute the PHP script.



Tristan Pretty wrote:
 I've been asked to add a small amount of functionality to a site I've 
 built
 (It's a techer at home web site)
 
 Basically, prospective teachers/students, can sign up for more info etc.
 Currently, that info is captured, and the site admin people are 
 E-mailed...
 all good so far..
 
 What they've asked for, is that when they reply to the enquiry, they are 

 reminded to chase up the enqiry a few days later...
 Now I could give them a message on screen, if they happen to be in the 
 admin area, but what i'd like to do , is simply mail the admin users, 
 after say, 3 days.
 regardless if they even visit the admin area at all...
 
 is this possible at all?
 
 I use 12All E-mail software at work, and that has a delayed sending 
 option, but [EMAIL PROTECTED] NO idea how it works...
 
 Any suggetions?
 
 
 
 *
 The information contained in this e-mail message is intended only for 
 the personal and confidential use of the recipient(s) named above. 
 If the reader of this message is not the intended recipient or an agent
 responsible for delivering it to the intended recipient, you are hereby 
 notified that you have received this document in error and that any
 review, dissemination, distribution, or copying of this message is 
 strictly prohibited. If you have received this communication in error, 
 please notify us immediately by e-mail, and delete the original message.
 ***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] htmlspecialchars... or...?

2004-02-18 Thread Tristan . Pretty
Hi all...
I've having problems submitting information to salesforce.com...

I have a system set up that allows my users here in the office, to send 
individual leads, to salesforce...
However, if the users details contain characters such as...
Ù ë ý Ñ Ã   etc...

htmlspecialchars only does
(From what I understand...)

Does anyone know how to turn the other characters into a format, I can 
submit to salesforce, without it being rejected...

(the problem, in a little more detail...
I have about 15 fields I'm submitting...
It processes the first on, then the second etc. but as soon as it hits a 
field with the characters mentions above, it simply sends blank data to 
salesforce for the remaining fields, so I'm left with a half completed 
record??? I'm presuming that this fix, will solve it... Once I figure out what this 
fix is... ;-)   )

Tris...


*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Unsubscribe (mailign lsits in general) question...

2004-01-20 Thread Tristan . Pretty
I've been told by my boss, that the law has changed in relation to 'Opt 
out' options on mailing lists etc...
she tells me that I have to now change all my forms to conform.

She claims that now, each time the user must click the 'remain subscribed' 
link, or we have to remove them from our mailing lists.
Thus changing opt out, to opt in, EACH TIME?
Is this true?

She seems quite sure.

We deal with both European and US clients (world wide to be honest, but 
most other countries don'e care about this.. do they?)

Anyone heard of this before?
Tris...

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] Destroy all session data...

2004-01-13 Thread Tristan . Pretty
I've just asked my host to set my session time limit to 30 days... From 0
I'm now running into problems, and I think that destroying all session 
data sill help...

Until I get this sorted, can I kill everyones stored session data?


*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



Re: [PHP] Destroy all session data...

2004-01-13 Thread Tristan . Pretty
I do't know to be honest, how do I find out? (I'm on a unix server)




Matt Matijevich [EMAIL PROTECTED] 
13/01/2004 16:11

To
[EMAIL PROTECTED]
cc

Subject
Re: [PHP] Destroy all session data...






[snip]
Until I get this sorted, can I kill everyones stored session data?
[/snip]

How is the session data saved?  It is to files, you could just delete
all of the session files.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



Re: [PHP] writing Excel files through PHP

2004-01-12 Thread Tristan . Pretty
You know, I've been struggling with this probelm fr ages, and wouldn't you 
know it, I really over complicated things..
using this simple header method, I've done it...

Cheers for the heads up...
It pays to read eh? ;-)

Tris..





Marek Kilimajer [EMAIL PROTECTED] 
10/01/2004 13:22

To
Binay [EMAIL PROTECTED]
cc
[EMAIL PROTECTED]
Subject
Re: [PHP] writing Excel files through PHP






Use full uri. But the user needs to be online while viewing the xls file.

Other option is to create web archive. It's a mime encoded file, save an 
excel file with an embeded image and you will see what it is.

Binay wrote:
 Hi all,
 
 I m generating an Excel file though PHP by sending the appropriate 
header and then using HTML TD tags to write data in different cells. 
Below is my code snippet.
 
 It has got 1 problems:
 
 1. Image doesn't come/showup in Excel sheet.
 
 ?php
 
 header(Content-type: application/vnd.ms-excel);
 header(Content-disposition: attachment; filename=pareto_combined.xls);
 ?
 
 tr colspan=8
 td height=50 img src='../../../extra/images/log.jpg'/td 
 td align=rightimg src='../../../extra/images/mickey_sup.jpg'/td 
 /tr 
 
 ?php
 $dateF=$_REQUEST['dateF']; 
 
 $dateT=$_REQUEST['dateT'];
 
 $agentID=$_REQUEST['agentID'];
 tr
 td class='graybg'?php echo $agentID/td
 td class='graybg'?php echo $dateF/td
 td class='graybg'?php echo $dateT/td
 /tr
 
 ?
 
 now after saving the Excel file it displays all alphanumeric data 
correctly but images do not show up. i think Img tag is not supported by 
Excel application. 
 
 So my question is how can i display the images in Excel using PHP? plz 
help me out 
 
 Thanks in advance
 
 Binay 
 
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] file upload - But outside of web directory...?

2004-01-12 Thread Tristan . Pretty
Hi there...
I keep all my downloads outside of the web folder on my site.
I only allow users to download them by them using the download page, and 
changing teh header info when a file is requested..

What I want to do now, is allow the other site users to upload files to 
that same directory...
From what I'v estudied on line, I can't do this, but I'm not convinced...
Anyone know if this os possible, via a web based form?

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



Re: [PHP] Comparison PHP to Perl

2004-01-06 Thread Tristan . Pretty
 In fact, I hope you do more than session_start() and
go in PHP, else you are probably vulnerable to a number of session-based
attacks.

Man, that's all I do alot of the time?
What dangers are there, care to share any facts figures about that...?
I'll go away now and read up again on sessions...!

Cheers for the heads up,
Tris...

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] Counting back 90 days...

2004-01-05 Thread Tristan . Pretty
Got this function...
I wanna remove 90 days from todays date, giving a final date, in the same 
format as the original, that counts back 90 days...
I'm listing dates on a reporting tool, and I've been asked to only show 
info that we recieved in the last 90 days...
Anyhoo...
I believe I can minus 10 days from $day by having...
$timestamp = mktime (0,0,0,$month,$day-10,$year);
But is there an easy was to calculate 90 days from the timestamp...
My worry is that I need to calculate how many days in a month, and then 
work out hown many days to remove from that month... etc..
it's all getting far more complicated that it needs to be, and I can't 
believe I'm the first person to try and do this...
My code is below, and if anyone would like to offer advse, I welcome it...

===
$today = date(Y-m-d);
function minus90($calc){
   $year = substr($today, 0, 4);
   $month = substr($today, 5, -3);
   $day = substr($today, 8, 10);
   $timestamp = mktime (0,0,0,$month,$day,$year);
   return strftime (%Y-%m-%d, $timestamp);
}
$archive_date = minus90($today);


echo $archive_date;
==

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



Re: [PHP] Counting back 90 days...

2004-01-05 Thread Tristan . Pretty
My word...
6 odd lines, to one...
you're a genius...
Cheers for that...
Tris...




Richard Davey [EMAIL PROTECTED] 
05/01/2004 11:45
Please respond to
Richard Davey [EMAIL PROTECTED]


To
[EMAIL PROTECTED]
cc
[EMAIL PROTECTED] [EMAIL PROTECTED]
Subject
Re: [PHP] Counting back 90 days...






Hello Tristan,

Monday, January 5, 2004, 11:29:16 AM, you wrote:

TPrsc But is there an easy was to calculate 90 days from the timestamp...

Based on the current time:

$previous_90_days_timestamp = strtotime (-90 day);

All in one:

$previous_90_days_date = date(Y-m-d, strtotime(-90 day));

-- 
Best regards,
 Richardmailto:[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



Re: [PHP] best way to specify path to a file in a $variable?

2003-12-30 Thread Tristan . Pretty
I personally link my css files using the root dir...
eg:

host/myaccount/mywebsite/mycssfile.css

That way, it's always pointing to the correct file...
hope it helps///




Danny Anderson [EMAIL PROTECTED] 
30/12/2003 14:15

To
[EMAIL PROTECTED]
cc

Subject
[PHP] best way to specify path to a file in a $variable?






Hola, PHP folk-

I am using

$page_title=some page title here;
require('header.inc');

to include a common header for all my pages.  I am using $page_title so 
I can have unique names for the different pages.

//---header.inc
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
html
   head
 title?php echo $page_title; ?/title
 link rel=stylesheet href=./some.css type=text/css
   /head
body
...



I want to be able to also define the path to the CSS file.  For 
instance, some pages will have the CSS in the same directory, so that 
part would read

./my.css

If the page is located in a subdirectory, the path would then be

../my.css

I would like to use a php variable where I can define the path the same 
way as the $page_title works.  I have tried some experiments with a 
$path_to_css variable, but I have not had much success.  I think part of 
the problem is that I might be stumbling over escaping everything 
properly.

Is there a better way to do what I am trying to do?

Thanks,
Danny

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] combining two variables to make one???

2003-12-22 Thread Tristan . Pretty
I want to out put three bits of text...
I want my end page to look like this...

=
result 1
result 2
result 3
=

here's the code I've got...

===
?
$i = 1;
while ($i = 3) {
$options$i = result $i;
}
?
html
body
?=$option1 ?
?=$option2 ?
?=$option3 ?
/body
/html
===

yet I get an error...?
Anyone know who to make $option$i work?


*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



Re: [PHP] combining two variables to make one???

2003-12-22 Thread Tristan . Pretty
Cheers...
Doesn't work for me though...?

What do the '{' mean when declaring the variable?







Chris Boget [EMAIL PROTECTED] 
22/12/2003 14:16

To
[EMAIL PROTECTED], [EMAIL PROTECTED]
cc

Subject
Re: [PHP] combining two variables to make one???






 ?
 $i = 1;
 while ($i = 3) {
 $options$i = result $i;
 }
 ?

You want this:

${$options{$i}} = result $i;

For the sake of clarity I typically do something like the following:


$i = 1;
while ($i = 3) {
  $varName = $options . $i;

  ${$varName} = result $i;

}

Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



Re: [PHP] combining two variables to make one???

2003-12-22 Thread Tristan . Pretty
I am a monkey...
I had me angle bracket the wrong way round... what a stoner...!




Chris Boget [EMAIL PROTECTED] 
22/12/2003 15:04

To
[EMAIL PROTECTED]
cc
[EMAIL PROTECTED]
Subject
Re: [PHP] combining two variables to make one???






 Doesn't work for me though...?

Which isn't working? 

This:

${$options{$i}} = result $i;

or this:

$i = 1;
while ($i = 3) {
  $varName = $options . $i;

  ${$varName} = result $i;

}

 
 What do the '{' mean when declaring the variable?

I can't remember where it is in the documentation, but the '{' '}' symbols
basically clear up any ambiguity for the parser indicatig where the actual
variables are in a statement.

Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] includes...

2003-12-18 Thread Tristan . Pretty
bit of a random thought I need answering really...
when referencing external files, what's the difference between:

../
/
./

I know that ../ means back one directory and jsut a / means look from the 
root directory, but what is:
./

???

Cheers all..

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



Re: [PHP] includes...

2003-12-18 Thread Tristan . Pretty
Oh...
So it's the same as not having any /'s
just the file name?




Marco Tabini [EMAIL PROTECTED] 
18/12/2003 14:01

To
[EMAIL PROTECTED]
cc
[EMAIL PROTECTED]
Subject
Re: [PHP] includes...






That means the current directory

Cheers,


Marco

--

php|architect - The Magazine for PHP Professionals
Try us free at http://www.phparch.com!

Complete searchable PHP mailing list archives at 
http://www.phparch.com/mailinglists

[EMAIL PROTECTED] wrote:
 bit of a random thought I need answering really...
 when referencing external files, what's the difference between:
 
 ../
 /
 ./
 
 I know that ../ means back one directory and jsut a / means look from 
the 
 root directory, but what is:
 ./
 
 ???
 
 Cheers all..
 
 *
 The information contained in this e-mail message is intended only for 
 the personal and confidential use of the recipient(s) named above. 
 If the reader of this message is not the intended recipient or an agent
 responsible for delivering it to the intended recipient, you are hereby 
 notified that you have received this document in error and that any
 review, dissemination, distribution, or copying of this message is 
 strictly prohibited. If you have received this communication in error, 
 please notify us immediately by e-mail, and delete the original message.
 ***
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] Inserting function into mail()???

2003-12-17 Thread Tristan . Pretty
Ok, here's my code that I want to pick a random line from a text file, and 
then mail myself 10 times with a different line each time...
But It simply won't work...
Anyone know why?

?
function randomline($filename) {
$file = file($filename);
srand((double)microtime()*100);
$abc = $file[rand(0,count($file))];
}
$i = 0;
while (2  $i) {
$abc = randomline('text.txt');
mail([EMAIL PROTECTED], $abc, $abc, From: [EMAIL PROTECTED]);
$i++;
}
?

HTML
BODY
Mails sent!
/BODY
/HTML

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] Leechers...

2003-12-09 Thread Tristan . Pretty
I've just installed and am happily using Galery HP 
(http://www.galleryhp.org/)
A great photo gallery package...
Anyhoo,

I want to now be able to stop people from linking to the images directly, 
and only be able to access the images via my site...

Is this possible...?

Perhaps my questio is to vauge, but I'm just having a think at teh mo...

For the record, Gallery HP does a good job of hiding the full URL anyway.

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



RE: [PHP] Leechers...

2003-12-09 Thread Tristan . Pretty
Cheers for this...
On the 'new mail' thread...

I did start a new mail this time, I remember cause I'm been flamed for 
this before..?
Curious...
Sadly, I use Lotus Notes, if I opened an E-mail, copied the address and 
then hit new mail, would Notes remember and extra info?

Quite quite confusing :-(




Wouter van Vliet [EMAIL PROTECTED] 
09/12/2003 13:29

To
[EMAIL PROTECTED], [EMAIL PROTECTED]
cc

Subject
RE: [PHP] Leechers...






On dinsdag 9 december 2003 13:50 [EMAIL PROTECTED] told
the butterflies: 
 I've just installed and am happily using Galery HP
 (http://www.galleryhp.org/)
 A great photo gallery package...
 Anyhoo,
 
 I want to now be able to stop people from linking to the
 images directly, and only be able to access the images via my site...
 
 Is this possible...?
 
 Perhaps my questio is to vauge, but I'm just having a think
 at teh mo...
 
 For the record, Gallery HP does a good job of hiding the full
 URL anyway.
 
 *
 The information contained in this e-mail message is intended
 only for the personal and confidential use of the
 recipient(s) named above.
 If the reader of this message is not the intended recipient
 or an agent responsible for delivering it to the intended
 recipient, you are hereby notified that you have received
 this document in error and that any review, dissemination,
 distribution, or copying of this message is strictly
 prohibited. If you have received this communication in error,
 please notify us immediately by e-mail, and delete the
 original message.
 **
 *

You haven't been googling around, have you? Me neither, but you'll 
probably
find that you want to block requests with a referrer other than your own
website. This can be done with mod_rewrite.

Have fun!
Wouter

In the future, can you please create a NEW email message, rather than
replying to another and clearing it's entire contents when you're making a
new thread... !?!?!

(Welcome to the world, Catharina-Amalia Beatrix Carmen Victoria)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



RE: [PHP] Leechers...

2003-12-09 Thread Tristan . Pretty
Forget my whole new post retort ;-)







Wouter van Vliet [EMAIL PROTECTED] 
09/12/2003 14:11

To
'Wouter van Vliet' [EMAIL PROTECTED], 
[EMAIL PROTECTED], [EMAIL PROTECTED]
cc

Subject
RE: [PHP] Leechers...






On dinsdag 9 december 2003 14:30 Wouter van Vliet told the butterflies:
 On dinsdag 9 december 2003 13:50
 [EMAIL PROTECTED] told the butterflies:
  I've just installed and am happily using Galery HP
  (http://www.galleryhp.org/)
  A great photo gallery package...
  Anyhoo,
  
  I want to now be able to stop people from linking to the images
  directly, and only be able to access the images via my site...
  
  Is this possible...?
  
  Perhaps my questio is to vauge, but I'm just having a think at teh
  mo... 
  
  For the record, Gallery HP does a good job of hiding the full URL
  anyway. 
  
  
 *
  The information contained in this e-mail message is intended only
  for the personal and confidential use of the
  recipient(s) named above.
  If the reader of this message is not the intended recipient or an
  agent responsible for delivering it to the intended recipient, you
  are hereby notified that you have received this document in error
  and that any review, dissemination, distribution, or copying of
  this message is strictly prohibited. If you have received this
  communication in error, please notify us immediately by e-mail, and
  delete the original message. 
  **
  *
 
 You haven't been googling around, have you? Me neither, but
 you'll probably find that you want to block requests with a
 referrer other than your own website. This can be done with
 mod_rewrite. 
 
 Have fun!
 Wouter
 
 In the future, can you please create a NEW email message,
 rather than replying to another and clearing it's entire
 contents when you're making a new thread... !?!?!
 
 (Welcome to the world, Catharina-Amalia Beatrix Carmen Victoria)

Curse me, I mislooked. You did make a fresh post.. 






*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] CHMOD...

2003-12-04 Thread Tristan . Pretty
Is there anyway to use CHMOD:

chmod (/somedir/somefile, 0755);

but have it set all files, folders etc to the CHMOD setting I want?

I have a folder, and within that, I wanna quickly, jsut set it all to 
CHMOD 777.
all sub DIR's and files etc...

can it be done simply?

E.G. :
chmod (/somedir/%, 0755);

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] trim...

2003-11-26 Thread Tristan . Pretty
Why doesn't this work...?

$body = 
pblurb blah
phappy days
pend of text;

$body = trim($body);

$body now should output:
pblurb blah\nphappy days\npend of text but it doesn't...?

I'm using a text string in a javascript, adn it needs to be outbut on one 
line to work, yet this isn't doing it...
Any ideas?



*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] mailing multilple addresses...?

2003-11-19 Thread Tristan . Pretty
Below is some code, I've written, where I'm trying to do the following...
1. Display a text box, for a user to enter a number of email addresses, 
seperated by a comma.
2. take that value, split it based on the comma  and place that vlaue into 
an array.
3. Count the No of elements in the array
4. with a while loop, send to each address in turn
5. Display each successful address on screen afterwards.

I think my prob', is in my use of the array, and I can't seem to fathom 
why...?
Can anyone shed any light on this one for me... I'm a real fan of figuring 
out this stuff on my own, but time is against me today...

See below...

=

if ($action == 'send') {

$fimail[] = explode(,, $list);
$count = count($fimail[]);
$show = bUsers that have been mailed:/bbr;
$i = 1;
while ($count  $i) {

mail($fimail[], Subject, $message, $headers);
$show .= br$fimail;
$i++;
}

} else if ($action == '') {

$show = bUsers to be mailed:/bbr;

$show .= 
form method=\post\ action=\$PHP_SELF\
textarea name=\list\ 
style=\width:300px;height:150px;\/textarea
input type=\hidden\ name=\action\ value=\send\
input type=\submit\ value=\Send Mails gt;gt;\
/form
;

}

=


*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



Re: [PHP] mailing multilple addresses...?

2003-11-19 Thread Tristan . Pretty
Not a problem...
I do try and be thorough when I create mails...
I'll be more list friendly in the future...

cheers for the heads up!

Nw, if I can only solve my prob, I can go home ;-)





Jason Wong [EMAIL PROTECTED] 
19/11/2003 16:42
Please respond to
[EMAIL PROTECTED]


To
[EMAIL PROTECTED]
cc

Subject
Re: [PHP] mailing multilple addresses...?






You have started a new thread by taking an existing posting and replying 
to
it while you changed the subject.

That is bad, because it breaks threading. Whenever you reply to a message,
your mail client generates a References: header that tells all 
recipients
which posting(s) your posting refers to. A mail client uses this 
information
to build a threaded view (tree view) of the postings.

With your posting style you successfully torpedoed this useful feature; 
your
posting shows up within an existing thread it has nothing to do with.

Always do a fresh post when you want to start a new thread. To achieve 
this,
click on New message instead of Reply within your mail client, and 
enter
the list address as the recipient. You can save the list address in your
address book for convenience.

On Thursday 20 November 2003 00:26, [EMAIL PROTECTED] wrote:
 Below is some code, I've written, where I'm trying to do the 
following...
 1. Display a text box, for a user to enter a number of email addresses,
 seperated by a comma.
 2. take that value, split it based on the comma  and place that vlaue 
into
 an array.

[snip]

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Either I'm dead or my watch has stopped.
 -- Groucho Marx's last words
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



Re: [PHP] R: [PHP] mailing multilple addresses...?

2003-11-19 Thread Tristan . Pretty
Cheers to everyone, it works great!
Easy when I look at it now, but ant it the way...

I'm off to the pub now.. later...
Tris...





Alessandro Vitale [EMAIL PROTECTED] 
19/11/2003 16:50

To
[EMAIL PROTECTED], [EMAIL PROTECTED]
cc

Subject
[PHP] R: [PHP] mailing multilple addresses...?






try this:

if ($action == 'send') {

$fimail = explode(,, $list);
$count = count($fimail);
$show = bUsers that have been mailed:/bbr;
$i = 1;
while ($count  $i) {

mail($fimail[$i], Subject, $message, $headers);
$show .= br$fimail;
$i++;
}

} else if ($action == '') {

$show = bUsers to be mailed:/bbr;

$show .= 
form method=\post\ action=\$PHP_SELF\
textarea name=\list\ 
style=\width:300px;height:150px;\/textarea
input type=\hidden\ name=\action\ value=\send\
input type=\submit\ value=\Send Mails gt;gt;\
/form
;

}


cheers,

alessandro

-Messaggio originale-
Da: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Inviato: mercoledi 19 novembre 2003 17.27
A: [EMAIL PROTECTED]
Oggetto: [PHP] mailing multilple addresses...?


Below is some code, I've written, where I'm trying to do the following...
1. Display a text box, for a user to enter a number of email addresses, 
seperated by a comma.
2. take that value, split it based on the comma  and place that vlaue into 

an array.
3. Count the No of elements in the array
4. with a while loop, send to each address in turn
5. Display each successful address on screen afterwards.

I think my prob', is in my use of the array, and I can't seem to fathom 
why...?
Can anyone shed any light on this one for me... I'm a real fan of figuring 

out this stuff on my own, but time is against me today...

See below...

=

if ($action == 'send') {

$fimail[] = explode(,, $list);
$count = count($fimail[]);
$show = bUsers that have been mailed:/bbr;
$i = 1;
while ($count  $i) {

mail($fimail[], Subject, $message, $headers);
$show .= br$fimail;
$i++;
}

} else if ($action == '') {

$show = bUsers to be mailed:/bbr;

$show .= 
form method=\post\ action=\$PHP_SELF\
textarea name=\list\ 
style=\width:300px;height:150px;\/textarea
input type=\hidden\ name=\action\ value=\send\
input type=\submit\ value=\Send Mails gt;gt;\
/form
;

}

=


*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above. 
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



Re: [PHP] mailing multilple addresses...?

2003-11-19 Thread Tristan . Pretty
It should be off...!
I went away for two weeks recently, and left my subscription runing ot he 
list... sorry...
I'll be more careful...

It's been a funny few weeks... ;-)

Tris...





Marek Kilimajer [EMAIL PROTECTED] 
19/11/2003 17:17

To
[EMAIL PROTECTED]
cc
[EMAIL PROTECTED]
Subject
Re: [PHP] mailing multilple addresses...?






[EMAIL PROTECTED] wrote:

 Not a problem...
 I do try and be thorough when I create mails...
 I'll be more list friendly in the future...
 
 cheers for the heads up!
 
 Nw, if I can only solve my prob, I can go home ;-)
 

When you go home, don't forget to turn on your out of office autoreply, 
everyone loves to receive it.

Cheers,
Marek

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] Passing header info for use in downloading files...?

2003-11-11 Thread Tristan . Pretty
I have a page where the user clicks a link to download a file, but the 
file is out side of the root DIR.
passing certain variables in the link, (type, file_name) I call the 
correct file...
However, it's stopped working?
My code below shows how I select the correct mime info to pass to the 
header.. but I keep getting promted to download an HTML file all the 
time...

if ($type == 'pdf') {$mimeinfo = application/pdf;} else
if ($type == 'doc') {$mimeinfo = application/msword;} else
if ($type == 'exe') {$mimeinfo = application/octet-stream;} else
if ($type == 'ppt') {$mimeinfo = application/vnd.ms-powerpoint;} 
else
if ($type == 'xls') {$mimeinfo = application/vnd.ms-excel;} else
if ($type == 'xml') {$mimeinfo = text/xml;} else
if ($type == 'zip') {$mimeinfo = application/zip;}

header(Content-Disposition: attachment; filename=$file);
header(Content-Length:  . filesize($path));
header(Content-Type: $mimeinfo);
readfile($path);

My problem page is:
http://www.risk.sungard.com/download/?id=12617
click in the link 'Settlements ' and you'll see what I mean, it says 
it's a pdf, but when you have to specify the download location, it saves 
simply the html page?
can anyone spot my probably stupid error?

Tris...

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] Tristan Pretty is out of the office.

2003-11-05 Thread Tristan . Pretty




I will be out of the office starting  23/10/2003 and will not return until
11/11/2003.

I will respond to your message when I return.
Please contact Fiona or Alan for any issues.



*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Tristan Pretty is out of the office.

2003-10-29 Thread Tristan . Pretty




I will be out of the office starting  23/10/2003 and will not return until
11/11/2003.

I will respond to your message when I return.
Please contact Fiona or Alan for any issues.



*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Tristan Pretty is out of the office.

2003-10-29 Thread Tristan . Pretty




I will be out of the office starting  23/10/2003 and will not return until
11/11/2003.

I will respond to your message when I return.
Please contact Fiona or Alan for any issues.



*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Allowing specific IP's to bypass security.

2003-10-21 Thread Tristan . Pretty
Hi all...
I have a form that captures data, before then showing a few download 
links...
However, If the user is in our office, I want to bypass the form...
so at the very top of my page, I've put this...
(details_captured is my variable I use on the form as a hidden field, to 
confirm that the form has been submitted)

if ($REMOTE_ADDR == '111.222.333.444') {
$_SESSION['details_captured'] == FALSE;
$_SESSION['details_captured'] == yes;
}

reset the session variable:
$_SESSION['details_captured'] == FALSE;

Re-asign it to yes:
$_SESSION['details_captured'] == yes;

I'm new to sessions, but to me, this should work.. yet it doesn't..?
(Naturally, I've used an easy to read IP for this example)

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] Sessions.. (I'm learning), can't call a variable?

2003-10-16 Thread Tristan . Pretty
Not sure if this is a MySQL Q. or a PHP one, but here goes...

I'm just learning sessions...
And I'm trying to add a session variable to a MySQL database.
I've done this page that takes the results from a previous form...
But I get this error:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or 
`T_NUM_STRING' 
On line 83
Which is the line that relates to the line:
\$_SESSION['salutation'];\, 

I've tried removing the ';' but it change nothing...?
Can anyone see my error?

=
?
session_start();
header(Cache-control: private);

   $_SESSION['salutation'] = $_POST['salutation'];

//MySQL connection stuff
mysql_query(INSERT INTO $table (
salutation,
name,
city
} VALUES {
\$_SESSION['salutation'];\, 
\$_SESSION['name'];\, 
\$_SESSION['city'];\
}

?
//Rest of page... thanks etc...
=

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



Re: [PHP] Re: header() function...

2003-10-15 Thread Tristan . Pretty
You are all heart... ;-)




Curt Zirzow [EMAIL PROTECTED] 
14/10/2003 17:23

To
[EMAIL PROTECTED]
cc

Subject
Re: [PHP] Re: header() function...







I officially declare this thread foobar.

Curt
-- 
My PHP key is worn out

  PHP List stats since 1997: 
   http://zirzow.dyndns.org/html/mlists/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] header() function...

2003-10-14 Thread Tristan . Pretty
We've just moved sites, to a new URL...
on the home page of the old url, I simply had a page that was;

?
header(Location: http://www.newsite.com);
?

All good, any requests to that page, were cleanly redirected to the new 
site.
I know this cause I tested it many times...

Now on the stats for the new site, we can record no referals from 
http://www.oldsite.com
yet I know I (and my co-workers) went to http://www.oldsite.com and got 
redirected to http://www.newsite.com
Can someone confirm:

Does this method or redirection interfere with the web server logging 
visits?

Cheers,
Tris...

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] $PHP_SELF and include all variables?

2003-10-14 Thread Tristan . Pretty
I'm using $PHP_SELF, but need to automatically record what variables are 
in the URL at that time...
is that possible?

I've searched PHP.net, but cannot find this specific function...

Cheers,
Tris...

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



Re: [PHP] Re: header() function...

2003-10-14 Thread Tristan . Pretty
Bog standard web server logs...
We're hosted on a windows server I think... (sadly)





Scott Fletcher [EMAIL PROTECTED] 
14/10/2003 16:25

To
[EMAIL PROTECTED]
cc

Subject
[PHP] Re: header() function...






Web Server's log file or user defined log file (Sort of Like PHP Log)?

Tristan Pretty [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
.
 We've just moved sites, to a new URL...
 on the home page of the old url, I simply had a page that was;

 ?
 header(Location: http://www.newsite.com);
 ?

 All good, any requests to that page, were cleanly redirected to the new
 site.
 I know this cause I tested it many times...

 Now on the stats for the new site, we can record no referals from
 http://www.oldsite.com
 yet I know I (and my co-workers) went to http://www.oldsite.com and got
 redirected to http://www.newsite.com
 Can someone confirm:

 Does this method or redirection interfere with the web server logging
 visits?

 Cheers,
 Tris...

 *
 The information contained in this e-mail message is intended only for
 the personal and confidential use of the recipient(s) named above.
 If the reader of this message is not the intended recipient or an agent
 responsible for delivering it to the intended recipient, you are hereby
 notified that you have received this document in error and that any
 review, dissemination, distribution, or copying of this message is
 strictly prohibited. If you have received this communication in error,
 please notify us immediately by e-mail, and delete the original message.
 ***



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] Cookies Vs Sessions...?

2003-10-03 Thread Tristan . Pretty
Age old question...?
Please don't flame if it is

I currently remember my visitors on my site by setting a cookie thusly:

setcookie(logged, yes);

On each protected page, put an IF ($logged == yes) { //show page etc } 
else {//show login form etc }

All good, works fine hooray for me...
BUT...

I'm aware that a slight increase in a users browsers security setting, and 
this doesn't work...
So... I've started to learn. sessions.

I have a few questions, that my texts books seem to pussy foot around, and 
I get no answer...
1. Can sessions work in the same way as my cookies? (Just remember a value 
to a variable, accross many page)
2. can seesions be set up to work accross browser sessions? (If I close my 
browser, will they work when I open a new one?)
3. I've seen on many web sites a 'remember me' checkbox. I'd love to learn 
how to do that, is that session related? what's the step in teh right 
direction to remembering that?

Any advise, or first rate turtorials are welcome...
Cheers,
Tris

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] file_exists on different server...

2003-09-30 Thread Tristan . Pretty
I'm referencing an image on a different server, and it keeps changing 
URL's
Very odd, but t get round that, I tried...

if (file_exists(http://www.othersite.com/image_1.gif;)) {
$image_show=http://www.othersite.com/image_1.gif;;
} else {
$image_show=http://www.mysite.com/image_1.gif;;
}

but it always seems to do the else command, even though I know the file 
DOES exist...

Just for the record, this problem exists from our parent website to one of 
the subsideries, we're not referencing anything we shouldn't... ;-)

Any work arounds?

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



Re: [PHP] file_exists on different server...

2003-09-30 Thread Tristan . Pretty
RTFM?
(Sorry, very newbie question)




Jason Wong [EMAIL PROTECTED] 
30/09/2003 12:26
Please respond to
[EMAIL PROTECTED]


To
[EMAIL PROTECTED]
cc

Subject
Re: [PHP] file_exists on different server...






On Tuesday 30 September 2003 19:00, [EMAIL PROTECTED] wrote:
 I'm referencing an image on a different server, and it keeps changing
 URL's
 Very odd, but t get round that, I tried...

 if (file_exists(http://www.othersite.com/image_1.gif;)) {
 $image_show=http://www.othersite.com/image_1.gif;;
 } else {
 $image_show=http://www.mysite.com/image_1.gif;;
 }

 but it always seems to do the else command, even though I know the file
 DOES exist...

RTFM

Try fopen() or similar instead.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
If you are over 80 years old and accompanied by your parents, we will
cash your check.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



Re: [PHP] Header and dfile download bug???

2003-09-15 Thread Tristan . Pretty
Well, I'm on IE V6.0.2800
My boss, has the same version.
Yet.. when she hits the link, she get's the error, (unable to open file) 
However, I didn't say before, that it's Acrobat reader, that's giving the 
error.
The file is downloaded etc...
yet on my machine, I can see the file, and on hers, she cannot...?
Stumpt...






Curt Zirzow [EMAIL PROTECTED]
13/09/2003 18:54
 
To: [EMAIL PROTECTED]
cc: 
Subject:Re: [PHP] Header and dfile download bug???


* Thus wrote [EMAIL PROTECTED] 
([EMAIL PROTECTED]):
 Hi all,
 I have a download for that collects data from a user (name, e-mail etc) 
 The $bu variable and others are from the previous form too.
 [...]
 
 So, it works great on my desktop here at work, but I just got a few 
mails 
 from random users, who complained that they saw an error screen after 
 trying to download pdf's.

Well did they supply any information like what the error was or
what browser they were using?


 Dunno if this is a PDF problem, or if my script is bad?
 
 So, here is my code... (that site at the very top of my page.)
 The headers after the else statement are simply to avoid page caching, 
so 
 we can ignore them in this example.
 So, why does this work for me and many others, but not all?

I'm unable to answer that. Some knowlege of what exactly the error
is might help. The headers shouldn't cause error.

 
 *
 The information contained in this e-mail message is intended only for 
 the personal and confidential use of the recipient(s) named above. 

am I the intended person? the email wasn't addressed to me, so I
feel like I'm breaking the policy...

Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] Header and dfile download bug???

2003-09-12 Thread Tristan . Pretty
Hi all,
I have a download for that collects data from a user (name, e-mail etc) 
then I pass that info to a database and give them the file.
In the form, I pass two hidden variables, header and details_captured.
So when I post the form to $PHP_SELF, it detects this and then activates 
the header code, and hopefully gives the file to the user.
The $bu variable and others are from the previous form too.

So, it works great on my desktop here at work, but I just got a few mails 
from random users, who complained that they saw an error screen after 
trying to download pdf's.
Dunno if this is a PDF problem, or if my script is bad?

So, here is my code... (that site at the very top of my page.)
The headers after the else statement are simply to avoid page caching, so 
we can ignore them in this example.
So, why does this work for me and many others, but not all?



if (($header == 'collect')  ($details_captured == yes)) {
session_start();
$path = /home/site/download/$bu/$file;
header(Content-Disposition: attachment; filename=$file);
header(Content-Length:  . filesize($path));
header(Content-Type:  . filetype($path));
readfile($path);
} else {
session_start();
Header(Cache-control: private, no-cache); 
Header(Expires: Mon, 26 Jul 1997 05:00:00 GMT); # Past date
Header(Pragma: no-cache);
}


=

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



Re: [PHP] Linking to files outside the directory structure...?

2003-08-28 Thread Tristan . Pretty
Getting there.
I'm using...
$path = /home/risk/public_html/$bu/$file;
//Where $bu is the folder name where the file is, I've passed that from 
the previous form, no worries there. I've also passed the file name from 
the previous form, as I have the file type.
header(Content-Disposition: attachment; filename=$file);
header(Content-Length:  . filesize($path));
header(Content-Type: application/$type);
readfile($path);

yet when I get this header called, I get prompted to save teh file, all 
good, but I can only save it as an HTML doc, even though in the save 
dialog box, it tells me it's an acrobat fiel (in the case of pdf's etc)
How acn I force it to save as pdf, or zip etc...?






[EMAIL PROTECTED] jabber
27/08/2003 16:53

 
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
cc: 
Subject:Re: [PHP] Linking to files outside the directory structure...?


Hello,

This is very much a possibility. first you 'fopen' the file and then you 
do an 'fpassthru' it will send the file to the client. You do need to 
create the correct headers (content-type and content-disposition) to 
match the file type etc.


All the best

[EMAIL PROTECTED] wrote:

I wanna protect a few files from reandom downloads.
I'm moving hosts soon, and will loose my mod_auth_mysql module that let 
it 
talk to the .htaccess file.

What I want to do is store a number of files, outside of my web folder, 
say one level under it, but still get my browser to retrive that file.
Perhaps with some coding in PHP?

is this at all possible, or am I barking up the wrong tree...?

Any ideas?
Tris...

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above. 
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***


 



-- 
http://www.raditha.com/php/progress.php
A progress bar for PHP file uploads.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] Linking to files outside the directory structure...?

2003-08-27 Thread Tristan . Pretty
I wanna protect a few files from reandom downloads.
I'm moving hosts soon, and will loose my mod_auth_mysql module that let it 
talk to the .htaccess file.

What I want to do is store a number of files, outside of my web folder, 
say one level under it, but still get my browser to retrive that file.
Perhaps with some coding in PHP?

is this at all possible, or am I barking up the wrong tree...?

Any ideas?
Tris...

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] Host Check...?

2003-08-20 Thread Tristan . Pretty
http://www.beamhost.co.uk/hosting.html

I'm moving hosts with our site at work...
I found these guys and am very impressed.
Has anyone had any dealings with them? Know if they are any good?

Tris...

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] removing parts of a string...

2003-07-24 Thread Tristan . Pretty
I wanna be able to take a URL
http://www.mysite.com/downloads/file_1_a.pdf

and then remove:
http;//www.mysite.com/

then add:
/host/sites/site1/web/

to
downloads/file_1_a.pdf

Turning:
http://www.mysite.com/downloads/file_1_a.pdf
Into:
/host/sites/site1/web/downloads/file_1_a.pdf

I know I need to look up strings, but can someone point me in the right 
direction (I wanna learn, so don't give too much away!)



*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



Re: [PHP] removing parts of a string...

2003-07-24 Thread Tristan . Pretty
Cheers for your help...
I did this in the end...

$rest = substr($row[file_info], 27, 100);
$download = /home/sites/site1/web$rest;

where $row[file_info]   =   the full URL and the 27th character is the 
.com/ bit.

Live and learn, I love this language!

Cheers one and all!!
Tris...







R'twick Niceorgaw [EMAIL PROTECTED]
24/07/2003 15:18

 
To: [EMAIL PROTECTED]
cc: 
Subject:Re: [PHP] removing parts of a string...


On 24 Jul 2003 at 15:03, [EMAIL PROTECTED] wrote:

 I wanna be able to take a URL
 http://www.mysite.com/downloads/file_1_a.pdf
 
 and then remove:
 http;//www.mysite.com/
 
 then add:
 /host/sites/site1/web/
 
 to
 downloads/file_1_a.pdf
 
 Turning:
 http://www.mysite.com/downloads/file_1_a.pdf
 Into:
 /host/sites/site1/web/downloads/file_1_a.pdf
 
 I know I need to look up strings, but can someone point me in the
 right direction (I wanna learn, so don't give too much away!)
 

str_replace() ?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] Hiding URL's...

2003-07-24 Thread Tristan . Pretty
I read this article, and thought it was perfect for me... Just the same 
prob I'm having...
http://forums.devshed.com/archive/5/2002/06/2/37330

However, I don't understand how to get the file into an A tag where it 
can still find the file, AND make the URL useless if copied and pasted..

Am I missing the point, or is it staring me in the face?


*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



Re: [PHP] removing parts of a string...

2003-07-24 Thread Tristan . Pretty
Never thought of that...
Luckily, this function is gonna be held on a server for downloads only, 
and all the requests are gonna come straight from the 'master' site else 
where.
So I really shouldn't run into probs right now...
I will however lookinto making it that little bit more idiot proof after I 
finish on the current prob I'm on ;-)

Roll on Friday!






Curt Zirzow [EMAIL PROTECTED]
24/07/2003 17:29

 
To: [EMAIL PROTECTED]
cc: 
Subject:Re: [PHP] removing parts of a string...


* Thus wrote [EMAIL PROTECTED] 
([EMAIL PROTECTED]):
 Cheers for your help...
 I did this in the end...
 
 $rest = substr($row[file_info], 27, 100);
 $download = /home/sites/site1/web$rest;
 
 where $row[file_info]   =   the full URL and the 27th character is the 
 .com/ bit.

what if they use:
  http://mysite.com/download/file 
 
instead of:
  http://www.mysite.com/download/file

Your screwed!


If you don't want to use preg_match then look at strrchr.

Then of course what if they type:
  http://www.mysite.com/download/file?break=program

Are you safe from that too?

Make sure your safe in all conditions!


*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] $PHP_AUTH_USER question...

2003-06-06 Thread Tristan . Pretty
I have a page that allows a user to login, provided their username and 
password files from a previous form, match an entry in a MySQL database.
All fairly standard.

How can I get that to talk to $PHP_AUTH_USER?

When I use an .htaccess file to a directory that's protected, I don't want 
the user to see a pop up box (unless they are already logged in)
I want my form to register the $PHP_AUTH_USER varaiable...

I've got mod_auth_mysql installed on my apache server...

any ideas?

Tris...

***
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.




Re: AW: [PHP] Kill a cookie....

2001-05-17 Thread Tristan . Pretty



Thanks to all who replied.
I am really confused as to why, at teh very top of my page, I have told the
cookie to set to null.
and then in the last part of my php, just before my head tag, I re-set teh
cookie.
but the old value still remains.

What am I doing wrong???
Thanks you guys, I'll get there in the end.
Tris... ;)





you kill a cookie by setting an emty one with the same name
www.php.net/setcookie

sebastian

=

 I am using setCookie(cookie1, $form_variable)

 Is there a command like killCookie?

 I am finding that my pages are remembering cookies after they
 are needed.

 I've looked on php.net, but couldn't find anything.
 Tris...




**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.


**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Kill a cookie....

2001-05-16 Thread Tristan . Pretty



I am using setCookie(cookie1, $form_variable)

Is there a command like killCookie?

I am finding that my pages are remembering cookies after they are needed.

I've looked on php.net, but couldn't find anything.
Tris...




**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.


**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: SV: [PHP] Help plz!

2001-05-03 Thread Tristan . Pretty



Whoa,
take a deep breath and lets try again shall we.
Elias, I have run into this prob before, but each time, it seemed to dissapear
without reason.

If you fancy joining a more.. liberal disscussion group, I recomend joining
WDVL.
It is a list for all things webby, and most computer related issues are happily
sorted out by its close nit members.

Mail me off list if you want more info about subscribing.

I'll also ask them now for you.
Don't be afriad to ask questions, if you don't ask, you'll never know.
Tris...




=

Wrong place to search for help with this kind of problem...

1) Reboot your computer
2) Call your tech support
3) Call Microsoft tech support
4) Reinstall the browser
5) Don't ever ask questions like these again

// Mattias

PS. Nothing personal DS.





Hello,

It's a little off-topic, but this is driving me crazy!

For some weird reason my IE5.5/View Source command is not working!
not on any page! it's just not working! I click on it and nothing happens!

Any suggestions?

-elias




**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.


**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Help plz!

2001-05-03 Thread Tristan . Pretty



Here you go mate...
type in:
view-source:http://www.anyurl.com

and you'll see the source code.
I did this in IE, but I presume it'll work in NN

Good luck mate.
Tris...




===

hmm
take it easy!
i ask whetever...
and you reply if you can't and don't reply at all!

PS. Nothing personal too!

elias.





**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.


**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Random number generation...

2001-05-02 Thread Tristan . Pretty



Hi there,
A potentially dumb question here.

Is there an easy way to display a random number between 1 and 20?

I have looked on line, but either I am looking inall teh wrong places, or there
isn't this script on-line.

Can anyone point me in the right direction?

Cheers,
Tris...




**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.


**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] reading a URL...

2001-03-26 Thread Tristan . Pretty



'ello,

Is it Possible, in PHP to read a URL?

What I am trying to do is this...
I have many news stories in a database, and a single static news page, that
calls the story, and the corresponding headline.
I have looked about on-line, and seen a common URL,...

http://www.arandomsite.com/news_story.php?id=123

I have adopted this method, and it only displays the top most story in my
database, no matter what news ID I use.

Can I get the ID number from the URL?, and then pass that to the SQL statement?

I cannot find a tutorial or similar on-line anywhere.

Hope you can help,
Tris...

P.S, after getting this all set up, my boss asked me to turn everything into
.jsp pages.
SO, I am off to buy a "JSP in 20 seconds" Type books, any ideas?






**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.


**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] External file?

2001-03-15 Thread Tristan . Pretty



Morning,
I have a section of HTML that Is added to a page if a user logs in successfully.
Itis about 30 lines long, and I have included it in each page. What I would like
to do, is to have the HTML on a seperate file, and have the PHP call it if and
when a user logs in.
Is this possible?

Tris...





**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.


**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Naming cookies

2001-03-13 Thread Tristan . Pretty



Afternoon guys and girls
I have a queston regarding cookies...

I have a login form that takes the member name and password from a MySQL
Database.

I have three fields:
member
pw
userlevel

I want to set a cokkie to remember the user and thier user level, so I named the
cookie  -   authlevel$userlevel  --- as I have three levels of security access,
I opted for a dynamic cookie name,that changed depending on thier userlevel.

Can I include a variable in the cookie name?
I am having probs getting this to work correctly, and this is my first guess as
to why it isn't working.

I have included two codes, the first is my login script, and the second is on my
secure pages above the head tag.

If anyone can spot my error, I'll gladly furnish them with a beer and a
toblerone.

Thanks in advance,
Tris...




PRE

?

if ((!$member) || (!$pw)) {
 header("Location: http://www.mysite.com");
 exit;
}

$db_name = "my_database";
$table_name = "userlist";

$connection = @mysql_connect("my_database_host", "my_username", "my_password")
 or die("Couldn't connect.");

$db = mysql_select_db($db_name, $connection)
 or die("Couldn't select database.");

$sql = "SELECT * FROM $table_name
 WHERE member = \"$member\" AND pw = \"$pw\"
 ";

$result = mysql_query($sql)
or die ("Can't execute query.");

while($row = mysql_fetch_array($result)) {
 $userlevel = $row['userlevel'];
 $member = $row['member'];
 $pw = $row['pw'];
}

$num = mysql_numrows($result);

if (($num != 0)  ($userlevel = '1') || ($userlevel = '2') || ($userlevel =
'3')) {

$cookie_name = "authlevel$userlevel";
$cookie_value = "ok";
$cookie_expire = "";
$cookie_domain ="";
setcookie($cookie_name, $cookie_value, $cookie_expire, "/", $cookie_domain, 0);

$display_block ="

pBYou are now logged into STN Treasury/bBRYou are logged in under the
mail address, B$member/B, you can now access the site as per your assigned
access level B$userlevel/B.Pa href=\"secreta.php\"Link to level
1/ABRa href=\"secretb.php\"Link to level 2/ABRa
href=\"secretc.php\"Link to level 3/A
";

} else {

 header("Location: http://www.mysite.com");
 exit;
}

?


==


?

if (($authlevel1 =="ok") ||  ($authlevel2 =="ok") || ($authlevel3 =="ok")) {

$msg ="PHello, and welcome to level 1 of the secret test area...";

} else {
 header( "location:http://www.mysite.com");
 exit;
 }

?

/PRE

===




**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.


**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Using selected fields

2001-03-12 Thread Tristan . Pretty



Hi there,
Firstly a big thanks to those who pointed me in the direction of 'PHP-fast and
easy web development'. it was/is a great book, and I have learnt loads on the
past week.

Anyhoo...

I have a php page and included the line:

$sql = "SELECT * FROM $table_name
 WHERE member = \"$member\" AND pw = \"$pw\"
 ";

Now I have a third column called 'userlevel'.

I have a cookie that activates on successfully matching the member and pw fields
from a form on the previous page. make sense?

How can I tell the page to use the userlevel colunm too?

Here is the relevent section to my code... can anyone point me in teh rigth
direction please???



$sql = "SELECT * FROM $table_name
 WHERE member = \"$member\" AND pw = \"$pw\"
 ";

$result = mysql_query($sql)
or die ("Can't execute query.");

$num = mysql_numrows($result);

if (($num != 0)  ($userlevel == 1)) {

$cookie_name = "auth";
$cookie_value = "ok";
$cookie_expire = "";
$cookie_domain ="";
setcookie($cookie_name, $cookie_value, $cookie_expire, "/", $cookie_domain, 0);

$display_block ="

pBSecret area:/B
UL
 LIa href=\"secreta.php\"secret page a/A
 LIa href=\"secretb.php\"secret page b/A
 LIa href=\"secretc.php\"secret page c/A
 LIa href=\"secretd.php\"secret page d/A
 LIa href=\"secreteb.php\"secret page e/A
/UL
";

} else {

 header("Location: http://www.mypage.com");
 exit;
}



=

Thanks guys...
Tris...





**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.


**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP Book

2001-03-12 Thread Tristan . Pretty



Hi there,
I got this book from php.net is it the one you're after? who knows.
I just tried mailing it to you, but it was a huge 9Mb and my Firewall stops
mails after 5Mb
What I have done for you is put it up on line at my site.
Click here to get it, but remember it is 9Mb in size, have you got a fast
connection.
I'll take it down in a few days, if you still need it, let me know
http://www.beetastic.co.uk/phpman.pdf

good luck
Tris...






**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.


**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP Book

2001-03-12 Thread Tristan . Pretty



My god, you ever have one of those days???
I missed out an R...
the correct address is...
http://www.beertastic.co.uk/phpman.pdf

I am sorry, lets try again eh?

Tris...







Could not resolve nameserver.

 Original Message 

On 3/12/01, 8:44:32 AM, [EMAIL PROTECTED] wrote regarding
[PHP] PHP Book:


 Hi there,
 I got this book from php.net is it the one you're after? who knows.
 I just tried mailing it to you, but it was a huge 9Mb and my Firewall
stops
 mails after 5Mb
 What I have done for you is put it up on line at my site.
 Click here to get it, but remember it is 9Mb in size, have you got a fast
 connection.
 I'll take it down in a few days, if you still need it, let me know
 http://www.beetastic.co.uk/phpman.pdf

 good luck
 Tris...






 **
 This email and any files transmitted with it are confidential and
 intended solely for the use of the individual or entity to whom they
 are addressed. If you have received this email in error please notify
 the system manager.

 This footnote also confirms that this email message has been swept by
 MIMEsweeper for the presence of computer viruses.


 **

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


_

Do You Yahoo!?

Get your free @yahoo.com address at http://mail.yahoo.com









**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.


**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Tutorial?

2001-03-02 Thread Tristan . Pretty



Hi there,
Iam new to the world of PHP, and after my boss told me to learn PHP and MySQL, I
found my way here.
I am gettign to frips with MySQL, and Basic PHP seems to be sticking in my
brain, but I'd really appreciate it if you guys could point me in the direction
of a good on-line tutorial that'd point out the basics of geting these two
technologies to talk to one another.

Ultimatly, I'd like to have  a login screen, that checkes user name against
password on my Database.

You guys were recommended to me by a subscriber from another list, I hoep you
can help.

Thanks in advance,
Tris...





**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.


**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Tutorial?

2001-03-02 Thread Tristan . Pretty



Hi there,
Iam new to the world of PHP, and after my boss told me to learn PHP and MySQL, I
found my way here.
I am gettign to frips with MySQL, and Basic PHP seems to be sticking in my
brain, but I'd really appreciate it if you guys could point me in the direction
of a good on-line tutorial that'd point out the basics of geting these two
technologies to talk to one another.

Ultimatly, I'd like to have  a login screen, that checkes user name against
password on my Database.

You guys were recommended to me by a subscriber from another list, I hoep you
can help.

Thanks in advance,
Tris...





**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.


**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]