I need to process the contents of
SU: something ... blah blah¶
TI: Title ... asasa asasas asas¶
AU: author field ... asasasas¶
I want to filter $textarea. I need to change my code below to grab everything between
"TI:" and "¶", but not including "¶" :
I have this code.
snip--
Thanks!
"John W. Holmes" wrote:
> > $var = array (
> > 'AN' => array (
> > 'Description' => 'Accession Number: (AN)',
> > 'ReferenceURL' => 'AN__Accession_Number.jsp',
> > ),
> > 'AU' => array (
> > 'Desc
how about just
if (file_exists($dest_file)) {
unlink ($dest_file);
}
- Original Message -
From: "Charles Kline" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 17, 2003 6:04 PM
Subject: Re: [PHP] File System
> $result = unlink("file.txt") or
$result = unlink("file.txt") or die("Operation failed!');
On Monday, March 17, 2003, at 12:58 AM, Philip J. Newman wrote:
How do i delete a file ... ?
kill?? dele *srugs*
--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]
+64 (9) 576 9491
+64 021-048-3999
--
PHP General Mailing List (ht
On Monday, March 17, 2003, at 12:58 AM, Philip J. Newman wrote:
How do i delete a file ... ?
kill?? dele *srugs*
--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]
+64 (9) 576 9491
+64 021-048-3999
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.ne
How do i delete a file ... ?
kill?? dele *srugs*
--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]
+64 (9) 576 9491
+64 021-048-3999
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> I have a mySQL DB that stores word documents (as a BLOB). I am trying
to
> find a way of doing a word count on the documents using PHP. Can
anyone
> help??
Look at this:
http://www.winfield.demon.nl/index.html
to convert it to text and then count words. I just did a quick search to
find the ab
Hi all,
I have a mySQL DB that stores word documents (as a BLOB). I am trying to
find a way of doing a word count on the documents using PHP. Can anyone
help??
Thanks in advance,
Brad
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> hi guys i have multiple media to update in an entry for instance
>
>
>
> where 123 is the fileid of the media in the database , how could i
> possibly
> loop through the post vars of fileedit and get each entry to update ?
>
>
>
>
> so therefore i could have something like this , loop thro
Hi,
I need to get some details from a LOG file as to which
keywords are used...
I have attached the LOG file.
I heed the details of the following:-
1. Ip Address
2. Date
3. The page that was requested
4. KeyWords used by the Search Engine [ Google / Yahoo
seperated ]
(ordered BY DATE) in a tabu
Here are the outputs from the phpinfo() (called directly from ./u.php and
called from /var/www/html/test.php which executes u.php). Note that the
section on mysql is missing in the latter.
<--- from u.php --- >
phpinfo()
PHP Version => 4.3.0
System => Linux localhost.localdomain 2.4.7-10 #1 Thu S
hi guys i have multiple media to update in an entry for instance
where 123 is the fileid of the media in the database , how could i possibly
loop through the post vars of fileedit and get each entry to update ?
so therefore i could have something like this , loop through and update id 123
> I am going nuts reinstalling over and over again on different computers
> and keep getting this error. I am using 2.0.40 http (I know
> experimental, but don't tell me that :) )
Why not? Since this is the problem. Upgrade to Apache 1.3.27 and
everything will be fine.
-Rasmus
--
PHP Genera
I was wondering if php has a bug or is it apache, and how to determine
which it it. Every file I upload to my server, I print the file size
and it is twice the normal file size? Any idea what is going on, text
files "look" ok, images are all screwed up, large text files are messed
up too actually
> I have a client who insists on using PHP and an Access database. He
> describes a problem with the access databases becoming locked when a
user
> clicks 'stop' in their browser whilst downloading the page (and I have
to
> stop the IIS server to release it). I have absolutely no experience
with
Hi guys,
I have a client who insists on using PHP and an Access database. He
describes a problem with the access databases becoming locked when a user
clicks 'stop' in their browser whilst downloading the page (and I have to
stop the IIS server to release it). I have absolutely no experience wit
> suppose there's a string
> $string="I like my(hot) coffee with sugar and (milk)(PHP)";
>
> I would like to get an output of all possible combinations of the
sentence
> with the words between brackets:
> eg.
> I like my hot coffee with sugar and
> I like my hot coffee with sugar and milk
> I like
You can use strstr, stristr, strpos or regular expressions.
Maybe it's good to check the manual at php.net first before asking
a question ;)
Coert Metz
Kevin - Kd Micro Software wrote:
Hello all,
This is probably a really easy thing to answer but I don't know what the
answer is so if you lot coul
Excellent, thank you for your quick response John.
Kevin Green
KD Micro Software
E-Mail: [EMAIL PROTECTED]
Internet: http://www.kdmicro.com.au
- Original Message -
From: "John W. Holmes" <[EMAIL PROTECTED]>
To: "'Kevin - K
> Here's 3 examples:
> $var="www.google.com";
> $var="blah blah google blah";
> $var="google rules";
>
> Now I just want to see if $var contains the word 'google' in it -
which
www.php.net/strstr
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today.
Hi
Look at http://www.nusphere.com/
Here you can download apache, mysql, php and more with
an easy to use install programm for free.
It works nice for me!
Coert Metz
Blair Robinson wrote:
Hello,
I am making a web site i just want to be able to view my php outputs On my Computer how do i do this
Hello all,
This is probably a really easy thing to answer but I don't know what the
answer is so if you lot could help me I would appreciate it.
Here's 3 examples:
$var="www.google.com";
$var="blah blah google blah";
$var="google rules";
Now I just want to see if $var contains the word 'google'
Hi
If i'm reading your code in the right way, i think
you can better use the file_exists function available
in php
Read the manual at:
http://www.php.net/manual/nl/function.file-exists.php
Many success
Coert Metz
Sebastian wrote:
hello,
i have this snippet of code, from what i can tell it works
download and install the apache web server. that along with php should do
the trick. if you're doing any database work you may want to pick up the
windows version of that too.
some decent instructions are here:
http://www.thesitewizard.com/archive/php4install.shtml
-Original Message-
Fr
Hello,
I am making a web site i just want to be able to view my php outputs On my Computer
how do i do this i have downlaoded the 1mb windows php installer. and have the zipped
version(4.3.0) that is 4mb I have windows xp. Can you please point me in the right
direction or give me some answers o
not a bad idea, thanks, I will do just that.
cheers,
- Sebastian
+- Original Message -+
said by: "John W. Holmes"
| > i have this snippet of code, from what i can tell it works .. just
| > wondering
| > if i am doing it in a correct way, or if there is a better, or faster
| way.
| > tha
Can't tell for sure, but you might have one more closing bracket than
needed. my suggestion to call it from an href rather than as an img tag was
based upon the fact that the href tag will show an error message whereas the
img tag won't.
Hugh
- Original Message -
From: "Nate" <[EMAIL PROTE
> i have this snippet of code, from what i can tell it works .. just
> wondering
> if i am doing it in a correct way, or if there is a better, or faster
way.
> thanks for any input.
>
> $fp = @fopen("$_SERVER[DOCUMENT_ROOT]/images/$mapname.jpg","r");
>
> if ( $fp )
> {
> $mappic = " }
> else
>
php_value auto_prepend_file /home/www/www.virtual.com/php/prepend.php
php_value auto_append_file /home/www/www.virtual.com/php/append.php
OR:
php_admin_value auto_prepend_file your_file_name.php
php_admin_value auto_append_file your_file_name.php
I think that one or the other should work in the
hello,
i have this snippet of code, from what i can tell it works .. just wondering
if i am doing it in a correct way, or if there is a better, or faster way.
thanks for any input.
$fp = @fopen("$_SERVER[DOCUMENT_ROOT]/images/$mapname.jpg","r");
if ( $fp )
{
$mappic = "";
}
@fclose ( $fp );
Hi, thanks for your help but im not sure what you mean. My image php page is
http://www.maxamplify.com/maxgallery/admin/test.php?src=img.jpg This
contains the exact same code I posted below.
However if i make that into a function it gives me a red X as you can see
here: http://www.maxamplify.com/m
Is there any way anyone can think of to set up
auto_prepend_file/auto_append_file so that they only affect one virtual
domain on an Apache webserver (not system wide)?
Cheers,
Brad
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
In the receiving page, change your link from an tag to an then see what the error message says.
Hugh
- Original Message -
From: "Nate" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 16, 2003 2:55 PM
Subject: [PHP] Function or GD problem?
> Function or GD problem...
> I
Justin Garrett wrote:
> You were missing a semicolon:
> $result=strcmp($firstword, $secondword);
...
Thank you Justin and all other.
TR
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Is there a way to search 3 tables or more at once
and return all information that it finds? If I do a
inner join it will only return if there are matches in
the tables. If I do just a left join it returns the
left if nothing in the right is found and visa versa
for a right. Im using a unique id btw
Function or GD problem...
I have a strange problem here, hoping someone can help.
The following code works great but when I make it into a function it doesn't
error but it gives a RED X image.
PHP:
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/un
> hi guys trikky question , i would like to ignore html in content that
i am
> replacing news lines with page breaks , how is it possible ? at the
moment
> and
> new line like so \r\n in content will be replaced with a but
happens
> to
> work on say tables tags within the content aswell and need t
> I want to pass a value, which came from a HTML form, to another PHP
> script. How can i do this?
>
> e.g.: $login - the value of this varriable is came from LOGIN.HTML to
> LOGIN.PHP. How can i pass the value of $login from LOGIN.PHP to
> PROCESS.PHP?
The easiest way is with a session. Remember
Don't rely on checkboxes. If they are not checked, as you've found out I
think, then the value is not set at all. Use a hidden value to carry
over a key for each field, then check the checkbox to see whether it was
checked or not.
---John W. Holmes...
PHP Architect - A monthly magazine for PHP P
> $var = array (
> 'AN' => array (
> 'Description' => 'Accession Number: (AN)',
> 'ReferenceURL' => 'AN__Accession_Number.jsp',
> ),
> 'AU' => array (
> 'Description' => 'Author(s): (AU)',
>
Hi, I would like to automate some PHP web pages from a Windows application. The
relevant Microsoft document reveals that the WebControl's Navigate method should be
able to do this by supplying the URL, Post data and Header.
Question: As anyone accomplished this? If so, could they provide an exam
I am using MySQL via PEAR:DB like this (these statements are executed for
each SQL statement)::
$dbc = DB::connect( $dsn );
$cmd = strtoupper(strtok( $str, " " ));
if ( $cmd == "SELECT" || $cmd == "SHOW" )
$aRows = ( $queryparms == "" ) ? $dbc->getAll( $str ) : $dbc->getAll(
$str, $queryparm
Ok, thanks for the tip :)
Justin
on 13/03/03 7:53 PM, Ernest E Vogelsinger ([EMAIL PROTECTED]) wrote:
> At 23:33 12.03.2003, Justin French said:
> [snip]
>> Put this code in your shared library of functions (adapted from manual,
>> untested):
>> > functio
php-general Digest 16 Mar 2003 22:03:33 - Issue 1942
Topics (messages 139834 through 139872):
FOPEN and EREG not working
139834 by: Monil Chheda
passing values from one script to another script
139835 by: Chinmoy Barua
139837 by: Alan McFarlane
139843 by: Mar
having alot of difficulties wrapping my head around this and looking for
ideas...
SQL TABLE:
1...n fields
auto, name, description, version, etc...
auto= unique id
name= possibly non-unique string, but with unique version
description = possibly non-unique string, based
You're missing the ; on this line:
$result=strcmp($firstword, $secondword)
Anthony Ritter wrote:
The following test script for the function strcmp() is from page 114 -115 of
PHP (Hungry Minds).
I'm getting a parse error on line 6.
Using PHP 4.1.1 / MS Win 98 / Apache Server.
Many thanks...
T
Anthony Ritter wrote:
The following test script for the function strcmp() is from page 114 -115 of
PHP (Hungry Minds).
I'm getting a parse error on line 6.
Using PHP 4.1.1 / MS Win 98 / Apache Server.
Many thanks...
Tony Ritter
..
=1)
{
$statement="comes
You need a semicolon after the strcmp() function
$result=strcmp($firstword, $secondword);
LinuxGeek
Anthony Ritter wrote:
The following test script for the function strcmp() is from page 114 -115 of
PHP (Hungry Minds).
I'm getting a parse error on line 6.
Using PHP 4.1.1 / MS Win 98 / Apache S
The following test script for the function strcmp() is from page 114 -115 of
PHP (Hungry Minds).
I'm getting a parse error on line 6.
Using PHP 4.1.1 / MS Win 98 / Apache Server.
Many thanks...
Tony Ritter
..
=1)
{
$statement="comes after";
}
else if
Hello all
A frind of mine likes to count the impressions on each of his photgraphy online
and as well he likes to display this number under each image
he dosn't wish to use for each image a new request to the different count script
..all should be counted with one script and saved in one datafil
hi guys trikky question , i would like to ignore html in content that i am
replacing news lines with page breaks , how is it possible ? at the moment and
new line like so \r\n in content will be replaced with a but happens to
work on say tables tags within the content aswell and need to ignore
I'm hopeful that someone here has been in my situation and found a fix for
it.
I recently installed a clean OpenBSD 3.2 system, and added the
php4-core-4.2.3 and php4-gd-4.2.3 packages, along with a few other packages
from the php4 collection. Most everything seems to be working fine.
However, ph
use mysql_list_tables ?
>= Original Message From "shaun" <[EMAIL PROTECTED]> =
>Hi,
>
>i would like to list all of the tables and field names in my database
>
>e.g.
>
>table 1
> field 1
> field 2
> field 3
>table 2
> field 1
> field 2
> field 3
>table 3
> field 1
> field 2
> field
Anyone can send any referer (sic) header to your script. It shouldn't
be used for checking if someone is trying to hack the script, but it
should be find in your case.
rotsky wrote:
I've experimented using $_SERVER['HTTP_REFERER'] which seems to work here.
If the user enters valid login detail
I thought I understood this example: http://www.php.net/manual/en/ref.array.php
array(
'first' => 'Caleb',
'last' => 'Maclennan'
)
);
echo "My first name is {$var['name']['first']}!";
?>
I can do that. But, my array looks more like:
$var = array (
Try:
somewhere global define :
$encryptiontechnique = 'ENCRYPT ALGORITHM';
function encryptPassword($password, $salt='') {
global $encryptiontechnique; if ($salt === '') { $salt =
$encryptiontechnique; }
// CODE..
}
Joel Colombo
"Liam Gibbs" <[EMAIL PROTECTED]> wrote in mes
I have a function, such as this:
function encryptPassword($password, $salt = $encryptiontechnique) {
}
$encryptiontechnique is defined, obviously outside the function. How is it possible to
make $encryptiontechnique global so that this will work?
have a look at my class , i had to do it from scratch as pear db + mdb have
too much weight and needed a faster app, being that its going to be on a mysql
database only, i send my login variables to a connect function, and those
login variables i store in a file outside the web directory
http://el
Hey you guys!
First, I have to say, that php.net gave me a lot of support in the last few weeks and
months. It's been great to suck information from your guys' website! Thanx a lot!
This weekend, I've been fighting with some really weird problem though... I installed
a few mail(); actions on my
Not sure how to answer your question as I am real new to PHP, but you
may want to look at PEAR if you have not done so. I know there are
libraries that folks have been talking about recently that handle just
these sorts of things. If you don't use them - you may find your
answers by looking at
Hi,
i have a form on a page which is built dynamically and consists of fields in
a certain table and checkboxes. The puropse of the form is to update the the
status of a table called CMS_FIELDS which stores data of all the fields for
all the tables in the database.
Using the following code i am a
Hi,
I am currently working on transforming a rather large software package to
oop. I do have a few years of experience with php, but just started to use oop.
One of the first question that arose was how to handle configuration vars.
These should ideally be stored in a file:
Now, I have to acces
As you are already using sessions, you can store the original page in a
session variable
rotsky wrote:
I have a small login form on the home page of my site. At the moment, when
people enter their user details and hit 'send', they go to another page
which check their details and, if they are suc
> Weird, check if both versions use the same php.ini, it is mentioned in
> phpinfo output.
>
Yes, they both point to /etc/php.ini
Do you want me to paste the contents of the 2 files here ? they are a little
long so i'm asking
gamin
--
PHP General Mailing List (http://www.php.net/)
To unsubs
> But the manual says that HTTP_REFERER is unreliable, so I'm
> intrigued to know exactly what the problems are. Any ideas?
The HTTP_REFERER field is retrieved from the "HTTP Referer:" header as
used in the HTTP protocol. This field is set entirely by the client
browser / application retrieving t
I have a small login form on the home page of my site. At the moment, when
people enter their user details and hit 'send', they go to another page
which check their details and, if they are successful, prints a welcome
message. The problem is, they are now on this page and have to work their
way ba
fgets moves the position in the file pointer, you need
echo (time()).">>";
$old=fgets($fp);
echo $old." = ";
$new=time();
echo ">>>".($new - $old)."<<<";
pei_world wrote:
I have a problem in time substraction.
the number print out correct, but don't know
why i cann't do the
I don't think Google follows URLS to every variation based on a query string.
I know to have some of my pages indexed I had to rewrite the URL so the query
string looked like a directory path.
Cheers,
Rob.
-{ Rene Brehmer }- wrote:
>
> Judging from how Google has indexed my site, it simply follo
Weird, check if both versions use the same php.ini, it is mentioned in
phpinfo output.
gamin wrote:
Hi Marek,
Try executing phpinfo from u.php, run it once from the command line and
once from the browser and check if they are nay different.
I added the function phpinfo() to u.php and ra
On 16-Mar-2003 Daniel Harik wrote:
> Hello,
>
> Guys i try to join to tables
>
> slides:
> id
> userid
> file
> moment
>
> users
> id
> username
>
> As there few slids per user and i want to get only last one, i use
> following
> sql query, but it fetches me first slide. How can i make it fet
I have a problem in time substraction.
the number print out correct, but don't know
why i cann't do the substraction between them
===
echo (time()).">>";
echo (fgets($fp))." = ";
$new=time();
$old=fgets($fp);
echo ">>>".($new - $old)."<<<";
Hi Marek,
> Try executing phpinfo from u.php, run it once from the command line and
> once from the browser and check if they are nay different.
>
I added the function phpinfo() to u.php and ran u.php from the commandline
and then backticked `` it in test.php and called test.php from the browser.
Judging from how Google has indexed my site, it simply follows all links
it encounters on the site, since I atleast can find several of my pages
that are a bunch of links deep inside the site...
Rene
On Sat, 15 Mar 2003 10:26:05 -0700, Mike Hillyer wrote about "[PHP] Do
query strings get spidered
Either use session, cookies, or pass the value in URLs. Because it is
login information, I would choose session or cookie
Chinmoy Barua wrote:
Hello everybody,
I want to pass a value, which came from a HTML form, to another PHP script. How can i do this?
e.g.: $login - the value of this varria
Try executing phpinfo from u.php, run it once from the command line and
once from the browser and check if they are nay different.
gamin wrote:
Hi,
I have PHP 4.3.0 installed on a Red Hat system. I have written a number
of command line scripts which run perfectly fine. For example
#! /usr/b
Hi,
I have PHP 4.3.0 installed on a Red Hat system. I have written a number
of command line scripts which run perfectly fine. For example
#! /usr/bin/php -q
This script works perfectly fine, when started from the command line. Now i
intend to call this command line script from another ano
Chris,
you can splice an array
http://www.php.net/manual/sv/function.array-splice.php
Jan Grafstrom
"Chris Winters" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> I'm having a bit of trouble...
>
> I have an array that consists of a string like this:
>
> string1\rstring2\rst
At 14:20 16.03.2003, Peter Goggin said:
[snip]
>Is the value returned by session_id (), called after session_star() always a
>unique string?
>The results of several trials gave me:
>6f88d2d3fd7d0d47aea1e45087368adc
>3cc2c1b299fcaa6f4fd107683d78a00c
>115e8da11
Is the value returned by session_id (), called after session_star() always a
unique string?
The results of several trials gave me:
6f88d2d3fd7d0d47aea1e45087368adc
3cc2c1b299fcaa6f4fd107683d78a00c
115e8da118af1c5d88d6db1c1481077a
26dda220f9d64de593ce2f2de6b4bb6e
26dda220f9d64de593ce2f2de6b4bb6e
i.
Have a look at the $_POST super global variable documentation.
"Chinmoy Barua" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Hello everybody,
>
> I want to pass a value, which came from a HTML form, to another PHP
script. How can i do this?
>
> e.g.: $login - the value of this
Hi Hubert,
Check if there display_errors in your php.ini is set to Yes,
and also take a look at your apache error log when you execute this
page, probably you will see an error there.
Best regards,
Veniamin Goldin
Interlogics, Inc.
Вы писали 15 марта 2003 г., 12:34:35:
HK> Hello all!
HK> In
Hello everybody,
I want to pass a value, which came from a HTML form, to another PHP script. How can i
do this?
e.g.: $login - the value of this varriable is came from LOGIN.HTML to LOGIN.PHP. How
can i pass the value of $login from LOGIN.PHP to PROCESS.PHP?
Thank you,
Chinmoy
---
Hi,
I need to get some details from a LOG file as to which
keywords are used...
I have attached the LOG file.
I heed the details of the following:-
1. Ip Address
2. Date
3. The page that was requested
4. KeyWords used by the Search Engine [ Google / Yahoo
seperated ]
(ordered BY DATE) in a tabu
php-general Digest 16 Mar 2003 09:53:48 - Issue 1941
Topics (messages 139811 through 139833):
Re: How to convert an array to variables?
139811 by: Charles Kline
139820 by: Tom Rogers
Re: SMTP Authenticate
139812 by: The Head Sage
Re: Do query strings get spidered by
Hello all!
In index.php I include a file template.php using
Works fine. In template.php I'm using include function too
Works fine on all machines I installed it till now: Windows (NT, 98), Linux
(some of them). But I installed it on FreeBSD and... surprise. When I call
index.php, all I get i
You do have to declare the headers first !!??
John Taylor-Johnston wrote:
> For the record, am I declaring these in the correct order?
> Thanks,
> John
>
>
> header("Content-type: text/notabene");
> header("Content-Disposition: attachment; filename=".$dbtable.".nb");
>
> ob_start("ob_gzhandler")
You do have to declare the headers first !!??
John Taylor-Johnston wrote:
> For the record, am I declaring these in the correct order?
> Thanks,
> John
>
>
> header("Content-type: text/notabene");
> header("Content-Disposition: attachment; filename=".$dbtable.".nb");
>
> ob_start("ob_gzhandler")
hi,
Does someone have solution how to index page and dynamically create
keywords for "keywords" meta tag ?
Based on full page content, not only on title.
Thanks !
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
88 matches
Mail list logo