Hello Everyone.
I saw a Perl script today that the owners of the site can send an
email and pages would update automatically update. How are they
accomplishing this?
Gary
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ok,
I got it to work.now how do I take a varaible back into PHP
I do a $var = system("/path/to/cgi $varforCGI")
and in the CGI script I do a print $varforPHP
however it prints the varforPHP to the broswer, I need it saved it var
Any (more) help would be great!!
Michael
On Wed, 6 Mar 2002
$getme = $q;
$qArray = explode(" ", $getme);
$num = count($qArray);
$sql = "SELECT * FROM `hyperlinks` WHERE 1";
for ($i = 0; $i < $num; $i++)
if (strlen($qArray[$i]) > 0)
$sql .= " AND `keywords` LIKE '%".$qArray[$i]."%'";
$sql .= " ORDER BY `id` ASC LIMIT 0, 30";
heh
Gary wrote:
> Hello Everyone.
> I saw a Perl script today that the owners of the site can send an email
> and pages would update automatically update. How are they accomplishing
> this?
>
> Gary
>
HOW:
The mail goes to an address, which is passed to procmail, which passes
the mail info to
>Is anything hindering you from using XML expat? You can use that to do it.
>I already post a mail on this, search in the archive for xml related
>posts.
***
This is data from a data service.
This is the ENTIRE source code of the URL they let m
Craig Westerman <[EMAIL PROTECTED]> wrote:
> I'm just now trying to learn PHP. I don't know ANYTHING about XML. I don't
> even have any XML reference books yet. I did create a PHP script that is
> usable (see below), but there has to be a more efficient way to do it with
> PHP. I'll hunt up your p
If the value you want to send back to php is an integer you could just
say
exit $number;
from perl and that will be put into your $var.
Otherwise use exec() instead of system.
exec("/path/to/perlscript.pl", $scriptOutputArray, $scriptExitValue);
Anything that gets printed from the perl scrip
Hi there!
I am wondering if there is any way to stop PHP from sending any headers at
all.
I know about php -q, but unfortunately I want it to work with the module
version of PHP as well.
What I do is collect all output with the ob_ functions, and send it to a
pipe. And there the output is encode
Hi -
Here's my dilema.
include() will include a *file* and if there are PHP tags in it will run
that PHP code, otherwise pass it along as is.
eval() will parse a *string* of PHP code, but assumes it's valid PHP code.
I want to something like this:
- read a file that contains a mixture
I'm having issues registering and then updating a value for specific items
in an array. I've read through the manual and MARC but I can't seem to find
the right answer. Here's what I'm trying to do...
Basic Backgroung: This is a "view cart" page. Depending on products that
they have selected
Thanks Jim. Works like a charm. Real sweet.
Would you explain what this line does?
$out[$m[1]] = $m[2];
Learning is a real blast. Wish I would have jumped in a couple of years ago.
Thanks again.
Craig ><>
[EMAIL PROTECTED]
-Original Message-
From: Jim Winstead [mailto:[EMAIL PROTE
On Wed, Mar 06, 2002 at 06:02:15PM -0600, Craig Westerman wrote:
> Would you explain what this line does?
>
>$out[$m[1]] = $m[2];
it assigns an entry to the output array. $m is populated by preg_match
(where it was passed as the third argument) with the entire match in
$m[0], the first paren
Hi
I use the following construct to avoid the "?" in the url which stops the
image being cached...
img src="http://www.domain.com.au/buttons/image.gif-System-3-ff-9-L/test";
then have a rewrite rule that redirects anything at /buttons/ to index.php
This way I can send file name of the backgr
Looking around, I see someone else has submitted a feature request for
this exact thing...
http://bugs.php.net/bug.php?id=5435
Not that this helps *me*, but there's more than one of us :)
On Wed, 6 Mar 2002, Philip Hallstrom wrote:
> Hi -
> Here's my dilema.
>
> include() will include a
Well, it sort of helps me (dang my quick sends :)
He has a workaround... for anyone else that needs it.
function my_eval($my_eval_str) {
$eval_str = "?>";
$eval_str .= $my_eval_str;
$eval_str .= " Looking around, I see someone else has submitted a feature request for
>
Hi to all,
Just want to ask if there is any function that will force to wrap character
by it width length and not by its character length. Wordwrap function can
force wrapping by its character and not by
its width.
Please help.
Regards,
Mike
--
PHP General Mailing List (http://www.php.
Right, I'd like to post messag to this newsgroup.
However, a auto reply message tell me to subscript the mailing list
first.
Hence, I join the mailing list, but I got near a hundred more mail than.
Can I use this newgroup but don't recieve any mailing list mail from
php.general mailinglist anym
Hi,
Are there any binary tree implimentations avaliable for php4?
Cheers,
Brad
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi
Here is a script that will send any file for download, even .html files. I
called it send.php
usage is send.php?filename=file_to_send
Looks weird but it works
Tom
At 06:31 AM 7/03/2002, Caleb Carvalho wrote:
>Hi all,
>
>PHPBuilder.com Has an Easy File Upload Article, i find it to be ver
Hi All,
Below is a bit of a post that I found in the archives...
Is the Spruce tree implimentation available somewhere?
Cheers,
Brad
From: Spruce Weber ([EMAIL PROTECTED])
Date: 09/21/00
I've created from scratch a tree class that utilizes templates. What makes
thi
The following creates a red rectangle png image
This sends created image to browser
ImagePNG($im);
How would I save this image as test.png to file to be hard coded in static
web pages?
Thanks
Craig ><>
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, v
Hi
use ImagePNG($im,"test.png")
Tom
At 12:17 PM 7/03/2002, Craig Westerman wrote:
>The following creates a red rectangle png image
>
>Header("Content-Type: image/png");
>$im = ImageCreate(500, 75);
>$red = ImageColorAllocate($im, 255, 0, 0);
>ImageFill($im, 100, 100, $red);
>ImagePNG($im);
>?>
>
I am a PERL scripter and I am just getting into PHP. My first few pages are
simple but I am running into a few problems when changing OS. I included
below a piece of code that works fine in windows but not on a linux box. Not
sure what the differences would be
The problem is that on the windo
Hi Tom,
At first it didn't work. I had to create a blank png image in Photoshop and
uploaded it. I then changed file permissions and then the image creation
worked. Is there a way to write to test.png when it doesn't already exist
and file permissions are set?
Thanks for your help.
Craig ><>
[E
An alternative is to put the code into makeImage.php and then call it
directly from your HTML page with your whenever
you want that image displayed.
Jim.
"Tom Rogers" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi
> use ImagePNG($im,"test.png")
>
> To
Hello,
I am facing some problem in the crontab...Can anyone tell me how to
solve this
Actually i have written the php script to send mail to the users after a
week.In the crontab i have made a entry so that it will trigger after
12.05.
5 0 * * * lynx http://info/php/MailForm.php
I've seen and successfully used the built-in function 'mkdir()' on several
occasions, but I am having trouble understanding the mode parameter.
I've seen 0771, 0775 and 0777 used on several occasions but I am never
quite sure what to use.
Since I write and normally run scripts on a Windows platf
I've just written a couple of simple routines which read an write small text
files to the server:
function readData( $filename, &$data )
{
if (!$fd = @fopen($filename, "r"))
{
return false;
}
flock($fd, LOCK_SH);
$data = fread($fd, filesize($filename));
fclose($fd);
return true;
}
fun
I've got a site where the administration facilities use frames. Now, as the
authentication
expires after a fixed period of no use, I check to see if we are an
authenticated user. If not,
I would like to redirect them to a non-framed page.
I'm trying something like:
header("location: index.php; t
Hello,,
I am looking at setting up PHP driven shop.
Can anyone recommend one? Or which ones to stay away from? And why?
I am reviewing phpShop at the moment, and it looks pretty nicely featured.
Thanks,
Pete
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http:
Alan McFarlane <[EMAIL PROTECTED]> wrote:
> header("location: index.php; target: _top");
header("Location: index.php");
header("Window-target: _top");
jim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Try...
lynx -dump
-philip
On Thu, 7 Mar 2002, Uma Shankari T. wrote:
>
>
> Hello,
>
> I am facing some problem in the crontab...Can anyone tell me how to
> solve this
>
> Actually i have written the php script to send mail to the users after a
> week.In the crontab i have made a ent
Hi,
Here is a foo.txt file :
name=foo
age=100
sex=y
I want to open the file, find the age line, and then replace the 100 with
another value.
The only way i see, is to rewrite the entire file
Maybe this is a stupid question, but, i tried the online doc, and saw
nothing about this
T
Christopher J. Crane wrote:
> I am a PERL scripter and I am just getting into PHP. My first few pages are
> simple but I am running into a few problems when changing OS. I included
> below a piece of code that works fine in windows but not on a linux box. Not
> sure what the differences would be..
ok, so this makes alot of since... if I move my website from one server to
another server I'll have to go through every single file & redo the
directory structure? Isn't this the reason for the includes... so you
don't have to go through every single file to make changes? Maybe I should
go bac
mysql-list-dbs works but displays all databases. How do I limit to
display those that a user has access rights to?
http://www.php.net/manual/en/function.mysql-list-dbs.php
$link = mysql_connect($server, $user, $password);
$db_list = mysql_list_dbs($link);
while ($row = mysql_fetch_object($db_
[Posted and Replied]
Salut Marc,
You could find an ini file function. Something like:
http://www.zend.com/apidoc/c1948.php
http://ca.google.yahoo.com/bin/query_ca?p=how+to+access+an+ini+file+using+PHP&y=on&hc=0&hs=0
You would have to add one line:
[MyData]
name=foo
age=100
sex=y
I've done it
Patrick Teague wrote:
> ok, so this makes alot of since... if I move my website from one server to
> another server I'll have to go through every single file & redo the
> directory structure? Isn't this the reason for the includes... so you
> don't have to go through every single file to make c
I know you would want to code your chmod, but I use my CuteFTP window to
auto-calculate which permissions I want to use/code. Not necessary on Windows,
but on Unix it's an absolute.
I use 644 (Read Owner, Read Group, Read Public,Write Owner, on a Unix
server with no trouble for normal *.PHP files
Group: Is flock even necessary?
Allan: You look like you have Perled. It was necessary for Perl.
Have you thought of MySQL instead?
Alan McFarlane wrote:
> I've just written a couple of simple routines which read an write small text
> files to the server:
>
> function readData( $filename, &$dat
Hi,
Here is a foo.txt file :
name=foo
age=100
sex=y
I want to open the file, find the age line, and then replace the 100 with
another value.
The only way i see, is to rewrite the entire file
Maybe this is a stupid question, but, i tried the online doc, and saw
nothing about this
T
Hi
You have to make sure that the user that your web server is running as has
permission to write where you want to create the file.
Tom
At 12:56 PM 7/03/2002, Craig Westerman wrote:
>Hi Tom,
>
>At first it didn't work. I had to create a blank png image in Photoshop and
>uploaded it. I then c
I am not sure I can articulate this well.
But I will try.
I want to combine either two variables or a variable and string to bring up
the name of a previous variable name to display the data from the first.
So in the first part I will have a listing that will look like
// Submit etc
> for ($i=1; $i < 12; $i++) {
> echo state_$i; // This would print out either Yes No or Maybe.
> }
What you actually want is:
for ($i=1; $i < 12; $i++)
{
$mystate = "state_".$i;
echo $$mystate; // This would print out either Yes No or Maybe.
}
$$X tells PPH to use
Hey all,
I'm trying not to cache a page. I have the following code:
$return = split(" ", exec("vmstat"));
$cpu_top = 100;
$return = $cpu_top - $return[count($return) -1];
which returns the amount of idle cpu time. The problem is this, every
time the page is loaded
Hah,
I found the problem. It's because vmstat when called always,
initially has the cpu idle at 99. This explains it. So, how would I go
abouts returning used cpu time on a system?
Thanks,
Paul
Paul A. Procacci wrote:
> Hey all,
> I'm trying not to cache a page. I have the followi
OK, the only reason you would have #!/usr/bin/php is if you're going to run
it as a shell script under unix.
You approach should _still_ be 2 scripts (3 if you count the include file).
#!/usr/bin/php
If the script really must be one and the same (name and path), then maybe
#!/usr/bin/php
Do a select on mysql's system database/table
Mysql.db
There's a column called db and one called user.
Put a where clause on user.
If you want more help, there is a PHP-DB mailing list.
[TK]
> -Original Message-
> From: jtjohnston [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 7 March
Does that actually work? I'm using Mozilla, and it didn't work for me? :)
Paul
Jim Winstead wrote:
>Alan McFarlane <[EMAIL PROTECTED]> wrote:
>
>>header("location: index.php; target: _top");
>>
>
>header("Location: index.php");
>header("Window-target: _top");
>
>jim
>
--
PHP General Maili
101 - 150 of 150 matches
Mail list logo