[PHP] Re: How to send POST info without a form?

2002-10-02 Thread Girish Nath

Hi

Snoopy can do this too:

http://sourceforge.net/projects/snoopy/

Regards


Girish
--
www.girishnath.co.uk



Lallous [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 try www.sloppycode.net

 * © Sloppycode.net All rights reserved.
  * @title Html Source class - api for getting/posting to websites
  * @author C.Small
  * @version 1.0

 or phpclasses.org

 Elias,

 Chris Nielsen [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I have a single php file that I want to do some different things (only
one
  at a time, based on a conditional):
 
  display a form to the user for input
  submit information from (above) form to database
  list information in database (that has been INSERTed by the above)
 
  I want this file to be able to call itself using the following code:
 
  $input = $_SERVER['PHP_SELF'].?action=INPUT;
  $list = $_SERVER['PHP_SELF'].?action=LIST;
  print 'a href='.$input.'Input a new user/abr';
  print 'a href='.$list.'List all users/a';
 
  but I want to submit the action value as a POST rather than a GET. I
then
  have conditionals around each of my modules that check $_POST['action']
 for
  one of three values and only print that module if that's the action I
need
  the file to perform.
 
  Basically I'm trying to figure out how to lump this all into one file.
  Obviously I could split it into three files that do each of the desired
  actions, but I would then also have to have a fourth file which provides
a
  front end into it, which I don't want to do and is what got me started
 down
  this path.
 
  How can I submit POST information to a php file without using an HTML
 form?
 
  TIA.
 
 





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




[PHP] PHP Java Extension

2002-08-16 Thread Girish Nath


Hi

I wanted to learn some new stuff and experiment with the PHP Java extension,
what are the possibilities, what's cool about it, what are you guys using it
for and where can i find some tutorials for it ? Had a look at php.net but
can't find much info suitable for a newbie to this particular extension.

Thanks :)


Girish




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




[PHP] Fast Templates to embed data into Flash files ?

2002-06-14 Thread Girish Nath

Hi

I'm about to start a project which involves building a 'website on a CD'.
There will be similar areas and layouts, just containing different data,
within the site pages. The pages will be a HTML framework containing Flash
and QuickTime files etc.

I've worked with Fast Templates and liked the technique used to separate
design and data and was wondering if anyone has filled content in Flash
files using a Fast Template type technique.

The final step would be to freeze the contents into static .swf files so
they can be cut to a CD (so basically the data needs to end up inside Flash
files)

I'm researching this option because it may save a lot of work in future if i
build other products on a similar theme.

Thanks


Girish
--
www.girishnath.co.uk



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




[PHP] Re: PHP doubt

2002-05-29 Thread Girish Nath

Hi

Make sure you have an auto_increment field in your table, do the insert
first, then use mysql_insert_id() to get the number of the last which you
can use for the customer number. See the notes at the following page:

http://www.php.net/manual/en/function.mysql-insert-id.php

Regards


Girish
--
www.girishnath.co.uk


R [EMAIL PROTECTED] wrote in message
000301c20772$9538d0b0$0a6da8c0@lgwezec83s94bn">news:000301c20772$9538d0b0$0a6da8c0@lgwezec83s94bn...
 Hey guys,

 I have written a program and being a newbie I dont know if this is good or
 will give me problems in the future, so will appreciate it if you could
just
 have a look at the function and give me your esteemed opinion ;-)
 This is just a snip from the program...its pretty easy so your guru's
should
 have no problem figuring it out.


 // connected to the database successfully and running this query:
 {
 mysql_query.etc
 $r=select max(cno)+1 from customer;
 insert into customer values($r,'$name');
 }
 print(Your customer number is: $r);

 what do you think? And will this return the correct values if 2 people
 submitted the form at the same time?


 Cheers,
 -Ryan.




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




[PHP] Re: Passing an array on

2002-05-22 Thread Girish Nath

Hi

You could try :

http://www.php.net/manual/en/function.serialize.php
http://www.php.net/manual/en/function.unserialize.php

Pass the serialized array in the URL, then unserialize it back when in the
target page.

Regards


Girish
--
www.girishnath.co.uk




John Fishworld [EMAIL PROTECTED] wrote in message
009501c201aa$a077d070$04010a0a@fishworld">news:009501c201aa$a077d070$04010a0a@fishworld...
 Whats the best way to pass on array on in a link ?

 eg
 offset is where we are (what page)
 but state is an array, with a variable size

 href=joblist.php?offset=$offsetstate=$state

 thanks





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




[PHP] Cool PHP Tricks/Features ?

2002-05-14 Thread Girish Nath

Hi

I've been using PHP for about 2 years now but only just discovered
ob_gzhandler and gzip/compressing http output.
It's something i wish i'd found out about earlier because even though it's a
simple concept the result blew me away :)

Anyway, i just wanted to know of any other cool tricks/features that you
guys are using that others could have overlooked.

Thanks


Girish
--
www.girishnath.co.uk




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




Re: [PHP] Cool PHP Tricks/Features ?

2002-05-14 Thread Girish Nath

Hi Steve

http://www.php.net/manual/en/function.ob-gzhandler.php

http://www.devshed.com/Server_Side/PHP/OutputBuffering/page8.html

Basically it allows output to be compressed with gzip encoding as it's sent
to the browser. I had a webpage that was part of an admin section of a
website, it was 153K in size and getting a lot of hits. The result now is
the page gets compressed to 17K and therefore uses less bandwidth/faster to
download, this all happens transparently from the visitors point of view.

Regards


Girish
--
www.girishnath.co.uk



Steve Bradwell [EMAIL PROTECTED] wrote in message
57A1618E7109D311A97D0008C7EBB3A1CBB31E@KITCHENER">news:57A1618E7109D311A97D0008C7EBB3A1CBB31E@KITCHENER...
 HI Girish,
 I'm pretty new to php, using for about 8 months now, I haven't heard of
 these, can you go into some detail for me?

 Thanks,

 Steve

 -Original Message-
 From: Girish Nath [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 14, 2002 9:28 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Cool PHP Tricks/Features ?


 Hi

 I've been using PHP for about 2 years now but only just discovered
 ob_gzhandler and gzip/compressing http output.
 It's something i wish i'd found out about earlier because even though it's
a
 simple concept the result blew me away :)

 Anyway, i just wanted to know of any other cool tricks/features that you
 guys are using that others could have overlooked.

 Thanks


 Girish
 --
 www.girishnath.co.uk




 --
 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] Cool PHP Tricks/Features ?

2002-05-14 Thread Girish Nath

Hi John

You *can* control on a a page-by-page basis as i'm doing now. I have some
pages admin pages that are getting a lot of hits and i'm using the
compression to reduce them from 52K to 7K and 153K to 17K!

The majority of the users are accessing via 56K modem/ISDN so i'm willing to
trade a tiny bit of cpu usage on a lightly loaded machine and save a lot of
bandwidth in the process.

Your customers may have access to T1 lines so won't see the difference,
however my 56K customers noticed the difference without me even telling them
about it.

Regards


Girish



- Original Message -
From: John Holmes [EMAIL PROTECTED]
To: 'SP' [EMAIL PROTECTED]; 'Girish Nath'
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, May 15, 2002 3:18 AM
Subject: RE: [PHP] Cool PHP Tricks/Features ?


Yes, it can be useful. I don't dispute that. All I'm saying is that it's
not the save-all or whatever. Look at how much traffic it's going to
save you, look at how much extra processing power you're taking from
your CPU, look at the connections and computers of your clients, etc.
Maybe it's not that big of a deal, but I just don't want some newbie
seeing this and thinking that it's going to be the answer to all of
their problems. I may even look into it for a couple large pages that I
have. You can control it on a page-by-page basis, right?

---John Holmes...

 -Original Message-
 From: SP [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 14, 2002 9:29 PM
 To: [EMAIL PROTECTED]; 'Girish Nath'; [EMAIL PROTECTED]
 Subject: RE: [PHP] Cool PHP Tricks/Features ?

 Well if his normal page is 100k and he can cut the
 size down to 50k with gzip then instead of having
 a monthly transfer of 100 GB for example, he would
 only be paying for 50 GB.  Seems like it's useful
 for extremely large sites.



 -Original Message-
 From: John Holmes
 [mailto:[EMAIL PROTECTED]]
 Sent: May 14, 2002 6:43 PM
 To: 'Girish Nath'; [EMAIL PROTECTED]
 Subject: RE: [PHP] Cool PHP Tricks/Features ?


 Why do you think this is useful to you? I remember
 reading an article on
 this and its conclusion was that zipping the
 output was only beneficial
 for large data between fast computers over a slow
 pipe. You have to look
 at who your clients are and if it's beneficial to
 have their machine use
 up extra time (processing power) unzipping things
 or not. Also, you're
 using more processing time on your computer having
 to do the zipping for
 every request, too.

 ---John Holmes...

  -Original Message-
  From: Girish Nath
 [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, May 14, 2002 9:28 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Cool PHP Tricks/Features ?
 
  Hi
 
  I've been using PHP for about 2 years now but
 only just discovered
  ob_gzhandler and gzip/compressing http output.
  It's something i wish i'd found out about
 earlier because even though
 it's
  a
  simple concept the result blew me away :)
 
  Anyway, i just wanted to know of any other cool
 tricks/features that
 you
  guys are using that others could have
 overlooked.
 
  Thanks
 
 
  Girish
  --
  www.girishnath.co.uk
 
 
 
 
  --
  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


 ---
 Incoming mail is certified Virus Free.
 Checked by AVG anti-virus system
 (http://www.grisoft.com).
 Version: 6.0.361 / Virus Database: 199 - Release
 Date: 07/05/02

 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system
 (http://www.grisoft.com).
 Version: 6.0.361 / Virus Database: 199 - Release
 Date: 07/05/02





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




Re: [PHP] Fixing the PHP security hole

2002-03-01 Thread Girish Nath

Hi

Unpack and copy the patch diff to the php4.0.6/main source directory, then
use :

patch  rfc1867.c rfc1867.c.diff-4.0.6

then the usual configure, make, make install.

Regards


Girish
--
www.girishnath.co.uk


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, March 01, 2002 11:27 AM
Subject: Re: [PHP] Fixing the PHP security hole


Depends on how you originally installed your PHP. Was it from RPM? Or
source?

Or whatever?


It was the source. Should I just re-install the whole thing?

Regards,
Joseph A. Bannon

--
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] any ideas : Unexpected character

2002-02-14 Thread Girish Nath

Hi

I got this error :

Warning: Unexpected character in input: ' in
/home/altdesign/public_html/php/new admin/do_addauthor.php on line 14

Can you post the section around Line 14 from do_addauthor.php so we can take
a look at it ?

Regards


Girish
--
www.girishnath.co.uk


- Original Message -
From: Will Hives [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 14, 2002 4:34 PM
Subject: [PHP] any ideas : Unexpected character



I have put together this script with the help of some of you kind members
here. It seems to do what I set out for it to do, but when it finished the
upload it comes up with the following error:

Unexpected character

try for yourself: http://www.alt-design.net/php/new%20admin/add.php

I would be very grateful for any ideas.

Cheers
Will



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

2002-02-13 Thread Girish Nath

Hi

Use the str_replace function like this :

$myText = str_replace (\n, , $myText);

This will remove all line breaks from $myText

http://www.php.net/manual/en/function.str-replace.php

Regards


Girish
--
www.girishnath.co.uk




- Original Message - 
From: Roman Duriancik [EMAIL PROTECTED]
To: PHP-General [EMAIL PROTECTED]
Sent: Wednesday, February 13, 2002 11:09 AM
Subject: [PHP] Problem


How to delete from text documents mark  end of line.

Example: In file I have some formatted text document with paragraphs, but i
need convert this document to new document without paragraphs (all text
document in one paragraph).

Thanks for yours help.

roman


-- 
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] Getting days after last login. Date problem

2002-02-13 Thread Girish Nath

Hi

You may be able to convert the member db date to a unix timestamp using
strtotime()

http://www.php.net/manual/en/function.strtotime.php

Then use one of the other functions at :

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

to convert the pictures db date also to unix timestamp, then compare the two
dates as you suggested.


Girish
--
www.girishnath.co.uk



- Original Message -
From: Andy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 13, 2002 11:19 AM
Subject: [PHP] Getting days after last login. Date problem


Hi there,

I would like to find out the changes on content after a members last login.

The format of the date stored in the member db is e.g.:   Feb 13, 2002
The format of e.g pictures uploaded is:
2000-02-13

How can I search for pictures which are uploaded since the members last
login. Is ist possible to convert the memberdate format to the other one and
just search for something like picturedate  logindate?

Thanx for any help

Andy



--
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] Special dll for query strings?

2002-02-12 Thread Girish Nath

Hi

Look at php.ini under the register_globals section for how to access GET
variables now with PHP4.1.x

Regards


Girish
--
www.girishnath.co.uk


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 13, 2002 12:05 AM
Subject: [PHP] Special dll for query strings?


I just reinstalled php to a new path (c:\php). I deleted the php.ini in my
winnt folder and used php:s recomended php.ini (I put that one into my
c\winnt)
renamed to php.ini.

But my problem is that a query-string (./index.php?id=12) dosn't seem to
work.
I cant get access to any $id in my index.php but I think I should? It worked
bout before...

Using w2k; php 4.1.1; phped
/Maglet, Sweden

--
Get your firstname@lastname email at http://Nameplanet.com/?su

--
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] IP - URL

2002-02-11 Thread Girish Nath

Hi

$HTTP_SERVER_VARS[SERVER_ADDR]

?

Girish
--
www.girishnath.co.uk



- Original Message -
From: Balaji Ankem [EMAIL PROTECTED]
To: * RzE: [EMAIL PROTECTED]
Cc: Php-General [EMAIL PROTECTED]
Sent: Monday, February 11, 2002 10:00 AM
Subject: [PHP] IP - URL


No Renze,
what I really want is in the calling php file itself I want to get the IP
address.

Say some test.php..I call this file like

http://10.145.2.23/test.php

I want to get 10.145.2.23 in test.php file itself.

I think parse_url will help me. But I don't know how to pass the current URL
itself to test.php file.


Thanks in advance
-Balaji

-Original Message-
From: * RzE: [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 11, 2002 3:13 PM
To: Balaji Ankem
Subject: IP - URL


Hi there,


I just found out I probably sent you the wrong answer to your
question. What I sent you was how to get the IP-address of the user
of your website. But you want to get the IP-address of some URL? So
you want the IP of a website?
I think it should be something like:

---[php-code]---
if (preg_match (#^([^:]*://){0,1}[^/]+#, $the_url, $matches)) {
  $base_url = $matches[1];
  $the_ip = gethostbyname($base_url);
} else {
  // Oops... no base URL!
}
---[end of php-code]---

I must tell you, though, that I just typed this in this email. I
have never use this, and I haven't tested this. So it might need
some finetuning and stuff. But I guess it's a good start for solving
your problem.

Let me know...

--

* RzE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- 








--
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] Searching class capable of parsing ID3-tags in MP3-files

2002-02-10 Thread Girish Nath

Hi

There is a class that can manipluate version 1 tags here :

http://leknor.com/code/php/view/class.id3.php.txt

and a some beta code for handling version 2 tags here :

http://leknor.com/code/php/view/beta/class.id3v2.php.txt

I don't know if that helps.

Regards


Girish
--
www.girishnath.co.uk


- Original Message - 
From: Stefan Rusterholz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, February 10, 2002 12:02 PM
Subject: [PHP] Searching class capable of parsing ID3-tags in MP3-files


I
I search a class to parse mp3-files' id3 tag. I already found one at 
upperdesign.com but it seems not to be capable of parsing newer versions 
of the id3 tag :(
So does anyone know an already existing class doing that for me?

TIA
Stefan Rusterholz


-- 
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] Unable to get ImageTTFText output

2002-02-05 Thread Girish Nath

Hi

I had similar problems when just specifying the font file in the same
directory eg ./arial.ttf but got it to work okay when i used the full path
eg :

$fontfile = /apache/htdocs/arial.ttf;

ImageTTFText($im, 20, 0, 3, 3, $text_colour, $fontfile, My text);

Regards


Girish
--
www.girishnath.co.uk


- Original Message -
From: Neil Freeman [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Tuesday, February 05, 2002 2:59 PM
Subject: [PHP] Unable to get ImageTTFText output


Hi there,

I am trying to use the ImageTTFText function to output some text onto an
existing image. Problem being though that the text does not get
outputted. I have placed the ttf file 'arial.ttf' within the same
directory as my script. Here is a snippet of my code:

Header(Content-Type: image/png);
$im = ImageCreateFromPNG(original_image.png);

$text_colour = ImageColorAllocate($im, 255, 255, 255);

ImageTTFText($im, 20, 0, 3, 3, $text_colour, /arial.ttf, My
text);

ImagePNG($im);

All this outputs is my original PNG image (with no text). I have used
the following line instead of ImageTTFText and all works well.

ImageString($im, 4, 3, 3, My text, $text_colour);

Using phpinfo() I have checked the GD section and the following is
outputted:

GD Support - enabled
GD Version - 2.0 or higher
FreeType Support - enabled
FreeType Linkage - with freetype
JPG Support - enabled
PNG Support - enabled
WBMP Support - enabled

Does anyone have any suggestions as to why this does not work? Has
anyone else used the ImageTTFText function successfully?

Neil

 Email:  [EMAIL PROTECTED]
 [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] Getting variables from a text file

2002-02-05 Thread Girish Nath

Hi

It looks like a querystring, so read the contents of the file into a variable, then 
use the parse_str() function on that variable, you can specify if you want them to be 
stored in an array too.

http://www.php.net/manual/en/function.parse-str.php

Regards


Girish
--
www.girishnath.co.uk

  - Original Message - 
  From: David Orn Johannsson 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, February 05, 2002 2:50 PM
  Subject: [PHP] Getting variables from a text file


  I have this text file I have to retreve infromation from, in the fallowing format:

  date1=1/1/2002title1=some titleheadline1=some headlinefull1=full 
articledate2=2/1/2002title2=some title and so on

   

  what would be the best thing for me to do to if I was to get the values of all the 
variables of the text file into a php document as variables.

   

  Regards, David

   

  

  Davíð Örn Jóhannssson

  Vefforritari

  

  Atómstöðin hf.

  Garðastræti 37

  101 Reykjavík

  

  sími: 595-3643

  fax: 595-3649

  [EMAIL PROTECTED]

  http://www.atom.is

  



   




Re: [PHP] What can I ask here?

2002-02-05 Thread Girish Nath

Hi

You'll find the mailing list archive an excellent source of info :

http://marc.theaimsgroup.com/?l=php-generalr=1w=2

Regards :)


Girish
--
www.girishnath.co.uk


- Original Message -
From: Scott [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 05, 2002 4:07 PM
Subject: [PHP] What can I ask here?


Just want to make sure I am in the right forum...

I am new to PHP and will be doing alot of coding with it in the near future.

So I will be asking alot of newb questions...

Thanks,

Batch



--
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] stupid URL variable question

2002-02-01 Thread Girish Nath

Hi

Try without quotes :

$table_name = $locale;

Your SQL is probably reading SELECT comp, content FROM $locale instead of
en_na

Regards


Girish



- Original Message -
From: James Hallam [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: Saturday, February 02, 2002 12:42 AM
Subject: [PHP] stupid URL variable question


Can anyone explain why this URL and SQL statement won't work?

A
HREF=test_mediacoverage.php?locale=en_nasec=newssubsec=medianame=infowee
k1Media Coverage Test Page/A

-- And on test_mediacoverage.php ..

$table_name = $locale;

// ..connection content..

$sql = SELECT comp, content FROM $table_name
WHERE sec = '$sec' AND
subsec = '$subsec' AND
name = '$name'
ORDER BY comp
;

$result = @mysql_query($sql,$connection)
or die(Couldn't execute query.);

It's giving me the 'Couldn't execute query' result, but the SQL statement
does work with the values hard-coded in..  So it must be something about the
way the values are passed through the URL.

On a furthur note, is this a good idea?  I'm using the URL to determine what
content goes into the the template..  I'm not using sessions or cookies (no
authentication needed..) so is there a better way to do this?

Thanks,

James


--
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 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] stupid URL variable question

2002-02-01 Thread Girish Nath

Hi

I'm not sure what's causing it then - you can get better error reporting
using by removing the @ sign and using mysql_error() like this :

$result = mysql_query($sql,$connection) or die(mysql_error());

Regards


Girish

- Original Message -
From: James Hallam [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: Saturday, February 02, 2002 1:02 AM
Subject: RE: [PHP] stupid URL variable question


I think that was a necessary step, I had missed that one, but it
unfortunately hasn't solved the problem.  Once again the page works fine if
I hard-code the values, but even if I replace en_na with $locale, it
breaks..

James

-Original Message-
From: Girish Nath [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 01, 2002 5:53 PM
To: James Hallam; Php-General
Subject: Re: [PHP] stupid URL variable question


Hi

Try without quotes :

$table_name = $locale;

Your SQL is probably reading SELECT comp, content FROM $locale instead of
en_na

Regards


Girish



- Original Message -
From: James Hallam [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: Saturday, February 02, 2002 12:42 AM
Subject: [PHP] stupid URL variable question


Can anyone explain why this URL and SQL statement won't work?

A
HREF=test_mediacoverage.php?locale=en_nasec=newssubsec=medianame=infowee
k1Media Coverage Test Page/A

-- And on test_mediacoverage.php ..

$table_name = $locale;

// ..connection content..

$sql = SELECT comp, content FROM $table_name
WHERE sec = '$sec' AND
subsec = '$subsec' AND
name = '$name'
ORDER BY comp
;

$result = @mysql_query($sql,$connection)
or die(Couldn't execute query.);

It's giving me the 'Couldn't execute query' result, but the SQL statement
does work with the values hard-coded in..  So it must be something about the
way the values are passed through the URL.

On a furthur note, is this a good idea?  I'm using the URL to determine what
content goes into the the template..  I'm not using sessions or cookies (no
authentication needed..) so is there a better way to do this?

Thanks,

James


--
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 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 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 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] How do I use a confirm box to confirm before deletion from a database

2002-01-28 Thread Girish Nath

Hi

If you have a delete link then try this :

script language=javascript

function confirmThis(url) {
if (confirm(Are you sure you want to delete ?)) {
window.location = url;
}
}
/script

Then you can generate the delete link dynamically with PHP eg :

a href=javascript:confirmThis('delete.php?id=xxx')Delete!/a

This should pop up a OK/Cancel dialog box type confirmation.

Regards


Girish
--
www.girishnath.co.uk




- Original Message -
From: Ivan Carey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 12:09 PM
Subject: [PHP] How do I use a confirm box to confirm before deletion from a
database


Hello,
Thankyou for your reply.

When a user clicks upon a delete link that deletes a record from a database,
I would like to be able to give them the option to OK or Cancel this action.

I have tried coding the browsers built in confirm box (I can bring up this)
but am unable to combine it with php or a combination of php and a
javascript funtion

Thanks,
Ivan




-- 
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] Basic Password Protection.

2002-01-28 Thread Girish Nath

Hi

Try :

http://www.php.net/manual/en/features.http-auth.php

Check the comments on the page for links to tutorials etc.

Regards :)


Girish
--
www.girishnath.co.uk


- Original Message -
From: Philip J. Newman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 3:49 PM
Subject: [PHP] Basic Password Protection.


Can someone point me to a section in the manual where I can read about basic
Authentication?

Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012



-- 
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] Need a little help

2002-01-28 Thread Girish Nath

Hi

This should send different images to the referer based on what parse_url()
returns:

?php

 $url=parse_url($HTTP_REFERER);
 if ($url[host] == domain.com) {
  $requestImage = images/domain_A.gif;
 }
 else {
  $requestImage = images/domain_B.gif;
 }

 header (Content-Type: image/gif);
 header (Content-Length: . filesize($requestImage));
 header (Content-Disposition: filename= . $requestImage);
 readfile($requestImage);

?

You may need to modify it a bit perhaps with a switch statement for more
flexibilty. Let me know how you get on.

Regards


Girish
--
www.girishnath.co.uk




- Original Message -
From: Brian V Bonini [EMAIL PROTECTED]
To: PHP Lists [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 4:02 PM
Subject: [PHP] Need a little help


I'm trying to redirect based on referring host
and request.

I have an .htaccess set up like this:
RedirectMatch (.*)\.gif$ http://www.domain.com/_borders/test.php
to redirect all requests for .gif's to a php script which then
determines the referring host.

$url=parse_url($HTTP_REFERER);
if ($url[host] == domain.com) {
file://this is where I get stuck
  do something
} else {do some thing}

how to I return the correct image. I.e. if the referring page
has an img src=mydomain.com/image link and I redirect requests for
that image to the php script to determine the host how can I now
return a different image for display into the page. Make sense?
Is it possible?

-Brian

--
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 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] if command

2002-01-28 Thread Girish Nath

Hi

http://www.php.net/manual/en/control-structures.php

for example :

if ($firstname  == Eduardo  $lastname == Melo) {
print (I know you)
}
else {
print (I don't know you);
}

Regards


Girish
--
www.girishnath.co.uk


- Original Message - 
From: Eduardo Melo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 6:30 PM
Subject: [PHP] if command


Someone knows how to use the IF command ?

I need two expressions as such as IF (exp1 AND exp2) ...

thank's

eduardo melo
computer programmer

_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


-- 
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 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] File uploading like hotmail

2002-01-28 Thread Girish Nath

Hi

It's in the manual at :

http://www.php.net/manual/en/features.file-upload.php

Regards


Girish
--
www.girishnath.co.uk


- Original Message - 
From: qartis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 6:37 PM
Subject: Re: [PHP] File uploading like hotmail


I think you might be looking for input type=file HTML form element.


Duky Yuen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I want to make something like when you are attaching something to an
 email in hotmail. I want to make something that searches your own
 computer for files on your harddisk that you want to upload to the
 server.

 But I don't know if this is possible. If this is possible.Can somebody
 tell me which function I should use? Or if someone have an example...
 please...

 Duky




-- 
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 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] File uploading like hotmail

2002-01-28 Thread Girish Nath

Hi

It's in the manual at :

http://www.php.net/manual/en/features.file-upload.php

Regards


Girish
--
www.girishnath.co.uk


- Original Message - 
From: qartis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 6:37 PM
Subject: Re: [PHP] File uploading like hotmail


I think you might be looking for input type=file HTML form element.


Duky Yuen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I want to make something like when you are attaching something to an
 email in hotmail. I want to make something that searches your own
 computer for files on your harddisk that you want to upload to the
 server.

 But I don't know if this is possible. If this is possible.Can somebody
 tell me which function I should use? Or if someone have an example...
 please...

 Duky




-- 
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 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] Need a little help

2002-01-28 Thread Girish Nath

Hi Brian

I've just setup the RedirectMatch in Apache and tried the PHP script
(test.php) out and it worked fine.

The only thing that caused broken image symbols to appear was if the image
redirect script (test.php) created any output before the header() functions.
Check for whitespace or any functions that might be outputting error
messages within test.php

Regards


Girish
--
www.girishnath.co.uk



- Original Message -
From: Brian V Bonini [EMAIL PROTECTED]
To: Girish Nath [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 8:17 PM
Subject: RE: [PHP] Need a little help


hmmm, I think I see where your going but
that either just puts out a lot of garbage
on the screen:

¤X!lø`7-Y± Á\t1h^?(uT3è¡? J2¶'O\Ô'G)ÂGì^
Ì-.téZ-ä(òS¡¹!n3pPßsfÔÓÄVoõ`\Z·Åô2'Ô?;Ur©e8òÞhS??0Ít^%;-,X
âÑ9ºcI%,(CqxpR ¤Ô4ûȶÔ%03. Ì`?ÃåP? r ~éT
ÀÃ^IÀ¦.Zª^:;}ä,ò,XOWýH0PE8´ä,Sx'À^µT÷Src`ÀÏÀrBÀ7í¨òT ÙÑç|+iûJFA?ERKfÙ4
J³Ð²
etc.

or a broken image symbol.

-B

 -Original Message-
 From: Girish Nath [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 28, 2002 11:21 AM
 To: Brian V Bonini
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Need a little help


 Hi

 This should send different images to the referer based on what parse_url()
 returns:

 ?php

  $url=parse_url($HTTP_REFERER);
  if ($url[host] == domain.com) {
   $requestImage = images/domain_A.gif;
  }
  else {
   $requestImage = images/domain_B.gif;
  }

  header (Content-Type: image/gif);
  header (Content-Length: . filesize($requestImage));
  header (Content-Disposition: filename= . $requestImage);
  readfile($requestImage);

 ?

 You may need to modify it a bit perhaps with a switch statement for more
 flexibilty. Let me know how you get on.

 Regards


 Girish
 --
 www.girishnath.co.uk




 - Original Message -
 From: Brian V Bonini [EMAIL PROTECTED]
 To: PHP Lists [EMAIL PROTECTED]
 Sent: Monday, January 28, 2002 4:02 PM
 Subject: [PHP] Need a little help


 I'm trying to redirect based on referring host
 and request.

 I have an .htaccess set up like this:
 RedirectMatch (.*)\.gif$ http://www.domain.com/_borders/test.php
 to redirect all requests for .gif's to a php script which then
 determines the referring host.

 $url=parse_url($HTTP_REFERER);
 if ($url[host] == domain.com) {
 file://this is where I get stuck
   do something
 } else {do some thing}

 how to I return the correct image. I.e. if the referring page
 has an img src=mydomain.com/image link and I redirect requests for
 that image to the php script to determine the host how can I now
 return a different image for display into the page. Make sense?
 Is it possible?

 -Brian

 --
 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 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 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 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] MySQL Newbie

2002-01-28 Thread Girish Nath

Hi

If you haven't got shell access but have a PHP enabled webserver then you
could try and install phpMyAdmin:

http://www.phpwizard.net/projects/phpMyAdmin/

Regards


Girish
--
www.girishnath.co.uk



- Original Message -
From: Ben Clumeck [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 10:49 PM
Subject: [PHP] MySQL Newbie


How do I use MySQL through the web.  I currently have MySQL running on my
personal PC on WinXP.  I use a command prompt to add tables, add records,
and so forth.  How do I create tables and records when my database is on the
web?

Thanks,

Ben


--
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 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] upload permission denied!

2002-01-28 Thread Girish Nath

Hi

For some reason i couldn't get the 777 thing to work on one of my hosts but
managed to get this syntax to work instead :

chmod o=rwx directoryname

***It's not exactly secure but might get the job done ***

Regards


Girish
--
www.girishnath.co.uk


- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 29, 2002 3:55 AM
Subject: Re: [PHP] upload permission denied!


On Tuesday 29 January 2002 11:48, sundogcurt wrote:

 the directory permissions are set to 777 / 0777 any user, any group,
 etc. at least that is how I understand it. if i'm wrong please correct
 me, I do appreciate the help thank you.

If they're set to 777 then anybody can do anything to it which means it
should be OK. The only thing is whether you have set the *correct*
directory?
According to your code, I believe the file will be copied to:

  /home/gruesome/public_html/valeriemacwilliam/includes/content/

Is this correct?


--
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
If you have never been hated by your child, you have never been a parent.
-- Bette Davis
*/

--
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 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] mysql_query() problem

2001-12-17 Thread Girish Nath

Hi

Try the following to find out what's happening :

$result = mysql_query($query,$conn) or die (mysql_error());

Or try echo'ing $result to see what it contains. It should contain something
like this if everything is working fine :

Resource id #2

Regards


Girish

- Original Message -
From: Brian Rue [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 17, 2001 8:33 AM
Subject: [PHP] mysql_query() problem


 Hi,

 I'm getting the error
 Warning: Supplied argument is not a valid MySQL result resource

 from this code:

 function validateUser($username,$password) {
  $conn = connectToMySQL();
  mysql_select_db($db_name,$conn);
  $query=select * from members where username='.$username.' AND
 password='.$password.';
  $result = mysql_query($query,$conn);
  if (mysql_num_rows($result) != 0) { file://*this is the line that returns
the
 error*
return true;
  } else {
return false;
  }
 }

 I've checked that the connection works, and that the query is what it
should
 be, and the query works when I type it into the terminal. Any ideas?

 Thanks,
 Brian Rue



 --
 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 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] Shopping project with quantity discounts

2001-12-08 Thread Girish Nath

Hi

I'm working on a shopping project which involves a complex pricing model
with discounts by product quantity threshold as well as customer specific
discounts.

Has anyone got experience of this or point me in the right direction with
regards to the database layout and theory behind this.

Thanks


Girish


-- 
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] Binary Header

2001-12-07 Thread Girish Nath

Hi

Try sending the following header for .zip files

header (Content-Type: application/x-zip-compressed);

Regards


Girish



- Original Message -
From: Bharath Bhushan Lohray [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, December 07, 2001 9:40 AM
Subject: [PHP] Binary Header


 I would like to know which header is sent when files are downloaded. I
have
 constructed a script which sends binary to the client when he clicks the
 download button (Helpful on servers that do not permit storage of .zip
 files) but the binary is displayed on the browser window. Are there any
 special headers

 -Bharath Bhushan Lohray



 --
 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 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] What does var mean ?

2001-11-22 Thread Girish Nath

Hi

I've been looking at some classes an have come across this notation for
example :

function remove($productid) {
/* this function will remove a given product from the cart */
if (isset($productid)) {
unset($this-items[$productid]);
}
}


What does the  (ampersand) before the variable name mean ?

Thanks


Girish


-- 
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] What does var mean ?

2001-11-22 Thread Girish Nath

Thanks, you guys rock! :)

Girish

- Original Message -
From: Roberto Ramírez [EMAIL PROTECTED]
To: Girish Nath [EMAIL PROTECTED]
Sent: Thursday, November 22, 2001 4:10 PM
Subject: RE: [PHP] What does var mean ?


The use of the  means that its passed by reference.

That its equal to the memory address of where the variable is stored

$variable

its often used to modify the value of a that variable within a function.

for example:

?php

$variable = 3;
echo $variable;
#will print 3

function checkit($x){
$x = 5;
#this will modify the value of $variable.
}

checkit($variable);

echo $variable;
#will print 5
?

PROSSES, Roberto Ramírez.

Tel-Fax. 8115 3197 y 99
Puerto No. 3425 Col. Riberas del Río CP. 67160 Guadalupe, Nuevo León.
México.

Visítanos aquí:http://www.prosses.com
http://www.prosses.com Correo electrónico:  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]



-Mensaje original-
De: Girish Nath [mailto:[EMAIL PROTECTED]]
Enviado el: Jueves, 22 de Noviembre de 2001 09:43 a.m.
Para: [EMAIL PROTECTED]
Asunto: [PHP] What does var mean ?


Hi

I've been looking at some classes an have come across this notation for
example :

function remove($productid) {
/* this function will remove a given product from the cart */
if (isset($productid)) {
unset($this-items[$productid]);
}
}


What does the  (ampersand) before the variable name mean ?

Thanks


Girish


--
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 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 me to win the battle with browser's cache

2001-11-12 Thread Girish Nath

Hi

I've found some code which i put it into this function. I've never got the
meta tag technique to work but this seems to do the trick.

Call noCache() before outputting anything to the page.

function noCache() {
header (Expires: Mon, 26 Jul 1997 05:00:00 GMT);// Date in the past
header (Last-Modified:  . gmdate(D, d M Y H:i:s) .  GMT); // always
modified
header (Cache-Control: no-cache, must-revalidate);  file://HTTP/1.1
header (Pragma: no-cache);  // HTTP/1.0
}

Regards


Girish


- Original Message -
From: Olexandr Vynnychenko [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 12, 2001 1:32 PM
Subject: [PHP] Help me to win the battle with browser's cache


 Hello php-general,

   I have index.php, which has a href=index.php?logoutLog out/a.
   When I click it, I am logged out the site. But I type index.php in
   browser's address bar, press Enter and ... it shows non-logouted
   page. What should I write in php code to tell browser something like
   forget about old page, don't display it, get the newest version?
   Some time ago I tried to do that in several ways and nothing gived
   100% result. And other thing I saw was that Netscape and Explorer
   behave in different ways in such cases. Could someone help me? Maybe
   this topic was discussed before, but still... I appreciate greatly
   any suggestion.

 --
  Olexandr Vynnychenko  mailto:[EMAIL PROTECTED]



 --
 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 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] Database editor

2001-10-05 Thread Girish Nath

Hi

Take a look at phpMyAdmin at :

http://phpwizard.net/projects/phpMyAdmin/

--

phpMyAdmin is intended to handle the adminstration of MySQL over the web.
Currently it can:

- create and drop databases
- create, copy, drop and alter tables
- delete, edit and add fields
- execute any SQL-statement, even batch-queries
- manage keys on fields
- load text files into tables
- create and read dumps of tables
- export data to CSV values
- administer multiple servers and single databases

--

Regards


Girish


- Original Message -
From: -:-Doigy-:- [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 05, 2001 12:34 PM
Subject: [PHP] Database editor


 Hi Folks,

 I'm after a quick and easy way to edit tables in a mySQL database, much
like
 you would in ms excel.  I'm thinking I'll do it with forms...

 Is there a non-commerical solution in existance already?

 Cheers,

 Steve



 --
 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 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] Problem installing GD on windows

2001-09-19 Thread Girish Nath

hi

copy the php_gd.dll  into the extentions sub-directory where you installed
php (you should already have a load of other .dlls in there too)

change the extension_dir in php.ini to point to that sub-directory.

for example :
extension_dir = D:\Apache\php4\extensions\

that should do it.

regards


girish

- Original Message -
From: Neil Freeman [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Wednesday, September 19, 2001 10:21 AM
Subject: [PHP] Problem installing GD on windows


 Hi there,

 I have downloaded the windows version of GD (php_gd.dll) as I wish to
 use it's various image functions. I have edited my PHP.INI file in
 C:\WINNT and uncommented the line:

 extension=php_gd.dll

 Where is a suitable location for this .dll file? And what should I set
 this PHP.INI line to?

 extension_dir = ./

 Any help would be greatly appreciated.

 Neil
 
  Email:  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
 



 --
 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 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] Problem installing GD on windows

2001-09-19 Thread Girish Nath

Hi

I've never seen an install that has only those two directories :) Anyway,
try doing a search on your machine for files that match php_*.dll .It might
help you track down where all the extensions have been installed.

Regards


Girish

- Original Message -
From: Neil Freeman [EMAIL PROTECTED]
To: Girish Nath [EMAIL PROTECTED]
Cc: PHP General [EMAIL PROTECTED]
Sent: Wednesday, September 19, 2001 12:29 PM
Subject: Re: [PHP] Problem installing GD on windows


 Hi Girish,

 I installed PHP within D:\PHP. This folder currently has two
sub-directories
 'sessiondata' and 'uploadtemp'. There does not appear to be an extensions
 sub-directory with a load of other dlls in there too. Anyway I created
an
 'extensions' sub-directory and placed the php_gd.dll into it. I changed
the
 php.ini extension_dir line to point to this directory:

 ie:
 extension_dir = D:\PHP\extensions\

 But the problem still occurs, only now the second alert box reads:
 Unable to load dynamic library 'D:\PHP\extensions\php_gd.dll' - The
specified
 procedure could not be found

 Any ideas?

 Neil

 Girish Nath wrote:

  hi
 
  copy the php_gd.dll  into the extentions sub-directory where you
installed
  php (you should already have a load of other .dlls in there too)
 
  change the extension_dir in php.ini to point to that sub-directory.
 
  for example :
  extension_dir = D:\Apache\php4\extensions\
 
  that should do it.
 
  regards
 
  girish
 
  - Original Message -
  From: Neil Freeman [EMAIL PROTECTED]
  To: PHP General [EMAIL PROTECTED]
  Sent: Wednesday, September 19, 2001 10:21 AM
  Subject: [PHP] Problem installing GD on windows
 
   Hi there,
  
   I have downloaded the windows version of GD (php_gd.dll) as I wish to
   use it's various image functions. I have edited my PHP.INI file in
   C:\WINNT and uncommented the line:
  
   extension=php_gd.dll
  
   Where is a suitable location for this .dll file? And what should I set
   this PHP.INI line to?
  
   extension_dir = ./
  
   Any help would be greatly appreciated.
  
   Neil
   
Email:  [EMAIL PROTECTED]
[EMAIL PROTECTED]
   
  
  
  
   --
   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 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]
 
  ***
   This message was virus checked with: SAVI 3.49
   last updated 19th September 2001
  ***

 --
 
  Email:  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
 



 --
 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 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] Combining strings?

2001-09-19 Thread Girish Nath

Hi

$newstring = $date . / . $month;


Girish

- Original Message -
From: Daniel Alsén [EMAIL PROTECTED]
To: php [EMAIL PROTECTED]
Sent: Wednesday, September 19, 2001 12:54 PM
Subject: [PHP] Combining strings?


 Hi,

 i was trying to figure this out myself. But since the php-manual is
down...

 I want to create a string with todays date and month in the format
day/month
 (19/9).

 If i do:

 $date_time_array = getdate (time());
 $date = $date_time_array[ mday];
 $month = $date_time_array[ mon];

 I get the day and month in numbers. But how do i join $date and $month and
 put a / in between them in a new string?

 Regards
 # Daniel Alsén| www.mindbash.com #
 # [EMAIL PROTECTED]  | +46 704 86 14 92 #
 # ICQ: 63006462   |  #


 --
 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 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] Problem installing GD on windows

2001-09-19 Thread Girish Nath

Hi

I'm sure the full everything-and-the-kitchen-sink package will sort out
the problem :)

Regards


Girish


- Original Message -
From: Neil Freeman [EMAIL PROTECTED]
To: Girish Nath [EMAIL PROTECTED]
Cc: PHP General [EMAIL PROTECTED]
Sent: Wednesday, September 19, 2001 1:14 PM
Subject: Re: [PHP] Problem installing GD on windows


 Light bulb appears, maybe. I have been using the 755kb PHP program which
 according to php.net doesn't include external extensions. Are you by any
chance
 using the 4Mb complete package of PHP as this could well be where my
problem
 lies. I will try and download this package in the meantime and let you
know.

 Neil

 Girish Nath wrote:

  Hi
 
  I've never seen an install that has only those two directories :)
Anyway,
  try doing a search on your machine for files that match php_*.dll .It
might
  help you track down where all the extensions have been installed.
 
  Regards
 
  Girish
 
  - Original Message -
  From: Neil Freeman ?[EMAIL PROTECTED]?
  To: Girish Nath ?[EMAIL PROTECTED]?
  Cc: PHP General ?[EMAIL PROTECTED]?
  Sent: Wednesday, September 19, 2001 12:29 PM
  Subject: Re: [PHP] Problem installing GD on windows
 
  ? Hi Girish,
  ?
  ? I installed PHP within D:\PHP. This folder currently has two
  sub-directories
  ? 'sessiondata' and 'uploadtemp'. There does not appear to be an
extensions
  ? sub-directory with a load of other dlls in there too. Anyway I
created
  an
  ? 'extensions' sub-directory and placed the php_gd.dll into it. I
changed
  the
  ? php.ini extension_dir line to point to this directory:
  ?
  ? ie:
  ? extension_dir = D:\PHP\extensions\
  ?
  ? But the problem still occurs, only now the second alert box reads:
  ? Unable to load dynamic library 'D:\PHP\extensions\php_gd.dll' - The
  specified
  ? procedure could not be found
  ?
  ? Any ideas?
  ?
  ? Neil
  ?
  ? Girish Nath wrote:
  ?
  ? ? hi
  ? ?
  ? ? copy the php_gd.dll  into the extentions sub-directory where you
  installed
  ? ? php (you should already have a load of other .dlls in there too)
  ? ?
  ? ? change the extension_dir in php.ini to point to that sub-directory.
  ? ?
  ? ? for example :
  ? ? extension_dir = D:\Apache\php4\extensions\
  ? ?
  ? ? that should do it.
  ? ?
  ? ? regards
  ? ?
  ? ? girish
  ? ?
  ? ? - Original Message -
  ? ? From: Neil Freeman ?[EMAIL PROTECTED]?
  ? ? To: PHP General ?[EMAIL PROTECTED]?
  ? ? Sent: Wednesday, September 19, 2001 10:21 AM
  ? ? Subject: [PHP] Problem installing GD on windows
  ? ?
  ? ? ? Hi there,
  ? ? ?
  ? ? ? I have downloaded the windows version of GD (php_gd.dll) as I wish
to
  ? ? ? use it's various image functions. I have edited my PHP.INI file in
  ? ? ? C:\WINNT and uncommented the line:
  ? ? ?
  ? ? ? extension=php_gd.dll
  ? ? ?
  ? ? ? Where is a suitable location for this .dll file? And what should I
set
  ? ? ? this PHP.INI line to?
  ? ? ?
  ? ? ? extension_dir = ./
  ? ? ?
  ? ? ? Any help would be greatly appreciated.
  ? ? ?
  ? ? ? Neil
  ? ? ? 
  ? ? ?  Email:  [EMAIL PROTECTED]
  ? ? ?  [EMAIL PROTECTED]
  ? ? ? 
  ? ? ?
  ? ? ?
  ? ? ?
  ? ? ? --
  ? ? ? 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 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]
  ? ?
  ? ? ***
  ? ?  This message was virus checked with: SAVI 3.49
  ? ?  last updated 19th September 2001
  ? ? ***
  ?
  ? --
  ? 
  ?  Email:  [EMAIL PROTECTED]
  ?  [EMAIL PROTECTED]
  ? 
  ?
  ?
  ?
  ? --
  ? 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 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]

 --
 
  Email:  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
 



 --
 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 General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e

Re: [PHP] Quick mail function help.... please!!!

2001-09-17 Thread Girish Nath

Hi


mail([EMAIL PROTECTED], My Subject, My Message, From:
[EMAIL PROTECTED]\nReply-To: [EMAIL PROTECTED]\nX-Mailer: PHP/ .
phpversion());


Regards


Girish



- Original Message -
From: Kyle Smith [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 18, 2001 1:04 AM
Subject: Re: [PHP] Quick mail function help please!!!


 please someone please! ive been through the manual and i dont know
anywhere
 else to look so someone please gimme a kick in the right direction?


 -lk6-
 http://www.StupeedStudios.f2s.com
 Home of the burning lego man!

 ICQ: 115852509
 MSN: [EMAIL PROTECTED]
 AIM: legokiller666


 - Original Message -
 From: Kyle Smith [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, September 16, 2001 9:09 PM
 Subject: [PHP] Quick mail function help please!!!


 Can someone please show me how to change the reply address in the mail
 function (and the from address) cause i have a script im making for a
 mailing list and the script in the manual doesnt work cause it has loads
of
 different code aswell :(


 -lk6-
 http://www.StupeedStudios.f2s.com
 Home of the burning lego man!

 ICQ: 115852509
 MSN: [EMAIL PROTECTED]
 AIM: legokiller666




 --
 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 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] Quick mail function help.... please!!!

2001-09-17 Thread Girish Nath

Hi

It works fine, i've been using it for ages.

The manual says :
bool mail (string to, string subject, string message [, string
additional_headers])

The newline thing is present in the [additional_headers] section so you can
set optional headers. The final optional headers then look like this :


From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
X-Mailer: PHP/3.0.17


What error are you getting exactly ? Are you sure [mail function] section in
php.ini is setup correctly ?

Regards



Girish



- Original Message -
From: Kyle Smith [EMAIL PROTECTED]
To: Girish Nath [EMAIL PROTECTED]
Sent: Tuesday, September 18, 2001 1:30 AM
Subject: Re: [PHP] Quick mail function help please!!!


 i got that from the manual but im not sure that it actually works!

 the thing is, why is there a new line thing where it says reply to??


 -lk6-
 http://www.StupeedStudios.f2s.com
 Home of the burning lego man!

 ICQ: 115852509
 MSN: [EMAIL PROTECTED]
 AIM: legokiller666


 - Original Message -
 From: Girish Nath [EMAIL PROTECTED]
 To: Kyle Smith [EMAIL PROTECTED]
 Sent: Monday, September 17, 2001 9:28 AM
 Subject: Re: [PHP] Quick mail function help please!!!


  Hi
 
 
  mail([EMAIL PROTECTED], My Subject, My Message, From:
  [EMAIL PROTECTED]\nReply-To: [EMAIL PROTECTED]\nX-Mailer: PHP/ .
  phpversion());
 
 
  Is that what your after ?
 
  Regards
 
 
  Girish
 
  - Original Message -
  From: Kyle Smith [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, September 18, 2001 1:04 AM
  Subject: Re: [PHP] Quick mail function help please!!!
 
 
   please someone please! ive been through the manual and i dont know
  anywhere
   else to look so someone please gimme a kick in the right direction?
  
  
   -lk6-
   http://www.StupeedStudios.f2s.com
   Home of the burning lego man!
  
   ICQ: 115852509
   MSN: [EMAIL PROTECTED]
   AIM: legokiller666
  
  
   - Original Message -
   From: Kyle Smith [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Sunday, September 16, 2001 9:09 PM
   Subject: [PHP] Quick mail function help please!!!
  
  
   Can someone please show me how to change the reply address in the mail
   function (and the from address) cause i have a script im making for a
   mailing list and the script in the manual doesnt work cause it has
loads
  of
   different code aswell :(
  
  
   -lk6-
   http://www.StupeedStudios.f2s.com
   Home of the burning lego man!
  
   ICQ: 115852509
   MSN: [EMAIL PROTECTED]
   AIM: legokiller666
  
  
  
  
   --
   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 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] XML Next 25 Results

2001-08-07 Thread Girish Nath

Hi Gerry

The XML isn't coming directly from a database, it's coming from an IIS
server that i query (i generate XML file containing the parameters of the
query, POST it to the IIS machine, it runs some .ASP to query an inhouse
database, then POST the XML results back to me)

I then parse the XML to generate a HTML table, however sometimes i may end
up with a massive table, and i'm trying to find a way to break that table
into pages of 25 results. However, i'm completely stumped how to do this :(

Regards


Girish

--

 function fetchXML($parameters, $request) {

 $appserverIP = 123.456.789.10;
 $appserverPort = 8080;
 $appserverPacketSize = 4096;
 $phpServer = aeris;

  $header .= POST /directory/ . $request .  HTTP/1.1\r\n;
  $header .= Host:  . $phpServer . \r\n;
  $header .= User-Agent: PHP\r\n;
  $header .= Content-type: application/x-www-form-urlencoded\r\n;
  $header .= Content-length:  . strlen($parameters).\r\n;
  $header .= Connection: close\r\n\r\n;

  $fp = fsockopen($appserverIP,$appserverPort);

   if ($fp) {
   fputs($fp, $header . $parameters);

   while (!feof($fp)) {
   $response .= fgets($fp,$appserverPacketSize);
   }

   fclose($fp);
   }

  return cleanXML($response);// custom function to strip HTTP
headers from fetched data.

 }





- Original Message -
From: Gerry Kirk [EMAIL PROTECTED]
To: Girish Nath [EMAIL PROTECTED]
Sent: Tuesday, August 07, 2001 5:22 AM
Subject: Re: [PHP] XML Next 25 Results


Hello Girish,

I can't help you with your problem, as I am just getting acquainted with
XML myself. I've been doing some research to assess the feasibility of
using PHP and XML for a web-based database-driven application.

If you don't mind, could you share with me how you are using XML? Are you
retrieving / querying / storing data from a database?

Thanks,
Gerry Kirk



-- 
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] Re: Any good gif/jpg processing tool for PHP??

2001-08-07 Thread Girish Nath

Hi

I've used ImageMagick in the past(it runs on NT and Linux), I found it gives
higher quality results than the builtin functions especially when resizing
jpegs.

http://www.imagemagick.org


Girish


- Original Message -
From: Gaylen Fraley [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 07, 2001 4:43 AM
Subject: [PHP] Re: Any good gif/jpg processing tool for PHP??


PHP does exactly that.  Look in the manual for the Image functions.

--

Diego Fulgueira Pastor [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I am sure many of you have had this same problem. I want all uploaded
images
 to my site (gifs and jpg)  to be resized on the fly so that all have the
 same width and height. Does anyone knows about a tool (free, if possible)
 that can do this under Win2k, IIS 5.0 and that can be used with PHP 4.0?
A
 php extension (dll) would be great. If it works only for one format (gif
or
 jpg) is fine.
 Thanks in advance for any tip.

 Cheers, Diego.





--
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 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] XML Next 25 Results

2001-08-07 Thread Girish Nath

Hi

I'd thought of specifying the limit in the request but unfortunately that
option isn't available to me :(

I've just downloaded an xpath class from phpxml.org, looks really kewl, and
i hope it can allow me to do this.

Thanks



Girish


- Original Message -
From: Gerry Kirk [EMAIL PROTECTED]
To: Girish Nath [EMAIL PROTECTED]
Sent: Tuesday, August 07, 2001 8:19 AM
Subject: Re: [PHP] XML Next 25 Results


I think the best approach would be if you could specify in your query the
number of rows you want and the starting row number. In MySQL, you can do
that with LIMIT(row_num, #_rows).

Otherwise, it may be possible to use an XPath function that matches against
the current index of a particular XML element. Are you using XSLT at all?

Gerry

At 07:37 AM 07/08/01 +0100, you wrote:
Hi Gerry

The XML isn't coming directly from a database, it's coming from an IIS
server that i query (i generate XML file containing the parameters of the
query, POST it to the IIS machine, it runs some .ASP to query an inhouse
database, then POST the XML results back to me)

I then parse the XML to generate a HTML table, however sometimes i may end
up with a massive table, and i'm trying to find a way to break that table
into pages of 25 results. However, i'm completely stumped how to do this :(

Regards


Girish

--

  function fetchXML($parameters, $request) {

  $appserverIP = 123.456.789.10;
  $appserverPort = 8080;
  $appserverPacketSize = 4096;
  $phpServer = aeris;

   $header .= POST /directory/ . $request .  HTTP/1.1\r\n;
   $header .= Host:  . $phpServer . \r\n;
   $header .= User-Agent: PHP\r\n;
   $header .= Content-type: application/x-www-form-urlencoded\r\n;
   $header .= Content-length:  . strlen($parameters).\r\n;
   $header .= Connection: close\r\n\r\n;

   $fp = fsockopen($appserverIP,$appserverPort);

if ($fp) {
fputs($fp, $header . $parameters);

while (!feof($fp)) {
$response .= fgets($fp,$appserverPacketSize);
}

fclose($fp);
}

   return cleanXML($response);// custom function to strip HTTP
headers from fetched data.

  }





- Original Message -
From: Gerry Kirk [EMAIL PROTECTED]
To: Girish Nath [EMAIL PROTECTED]
Sent: Tuesday, August 07, 2001 5:22 AM
Subject: Re: [PHP] XML Next 25 Results


Hello Girish,

I can't help you with your problem, as I am just getting acquainted with
XML myself. I've been doing some research to assess the feasibility of
using PHP and XML for a web-based database-driven application.

If you don't mind, could you share with me how you are using XML? Are you
retrieving / querying / storing data from a database?

Thanks,
Gerry Kirk



--
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 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] Re: Any good gif/jpg processing tool for PHP??

2001-08-07 Thread Girish Nath

Hi

I've used ImageMagick to resize images from 1152*768 pixels down to 640*480
pixels. It runs very quickly, you can also try it from the command line to
see what you think of the performance. Also, it comes with some support
programs that allow filters such as gamma correction etc. It seems to
anti-alias images better than GD when resizing too.

It's cool :)


Girish

- Original Message -
From: Jon Yaggie [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 07, 2001 8:03 AM
Subject: Re: [PHP] Re: Any good gif/jpg processing tool for PHP??


how do you feel about the speed of imagemagick?  fastwr? slower than gd
functions?


- Original Message -
From: Girish Nath [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 07, 2001 1:56 PM
Subject: Re: [PHP] Re: Any good gif/jpg processing tool for PHP??


 Hi

 I've used ImageMagick in the past(it runs on NT and Linux), I found it
gives
 higher quality results than the builtin functions especially when resizing
 jpegs.

 http://www.imagemagick.org


 Girish


 - Original Message -
 From: Gaylen Fraley [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, August 07, 2001 4:43 AM
 Subject: [PHP] Re: Any good gif/jpg processing tool for PHP??


 PHP does exactly that.  Look in the manual for the Image functions.

 --

 Diego Fulgueira Pastor [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I am sure many of you have had this same problem. I want all uploaded
 images
  to my site (gifs and jpg)  to be resized on the fly so that all have
the
  same width and height. Does anyone knows about a tool (free, if
possible)
  that can do this under Win2k, IIS 5.0 and that can be used with PHP 4.0?
 A
  php extension (dll) would be great. If it works only for one format (gif
 or
  jpg) is fine.
  Thanks in advance for any tip.
 
  Cheers, Diego.
 
 



 --
 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 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 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 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] XML/XPath Position() Syntax

2001-08-07 Thread Girish Nath

Hi

Thanks, the and didn't work, however a | did the business :)

product[position()  25 | position()  50 ]

Maybe there;s smth up with the class i'm using (www.phpxml.org)


Gish



- Original Message -
From: Gyozo Papp [EMAIL PROTECTED]
To: Girish Nath [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, August 07, 2001 11:39 PM
Subject: Re: [PHP] XML/XPath Position() Syntax


file://product[position()  25 and position()  50 ]


- Original Message -
From: Girish Nath [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 2001. augusztus 8. 00:15
Subject: [PHP] XML/XPath Position() Syntax


 Hi

 I'm trying to select XML nodes 25 to 50 using the position() function in
the
 XPath class. I can select greater or less than but can't figure out a
 between. Anyone have the correct syntax for this ?

 eg file://product[position() 25]


 Thanks


 Gish



 --
 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 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] XML Next 25 Results

2001-08-06 Thread Girish Nath

Hi

I have a script which receives and processes XML product information and
displays it as a table in html.
However, sometimes the html table can contain over 200 rows.

Does anyone know of any xml parse examples which limit the output and
possibly make a Display Next 25 results link at the base of the table ?

Thank you


Gish


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