RE: [PHP] Re: access denied

2002-10-04 Thread Timothy J Hitchens

Please don't 777 anything... do you have shell access (if
platform/access supports it)
login and and see what the perms are and work on the problem don't
hammer it with a fix all.


Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Chen Shuang [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, 3 October 2002 7:31 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: access denied


try CHMODing your files and your directory to 777, since i believe you
are using a Linux Server.

"Simon Angell" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> The PHP script im using works on my computers server, but when after 
> uploading to my web server i get this...
> Warning: fopen("wtest.txt", "wb+") - Permission denied in 
> /home/canberra/public_html/bomonster/canberra.php on line 6
>
> Dunno why either, the directory is not protected, can anyne help me 
> with this? one?
> The particular code in question...
> //Writing of local file
>
>  $rContents = implode( "\r\n", file( 
> 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) );
>
> if( ($fp = fopen( 'wtest.txt', 'wb+' )) !== false )
> {
> fputs( $fp, $rContents );
> fclose( $fp );
> }
> --
> Cheers
> -
> Simon Angell
> Canberra ACT
> www.canberra-wx.com
> -
> Member of:
> Australian Severe Weather Association. www.severeweather.asn.au
> -
> This email is virus free.
> Scanned before leaving my mailbox
> using Norton Antivirus 2002 for Win2k
> Scanned with the latest definition File.
>
>



-- 
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




RE: [PHP] Findng a pattern

2002-10-04 Thread Timothy J Hitchens

Are you saying you want to be able to extract the numbers etc?


Timothy Hitchens (HiTCHO)
[EMAIL PROTECTED]

HiTCHO has Spoken!






-Original Message-
From: Henry [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, 5 October 2002 2:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Findng a pattern


Dear All,

Excuse my ignorance but I'm STILL a newbie to this aspect of PHP.

$str="Results 1 - 10 of about 14.   Search took
0.04 seconds."

I would like to look for the string above in a buffer of text. However I
would like to find it even if the numeric are different. Furthermore I
would like to know what the values are. Is there a simple way to do
this?

TIA

Henry






-- 
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




RE: [PHP] Findng a pattern

2002-10-04 Thread Timothy J Hitchens

Are the value in the same order each time?


Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Henry [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, 5 October 2002 2:44 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Findng a pattern


Thanks, but I don't want to uses google's SOAP interface, is there a
preg type solution.


"Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Google has a SOAP interface for this.
>
> On Sat, 5 Oct 2002, Henry wrote:
>
> > Dear All,
> >
> > Excuse my ignorance but I'm STILL a newbie to this aspect of PHP.
> >
> > $str="Results 1 - 10 of about 14.   Search took
> > 0.04 seconds."
> >
> > I would like to look for the string above in a buffer of text. 
> > However I would like to find it even if the numeric are different. 
> > Furthermore I
would
> > like to know what the values are. Is there a simple way to do this?
> >
> > TIA
> >
> > Henry
> >
> >
> >
> >
> >
> >
> > --
> > 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Findng a pattern

2002-10-04 Thread Timothy J Hitchens




Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Henry [mailto:[EMAIL PROTECTED]] 
Try this.. but take what Rasmus says if you are talking about Google:

1 - 10 of about 14.   Search
took 0.14seconds.";

preg_match_all("/[0-9]+[.]*[0-9]*/", $string, $result);

print_r($result);

?>


Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






Sent: Saturday, 5 October 2002 2:50 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Findng a pattern


Yes

The string will always be the same and the repective values will always
have the same meaning.

"Timothy J Hitchens" <[EMAIL PROTECTED]> wrote in message
001101c26c2b$55adc400$0500a8c0@BAMBINO">news:001101c26c2b$55adc400$0500a8c0@BAMBINO...
> Are the value in the same order each time?
>
>
> Timothy Hitchens (HITCHO)
> [EMAIL PROTECTED]
>
> HITCHO has Spoken!
>
>
>
>
>
>
> -Original Message-
> From: Henry [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, 5 October 2002 2:44 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Findng a pattern
>
>
> Thanks, but I don't want to uses google's SOAP interface, is there a 
> preg type solution.
>
>
> "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message 
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Google has a SOAP interface for this.
> >
> > On Sat, 5 Oct 2002, Henry wrote:
> >
> > > Dear All,
> > >
> > > Excuse my ignorance but I'm STILL a newbie to this aspect of PHP.
> > >
> > > $str="Results 1 - 10 of about 14.   Search
took
> > > 0.04 seconds."
> > >
> > > I would like to look for the string above in a buffer of text. 
> > > However I would like to find it even if the numeric are different.

> > > Furthermore I
> would
> > > like to know what the values are. Is there a simple way to do 
> > > this?
> > >
> > > TIA
> > >
> > > Henry
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > 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 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




RE: [PHP] post(ing) data without a form

2002-10-05 Thread Timothy J Hitchens

The other thing.. the header will redirect and the rest won't happen???

> header ( 'Location: ../test/test.php' );

Just out of interest sake do you or not have register global on/off??



Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Pablo Oliva [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, 5 October 2002 7:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP] post(ing) data without a form


OK, I'm attempting this again:

header ( 'Location: ../test/test.php' );
sendByPost();
function sendByPost()
{
 $host = "localhost";
   $port = 80;
   $postdata = "field1=value1&field2=value2&field3=value3";
   if ($sp = fsockopen($host, $port)) {
 fputs($sp,"POST /jotr/test/test.php HTTP/1.0\n");
 fputs($sp,"Host: $host\n");
 fputs($sp,"Content-type: application/x-www-form-urlencoded\n");
 fputs($sp,"Content-length: ".strlen($postdata)."\n");
 fputs($sp,"Connection: close\n\n");
 fputs($sp,$postdata);
 fclose($sp);
   }
}

Pretty straight forward.  Now here's the code for test.php: $temp1 =
$_POST['field1']; $temp2 = $_POST['field2']; $temp3 = $_POST['field3'];
print $temp1.' '.$temp2.' '.$temp3;

But the data is not posting:
Notice: Undefined index: field1 in c:\apache\htdocs\jotr\test\test.php
on line 3
Notice: Undefined index: field2 in c:\apache\htdocs\jotr\test\test.php
on line 4
Notice: Undefined index: field3 in c:\apache\htdocs\jotr\test\test.php
on line 5

WTF is going on, shouldn't this work?


-- 
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




RE: [PHP] How to drop a element from an array

2002-10-06 Thread Timothy J Hitchens

Hint... look at array_push etc (like a stack)


Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Alex Shi [mailto:[EMAIL PROTECTED]] 
Sent: Monday, 7 October 2002 8:35 AM
To: [EMAIL PROTECTED]
Subject: [PHP] How to drop a element from an array


Is there a good way do drop an element from an array?

Alex Shi



-- 
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




RE: [PHP] How to drop a element from an array

2002-10-06 Thread Timothy J Hitchens

unset $some_variable[4];

then you would need to resort... etc (if needed)


Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Alex Shi [mailto:[EMAIL PROTECTED]] 
Sent: Monday, 7 October 2002 8:43 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] How to drop a element from an array


Yes I have read about the array functions in the manul. But I don't
think they are what I need. What I want is to drop what ever an element
from an array, not just from top or bottom.

I can create a function to do this. But I need a better solution, that
is to say not to cost too much memery.

Alex Shi


"Timothy J Hitchens" <[EMAIL PROTECTED]> дÈëÏûÏ¢ÐÂÎÅ
:002e01c26d89$780c14c0$[EMAIL PROTECTED]
> Hint... look at array_push etc (like a stack)
>
>
> Timothy Hitchens (HITCHO)
> [EMAIL PROTECTED]
>
> HITCHO has Spoken!
>
>
>
>
>
>
> -Original Message-
> From: Alex Shi [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 7 October 2002 8:35 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] How to drop a element from an array
>
>
> Is there a good way do drop an element from an array?
>
> Alex Shi
>
>
>
> --
> 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] server error sending email from script

2002-10-06 Thread Timothy J Hitchens

I don't use Windows for development/production but I read somewhere that
you needed
to set in your php.ini for windows a config for either the host server
that had
email capabilities.

That's all I can offer.


Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: John [mailto:[EMAIL PROTECTED]] 
Sent: Monday, 7 October 2002 12:32 PM
To: [EMAIL PROTECTED]
Subject: [PHP] server error sending email from script


Q:
If I'm not on the server that is to be used to send the email, how can I
configure PHP to send from a certain server? thanks all
 
Warning: Server Error in c:\program files\apache
group\apache\htdocs\sonicmailer\sonicadmin.php on line 276

and line 276 is
mail($address, stripslashes($subject), $finalbody, $mailheaders);

and it's not sending the email.
The variables are OK, 
$mailheaders=From: blah Reply-To: [EMAIL PROTECTED]




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




RE: [PHP] page expires

2002-10-07 Thread Timothy J Hitchens

You have posted data from a previous page into this page.. "FORM"


Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Wilbert Enserink [mailto:[EMAIL PROTECTED]] 
Sent: Monday, 7 October 2002 5:48 PM
To: [EMAIL PROTECTED]
Subject: [PHP] page expires


Hi all


I'm using a lot of php in my website. Especially forms. but Aftre a form
submit I get this message from IE that the page is expired and I have to
push Refresh. Does anybody know why this is happening and is there a way
to avoid this message??

thx. Wilbert


Warning: Page has Expired 
The page you requested was created using information you submitted in a
form. This page is no longer available. As a security precaution,
Internet Explorer does not automatically resubmit your information for
you. 

To resubmit your information and view this Web page, click the Refresh
button. 

-
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
[EMAIL PROTECTED]
-


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




RE: [PHP] Referrer

2002-10-07 Thread Timothy J Hitchens

You can't know the name of the script but you can know the complete URI
(if available) $_SERVER['HTTP_REFERER']


Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Alex Shi [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, 8 October 2002 9:39 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Referrer


How can know the referrer of a script?
Let's say script B is linked from script/page A. Is it possible to
obtain A's name in script B?

Alex

-- 
---
TrafficBuilder Network: 
http://www.bestadv.net/index.cfm?ref=7029


-- 
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




RE: [PHP] Re: PHP to Excel (csv)

2002-10-07 Thread Timothy J Hitchens

If it is in Mysql format why not reimport into a database and write an
export script... that does the work?



Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Owen Prime [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, 8 October 2002 4:31 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: PHP to Excel (csv)


Check out http://www.wotsit.org for the exact csv specifications but
here is 
a snippit that works for me:

function csv($value) {
if (strstr($value, ",") || strstr($value, "\n") ||
strstr($value, "\r")) {
return "\"" . str_replace("\"", "\"\"", $value) . "\"";
} else {
return $value;
}
}

Run this function on each value then implode them with a comma and put a
\n 
at the end.

Cheers,

Owen Prime
http://www.noggin.com.au


Ivo Stoykov wrote:

> Hi
> 
> I have following problem.
> 
> Some data retreived from mysql db I need to send to the user as a 
> *.csv file. Usually I separate fields (usually double quoted) with 
> comma (,) or semicolomn (;) and the records with cr/lf (Windows) It 
> works fin until I do not have cr/lf in any of the fields.
> 
> Unfortunately the last field is TEXT type and may have more that one 
> cr/lf inside (as data). When this is the case the *,csv file cannot be

> open correctly in Excel. If there are cr/lf in any field it is split 
> in Excel as a separate row and the record structure is broken.\
> 
> Any idea how could solve this? Thank you
> 
> Ivo


-- 
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




RE: [PHP] register_global variables on Mac OS X

2002-10-08 Thread Timothy J Hitchens

Make a page with  then display
the page threw the server into the browser... and it should
like the location in the top area.




Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Jule Slootbeek [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, 9 October 2002 12:32 PM
To: [EMAIL PROTECTED]
Subject: [PHP] register_global variables on Mac OS X


Hi,
i just installed PHP under Mac OS X and now i was looking around trying 
to find the php.ini file, or its equivalent, in order to turn 
register_globals to on, so i don't have to go through 15 pages of code 
and change all my variables to $_POST['foo'] but i couldn't find 
anywhere where this action could be done. So i was wondering if anybody 
had experience with PHP under Jaguar, and could lend me a hand.

TIA,

Jule Slootbeek
[EMAIL PROTECTED]


-- 
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




RE: [PHP] Calling C functions

2002-10-08 Thread Timothy J Hitchens

If it is a command line executable just do:



Notice the backward ` they send it to the shell.

Have fun!!



Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Sharad Tiwari [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, 9 October 2002 1:07 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Calling C functions


hi all,

I have just started working on PHP ... (just a couple of days back) I
had posted a question yesterday and could not get any rep from anyone


My problem is this ... I have to take inputs from a web-based interface
and pass them as parameters to a C function (or an executable program)
Could anyone of you kindly let me know how can I invoke such C library
functions or executables from php.

thanks for the help in advance.

Warm Regards,

Sharad


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




RE: [PHP] Mail

2002-10-09 Thread Timothy J Hitchens

Get a SMTP sender class.. have a look at www.zend.com


Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Steel [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, 9 October 2002 7:32 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Mail


Hi group,

I have a problem.
There is no sendmail on the hoster's computer. (OS Unix-like) Can I send
mail in any other way? Please help!

-- 
The Same,
 Steel  mailto:[EMAIL PROTECTED]
 http://www.none.ru


-- 
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




RE: [PHP] how to create files??

2002-10-09 Thread Timothy J Hitchens

If the script is in the same directory just try either "{file}" nothing
in front or "./{file}"

What function are you using to create files?



Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Aidal [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, 9 October 2002 4:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP] how to create files??


Hi NG.

I'm having problems creating files at a certain location.
If I attemt to create a file it gets created in the rootdir (htdocs)
even though I add a path infront of the file name. I've tried severel
ways of adding a path (with "/" and "\\") but nothing works.

eksample: "/nef/articles/54.txt"

File 54.txt gets created but not at the intented location, instead it
gets created in htdocs.

Can anyone help me by telling me how I'm suppose to do this? I'm running
PHP on Win98 with Apache.

~ Aidal



-- 
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




RE: [PHP] POST method not allowed

2002-10-09 Thread Timothy J Hitchens

Are you sure that .php3 files are being processed by PHP ???


Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Muhammad Khairuzzaman [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, 9 October 2002 12:54 PM
To: [EMAIL PROTECTED]
Subject: [PHP] POST method not allowed


Hi,

I'm having problem with processing my form file. It seems that everytime
I use the Post method to process the for the browser return :

Method Not Allowed
The requested method POST is not allowed for the URL /quote.php3.

And if i use a GET method, all the variables are returned as 0 (null ,
no
value) is there some configuration i miss configured or what?

i'm using PHP 4 and apache 1.3 on windows XP

thank u



-- 
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




RE: [PHP] POST method not allowed

2002-10-09 Thread Timothy J Hitchens

Have you confirmed that they are php processed... eg made a phpinfo()
page and run it?


Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Muhammad Khairuzzaman [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, 9 October 2002 8:14 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] POST method not allowed



"Timothy J Hitchens" <[EMAIL PROTECTED]> wrote in message
006c01c26f7b$529a7530$0500a8c0@BAMBINO">news:006c01c26f7b$529a7530$0500a8c0@BAMBINO...
> Are you sure that .php3 files are being processed by PHP ???
>
>
> Timothy Hitchens (HITCHO)
> [EMAIL PROTECTED]
>
> HITCHO has Spoken!

Yes, i've tried *.php and *.php3



-- 
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




RE: [PHP] Spiders, Sessions, trans SID, and mod_rewrite

2002-10-09 Thread Timothy J Hitchens

I would suggest that you look at php as the total solution not
mod_rewrite that way you have
access to include the PHPSESS information into the URL directly eg:

http://www.yourhost.com/application/first_name/john/sess_id/99f9f99f9f9f
9ijfjf9f/cart_full/yes

You can achieve this by reading the following artcile... we use it for
websites that will be searchable
by bots with great success.

http://www.phpbuilder.com/columns/tim19990117.php3

Oh and on the bot side of things... simply have an expiry (epoch stamp)
in the url that you read
and if that has expired simply reload the page with a new session... oh
and you will experience the
same problem with bookmarking visitors as well as bots with the expired
sessions.. or you could just
simply say if it doesn't exist recreate... it depends if you are going
to use built in session handlers
or user (eg database) or even custom self written (my suggestion for
your situation - write your own env).


If you need further assistance don't hesitate to ask.



Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Tech Support [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, 10 October 2002 4:33 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Spiders, Sessions, trans SID, and mod_rewrite


Hello

I'm preparing to start an ecommerce project that will require the use of
sessions throughout the entire site for referrer and affiliate tracking
purposes. I also plan to use mod_rewrite to make links to dynamic
content search spider friendly. example: instead of
/somescript.php?var1=value1&var2=value2 I'll have
/somescript/var1/value1/var2/value2

The obstacle I'm facing is the automatic appending of the session id to
every link upon first entering the site and to every link on every page
of the site if session cookies are disabled. This will make search
spiders either not index the linked pages, or worse index them with an
old session id!

I am hoping to find two solutions to dealing with this inherent problem
with sessions, spiders, trans sid, and url rewriting.

1) I am thinking of obtaining and using a list of known spiders to
determine if the visitor is a spider. If they are a spider I simply
won't call session_start() thus eliminating the auto appending of the
session id to every link. URL rewriting will take care of the ugly query
strings and I'm in business to get spidered. How ever, this could mean a
lot of overhead if the site gets busy and a lot of work keeping an
updated spider list. Does anyone have a solution for this? I want some
real world experience here please.

2) If I rewrite query strings how will I deal with trans sid? For
instance, I have a rewritten url that looks like this:
/somescript/var1/value1/var2/value2 and the session id is going to get
appended leaving me with this:
/somescript/var1/value1/var2/value2&PHPSESSID=some_session_id. Is there
a way to make php add the session id in the slash delimited format? I am
aware of arg_separator.output directive but that does not fix the = in
the query string.

I appreciate any help, tips, and/or pointers. The problem is clear -
it's the solution that's a little fuzzy!

Thanks for reading,

Jim


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




RE: [PHP] My boss wants to know...

2002-10-09 Thread Timothy J Hitchens

Look at the odbc access using php:

http://www.php.net/manual/en/ref.odbc.php

You will still need to have a windows box with odbc to your
webserver.. pref unixish..



Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Randum Ian [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, 10 October 2002 8:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP] My boss wants to know...


Hi guys, got a tricky question here and I know I will probably get
flamed for asking it here but here goes!

My boss wants me to put a large Access database onto the net so that
people can query it both from the company and from the outside and he
wants to be able to have the database up to date and also easy to
change.

As far as I can see that leaves me with only Active Server Pages in
which to access this database or am I wrong?

Randum Ian
[EMAIL PROTECTED]
DJ / Reviewer / Webmaster, DancePortal (UK) Limited 
DancePortal.co.uk - Global dance music media




-- 
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




RE: [PHP] how to ping

2002-10-10 Thread Timothy J Hitchens

Use a call out to a shell ... eg

$result = `ping x.xy.z.i`;

oh and you may need to use a path and capture the stand out.. as well.



Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Achi [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, 10 October 2002 12:18 AM
To: Daniel Kushner; 'Muhammad Khairuzzaman'; [EMAIL PROTECTED]
Subject: [PHP] how to ping 


Hi

 how to ping by PHP  ???   
I wanna to ping some hosts and get echo back. 
 thanx.


-- 
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




RE: [PHP] NewB PHP / mysql Q

2002-10-10 Thread Timothy J Hitchens

Try this..

select u.id, u.lname as lastname, u.frname as firstname, ... etc

oh and the reason you get an error is that you can't have a dot in a
variable etc...



Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: inpho [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, 10 October 2002 4:19 PM
To: [EMAIL PROTECTED]
Subject: [PHP] NewB PHP / mysql Q


Hi all,

I need a bit of quick help here
I've joined 2 tables together with this code here:

$result=mysql_query("select u.id, u.cid, u.lname, u.fname, u.vld, c.id,
c.cname from tblclient u, tblcompany c where u.vld=1 and u.cid =
c.id",$db);

then I put it into an array:

while ($row=mysql_fetch_array($result)) {
print "$row[UName]$row[FName]
$row[LName]$row[cname]";
}

but the $row[xxx] aren't displaying any info, if I put $row[u.unam] it
returns an error. I run the SQL query in phpmyadmin and it runs fine,
returning 2 results how do I access those results through an array???

- inpho -





-- 
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




RE: [PHP] connecting to a txt file - newbie

2002-10-10 Thread Timothy J Hitchens

Try:





Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: jennifer [mailto:[EMAIL PROTECTED]] 
Sent: Friday, 11 October 2002 12:14 AM
To: [EMAIL PROTECTED]
Subject: [PHP] connecting to a txt file - newbie


good morning, im having some issues with the simple task of pulling from
a txt file.

my code is:


 
  job app
 db


  


and the txt file contains one line of bogus txt. you can see my results
here: http://www.villany2k1.com/text.php.

if anyone has any info as to what i am doing wrong, i would really
appreciate it.

thanks so much
jennifer
([EMAIL PROTECTED])



-- 
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




RE: [PHP] Refresh my Memory

2002-10-10 Thread Timothy J Hitchens

You will need to use Javascript... NOT PHP..


Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Stephen [mailto:[EMAIL PROTECTED]] 
Sent: Friday, 11 October 2002 8:05 AM
To: PHP List
Subject: [PHP] Refresh my Memory


Hello,

I forget exactly how to do this so I'm turning to you all for some help.
How can I make it so that if a user does not have a resolution of
atleast 1024x768, it sends them to another page or recomends that they
up their screen size before viewing the page? Any help will be great.
Thanks!

Thanks,
Stephen Craton
http://www.melchior.us


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




RE: [PHP] Converting audio files and display/play in browser

2002-10-11 Thread Timothy J Hitchens

Why don't you call your converter then pipe out to a file... the then
send headers for that type
of file and readfile to the browser..


Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Thomas Nilsen [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, 12 October 2002 4:22 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Converting audio files and display/play in browser


Anyone got any ideas as to how I can solve the following in PHP?

I want to be able to select a file, and convert it from sox format to
MP3 or WAV, and then play it in the requestors browser? Can this be
achieved in an easy way?

The problem I have is to be able to call  up lame/sox or similar tools
on the linux web server, and once the newly converted file is available,
throw it at the requesting browser as a file download?

Regards, Thomas



-- 
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




RE: [PHP] Converting audio files and display/play in browser

2002-10-11 Thread Timothy J Hitchens

Easy...




What this does it sends a header then the file is read from disk to
standard out.

Please note you may need to get your include/paths correct...




Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Thomas Nilsen [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, 12 October 2002 6:05 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Converting audio files and display/play in browser


It's the part sending the header back to the browser with the correct
info I'm not sure about. I can handle the conversion of the audio file,
but I'm not sure how to get the browser to read the converted file once
it's ready.


"Timothy J Hitchens" <[EMAIL PROTECTED]> wrote in message
005301c27159$483dc170$0500a8c0@BAMBINO">news:005301c27159$483dc170$0500a8c0@BAMBINO...
> Why don't you call your converter then pipe out to a file... the then 
> send headers for that type of file and readfile to the browser..
>
>
> Timothy Hitchens (HITCHO)
> [EMAIL PROTECTED]
>
> HITCHO has Spoken!
>
>
>
>
>
>
> -Original Message-
> From: Thomas Nilsen [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, 12 October 2002 4:22 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Converting audio files and display/play in browser
>
>
> Anyone got any ideas as to how I can solve the following in PHP?
>
> I want to be able to select a file, and convert it from sox format to 
> MP3 or WAV, and then play it in the requestors browser? Can this be 
> achieved in an easy way?
>
> The problem I have is to be able to call  up lame/sox or similar tools

> on the linux web server, and once the newly converted file is 
> available, throw it at the requesting browser as a file download?
>
> Regards, Thomas
>
>
>
> --
> 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Converting audio files and display/play in browser

2002-10-11 Thread Timothy J Hitchens

You are welcome... anytime..

Also you can add an attachment dispos... if you want and it will get
them to save to disk instead..



Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Thomas Nilsen [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, 12 October 2002 6:31 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Converting audio files and display/play in browser


Excellent! Works like a charm.

Thanks for your speedy help Timothy.

Regards, Thomas


"Timothy J Hitchens" <[EMAIL PROTECTED]> wrote in message
005f01c27162$0804c820$0500a8c0@BAMBINO">news:005f01c27162$0804c820$0500a8c0@BAMBINO...
> Easy...
>
> 
> header('Content-Type: audio/mpeg');
> readfile('xxx.mp3');
>
> ?>
>
>
>



-- 
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




RE: [PHP] trying to get a certain num of rows in mysql

2002-10-13 Thread Timothy J Hitchens

Look at limit... eg Select * from xyz limit 1,5


Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Pablo Oliva [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, 13 October 2002 8:44 AM
To: [EMAIL PROTECTED]
Subject: [PHP] trying to get a certain num of rows in mysql


When doing a select query, is there any way to specify which rows you
want "selected", as in rows 1 through 40, and then 40 - 80 on the next
query.  I've been searching through the manual but can't find anything.
Should this be done through a php script instead, or is there a native
(mysql) command/clause for this?


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