Re: [PHP] Referer checking is able to be referer spoofed

2005-03-25 Thread Dan Rossi
On 20/03/2005, at 5:40 AM, Marek Kilimajer wrote: If you need only hotlink protection then the current referer checking is just enough. Most users will not install referer spoofing software. But if you need to be 100% sure the videos are streamed through affiliate server, you can use tokens - a

[PHP] Test Send

2005-03-25 Thread Juan Pablo Herrera
I can't send email. Right? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Ending PHP

2005-03-25 Thread Matthew Fonda
you could use die() or exit() they both take an optional parameter of a string to display when called. On Fri, 2005-03-25 at 20:12, Marquez Design wrote: > I have an if statement, and if it is true, I want PHP not to continue. > > How do I do this? > > The following statement is true > > If ($a

[PHP] Re: Ending PHP

2005-03-25 Thread Gerhard Pfeiffer
* Marquez Design <[EMAIL PROTECTED]>: > I have an if statement, and if it is true, I want PHP not to continue. > > How do I do this? if ($a == $b) { exit(); } http://de3.php.net/exit > The following statement is true > > If ($a = $b){ btw: Most of the times you will want to user == in a

[PHP] Ending PHP

2005-03-25 Thread Marquez Design
I have an if statement, and if it is true, I want PHP not to continue. How do I do this? The following statement is true If ($a = $b){ This } Do not continue to the next piece of code, if false, continue to the next piece of code. Thanks for any help. -- Steve Marquez [EMAIL PROTECTED] --

RE: [PHP] create multiple jpg thumbnails and use in a page

2005-03-25 Thread Mike
Here's how I'd go about that - 1) create two pages a) the page that is displaying the images b) the script that generates the thumbnails 2) 'a' is simple - it just reads the directory and creates the HTML to image_thumbnail.php?image=image.jpg 3) 'b' is passed 'image.jpg', reads the file,

[PHP] Re: html image

2005-03-25 Thread Matthew Fonda
Hello, I cannot think of anyway you could do this natively in PHP without using some kind of exterior library. You could always write a PHP extension to render HTML, then create a snapshot from that, but that would be a lot of work. I was searching around and found this, http://www.babysimon.co.uk

[PHP] create multiple jpg thumbnails and use in a page

2005-03-25 Thread Kevin Coyner
Is there a way to create multiple jpg thumbnails from a series of larger originals and use all of the on-the-fly generated thumbnails in a page (without saving any of the thumbnails to the filesystem)? For example, I've got 5 full size jpg's in a directory, and I'd like to list them on a page in

Re: [PHP] following php development

2005-03-25 Thread Matthew Fonda
Aaron Wormus writes an article called the PHPBarnstormer which contains a weekly summary of what is going on in PHP and in the mailing lists, you might check it out. http://phpbarnstormer.com On Fri, 2005-03-25 at 13:49, mbneto wrote: > hi, > > I used to visit zend.com for the weekly summary bu

Re: [PHP] reg expressions

2005-03-25 Thread Matthew Fonda
I wouldnt recommend using a regular expression for this. Regular expressions most of the time are now the answer. You could just do something like: foreach ($line as file('/home/virtual/')) { if (substr(trim($line), 0, 1) == '#') { //$line is a comment } else {

Re: [PHP] following php development

2005-03-25 Thread Philip Olson
> I used to visit zend.com for the weekly summary but it seems that it > has not been updated in a while. > > Besides the php-devel is there any other source of information about > php's development ? While not about PHP Internals specifically, the following do touch up on it and other PHP happ

Fw: [PHP] Problem with arrays

2005-03-25 Thread Jeff Schmidt
I sent this to the original user, but forgot to CC it to the list. I'm just sending this now, for completeness. - Original Message - From: "Jeff Schmidt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 25, 2005 5:10 PM Subject: Re: [PHP] Problem with arrays Hello there.

Re: [PHP] Problem with header in an if SOLVED

2005-03-25 Thread Jochem Maas
Jay Blanchard wrote: [snip] /* check for errors */ $arrCheckItems = array( 'Name', 'Dept', 'Level', ); /* check for blanks */ foreach($_POST AS $key=>$value){ if(in_array(niceName($key), $arrCheckItems)){ $errorsReported[] = notBlank($key, $value); } } Even if the return from notBlank is

[PHP] following php development

2005-03-25 Thread mbneto
hi, I used to visit zend.com for the weekly summary but it seems that it has not been updated in a while. Besides the php-devel is there any other source of information about php's development ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.p

RE: [PHP] reg expressions

2005-03-25 Thread Chris W. Parker
Steve Buehler on Friday, March 25, 2005 11:50 AM said: > It would also be fine to just do a loop that checks each line. > Since I guess that would be quicker. If the line starts with > a #, then ignore it, otherwise, do some other stuff. Yeah do this. You don't nee

Re: [PHP] redirection, same host, two domains

2005-03-25 Thread Leif Gregory
Hello Alexandru, Friday, March 25, 2005, 9:36:12 AM, you wrote: AM> Okay, here is my problem. I had a site hosted on a sub domain AM> (mysite.domain.com) , now I registered my own domain, mysite.com . AM> The thing is mysite.com is still hosted on mysite.domain.com. What AM> i want to do is : If p

Re: [PHP] header already sent problem

2005-03-25 Thread Chris Shiflett
AndreaD wrote: It's not a header it is a setcookie setcookie() is just a function that makes setting cookies a bit more convenient. It's still setting a header called Set-Cookie. In fact, you can manually set cookies: header('Set-Cookie: foo=bar'); how do I arrange the code so the cookies are se

Re: [PHP] reg expressions

2005-03-25 Thread Steve Buehler
At 01:50 PM 3/25/2005, you wrote: Ok. I am really bad at regular expressions. I have to search through some files and put the contents into an array. A file could look like this: $aliases=`cat /home/virtual/site$site_id/fst/etc/mail/local-host-names`; start of file # local-host-names -

[PHP] setlocale and pt_BR problem on debian

2005-03-25 Thread Jonis Maurin Ceará
Hi I'm trying to use setlocale to setup my language to pt_BR for ue with strftime but don't work. I've tryied: pt_BR pt_BR.ISO_8859-1 portuguese.br etc... but don't work, i just get in english. What's wrong? :( My system: OS: Debian Sarge Apache 2 PHP 4.3.10-9 My simple code: setlocale(LC_ALL, "p

[PHP] reg expressions

2005-03-25 Thread Steve Buehler
Ok. I am really bad at regular expressions. I have to search through some files and put the contents into an array. A file could look like this: $aliases=`cat /home/virtual/site$site_id/fst/etc/mail/local-host-names`; start of file # local-host-names - include all aliases for your machi

Re: [PHP] header already sent problem

2005-03-25 Thread AndreaD
It's not a header it is a setcookie, how do I arrange the code so the cookies are set before the header is set? At what point in the HTML are the headers sent. R. "Ken" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Fri, 25 Mar 2005 15:03:45 -, AndreaD > <[EMAIL PROTECTED

Re: [PHP] html image

2005-03-25 Thread Joe Harman
check out http://www.whois.sc they do exactley what you are talking about. i don't think you can make PHP do this.. there maybe someway to do it with imagemagik but i am not even sure about that also... here is a free ware program that does it.. but you have to do it manually http://www.s

[PHP] Re: mySQL outputting XML

2005-03-25 Thread C Drozdowski
There is a pear package that does this: XML_sql2xml. It's at: http://pear.php.net/package-info.php?pacid=18 There is more info at: http://php.chregu.tv/sql2xml/ It's pretty flexible. But not so complicated that you cannot read through the code to figure out what's going on. -- PHP General Mailing

[PHP] PHP4 and PHP5 in virtual Host

2005-03-25 Thread Juan Pablo Herrera
Hi! I have apache, php4 and php5 on my server. I use virtual host in this server. The virtual host have or not PHP4 using: php_admin_flag engine off/on in apache2.conf How can i use PHP5 or PHP4 or both? PHP4 is running as module and PHP5 is running as cgi. Regards, JP -- PHP General Mailing Lis

[PHP] auto appending .php extension

2005-03-25 Thread Evert | Rooftop Solutions
Hi Folks, I'm using PHP 4.3.10, the Zend Optimizer and Apache 1.3.33. Somehow, if I want to open for example /dikkerapper.php, it is also possible to access it through /dikkerapper (without the .php extension) I haven't seen this before, but when I checked it also occurs on my other servers. The

Re: [PHP] html image

2005-03-25 Thread Dotan Cohen
On Thu, 24 Mar 2005 20:48:50 +0200, delos <[EMAIL PROTECTED]> wrote: > i would like to produce a script that can make an image ("screenshot") > based only on the site url. so that i enter an URL and php makes the > picture. > > can such a thing be done by php? if not, maybe by some other language?

[PHP] header already sent problem

2005-03-25 Thread Ken
On Fri, 25 Mar 2005 15:03:45 -, AndreaD <[EMAIL PROTECTED]> wrote: > is there an alternative way to suppress the headers already sent problem? > Ob_start/flush is not very neat way to so this. > > AD > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php

Re: [PHP] redirection, same host, two domains

2005-03-25 Thread Ken
On Fri, 25 Mar 2005 11:42:15 -0500, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Friday 25 March 2005 11:36, Alexandru Martin wrote: > > Okay, here is my problem. I had a site hosted on a sub domain > > (mysite.domain.com) , now I registered my own domain, mysite.com . The > > thing is mys

RE: [PHP] Problem with arrays

2005-03-25 Thread Jay Blanchard
[snip] Note that $value from position[pos][$value] is different in all 3 fields. For each element of the array i want to update the value in the database. For example, for each value of the position[pos][$value] i want to update the database with the specific number. Something like this: $

[PHP] Problem with arrays

2005-03-25 Thread virtualsoftware
Hi, I have a form like this: Note that $value from position[pos][$value] is different in all 3 fields. For each element of the array i want to update the value in the database. For example, for each value of the position[pos][$value] i want to update the database with the specific number.

Re: [PHP] Getting the process ID

2005-03-25 Thread trlists
On 25 Mar 2005 Joshua Beall wrote: > P1: "Does token.status = 'locked' WHERE key=$key ?" > P2: "Does token.status = 'locked' WHERE key=$key ?" > P1: {Receives negative response} > P2: {Receives negative response} > P1: Updates token.status. = 'locked' WHERE key=$key > P2: Updates token.status. = '

RE: [PHP] Problem with header in an if SOLVED

2005-03-25 Thread Jay Blanchard
[snip] /* check for errors */ $arrCheckItems = array( 'Name', 'Dept', 'Level', ); /* check for blanks */ foreach($_POST AS $key=>$value){ if(in_array(niceName($key), $arrCheckItems)){ $errorsReported[] = notBlank($key, $value); } } Even if

Re: [PHP] redirection, same host, two domains

2005-03-25 Thread maillists
On Friday 25 March 2005 11:36, Alexandru Martin wrote: > Okay, here is my problem. I had a site hosted on a sub domain > (mysite.domain.com) , now I registered my own domain, mysite.com . The > thing is mysite.com is still hosted on mysite.domain.com. What i want to > do is : If people type in

[PHP] redirection, same host, two domains

2005-03-25 Thread Alexandru Martin
Okay, here is my problem. I had a site hosted on a sub domain (mysite.domain.com) , now I registered my own domain, mysite.com . The thing is mysite.com is still hosted on mysite.domain.com. What i want to do is : If people type in their browsers mysite.domain.com redirect to mysite.com and

Re: [PHP] header("Location: page.php target=_parent")?????

2005-03-25 Thread Josh Whiting
> How should I formulate the header function to replace the current frameset > page with a new one? I have tried a combination of header("Location: > page.php target=_parent"); but I get an error message saying the page does > not exist. > > Also, can I save a frameset page with a .php extensio

Re: [PHP] Meta HTTP refresh problem

2005-03-25 Thread Josh Whiting
> Recently, during a rewrite of my login page, the Meta Refresh I am using > suddenly stopped working. I've tried using it by echoing it with php and > by just using it in HTML. I've also tried using a javascript redirect > with no luck either. Any thoughts on how to debug and what might be > h

[PHP] Re: Re: Getting the process ID

2005-03-25 Thread Joshua Beall
> But a double-submit is likely to come from separate Apache processes, so > I don't see where the pid comes into the picture. If I reload a page and > resend the post data, that POST request is going to be processed a second > time most likely by a different httpd process. What you need to

[PHP] modules

2005-03-25 Thread Cima
hi, im building a web site and i have seen some sites built using modules to facilitate further maintainance. by modules im referring to having a module for administrating the web site , another for searchs to be done, another for reports to be generated ect. i hope im explaining my self. wha

[PHP] Array problem

2005-03-25 Thread virtualsoftware
Hi, I have a form like this: For each element of the array i want to update the value in the database. For example, for position[pos][value 1] i want to update the value (number 1) in the database. Thanks in advance for your help!!!

RE: [PHP] Problem with header in an if

2005-03-25 Thread Jay Blanchard
[snip] > /* send the errors to the interface and exit*/ > if('' !== $errorsReported){ > for($i = 0; $i < count($errorsReported); $i++){ > echo $errorsReported[$i]; > } unset($errorsReported); print_r($erro

[PHP] mySQL outputting XML

2005-03-25 Thread Chris Boget
If you use the mysql command line tool, you can pass the -X parameter so that all results will be returned in XML format. Is there an easy way to do that in PHP using the native mysql_*() functions w/o having to manually generate the XML using the result set? Or does anyone know if this is possib

Re: [PHP] Game development approach

2005-03-25 Thread Robert Cummings
On Fri, 2005-03-25 at 09:44, Alexandre wrote: > Robert Cummings wrote: > > > > Javascript. And perhaps use XmlHttpRequest to synchronize the game cycle > > with your web server from time to time. Or if the pages are being > > submitted, you can just synchronize at that time. > > Hi Rob, thanks fo

[PHP] header already sent problem

2005-03-25 Thread AndreaD
is there an alternative way to suppress the headers already sent problem? Ob_start/flush is not very neat way to so this. AD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: RES: [PHP] Game development approach

2005-03-25 Thread Jay Blanchard
[snip] Pretty interesting, Jay. So you have this script running as others interface with all the other stuff in the site? Just another question, you start it via web like a common script, but it is only accessed by you and it keeps on running? The server doesn't kill it if it keeps running indef

Re: RES: [PHP] Game development approach

2005-03-25 Thread maillists
On Friday 25 March 2005 09:37, Alexandre wrote: > I mean like a script I would start and it would keep running > constantly, checking for new commands in a queue, updating objects status, > can it be done or the server would kill it? > > Kind regards, > Alex PHP is server script and you would need

[PHP] Meta HTTP refresh problem

2005-03-25 Thread John Vaughan
Recently, during a rewrite of my login page, the Meta Refresh I am using suddenly stopped working. I've tried using it by echoing it with php and by just using it in HTML. I've also tried using a javascript redirect with no luck either. Any thoughts on how to debug and what might be holding me

Re: RES: [PHP] Game development approach

2005-03-25 Thread Üstündað
Check PHP-CLI ( Command line interface ) You can run php script without client request. For example : /usr/local/bin/php -f /path_of_your_script/game.php arg1 arg2 & --- Alexandre <[EMAIL PROTECTED]> wrote: > Robert Restad wrote: > > I suggest you write a 'tick' engine, which i.e. > games like P

Re: [PHP] Game development approach

2005-03-25 Thread Alexandre
Robert Cummings wrote: > Javascript. And perhaps use XmlHttpRequest to synchronize the game cycle with your web server from time to time. Or if the pages are being submitted, you can just synchronize at that time. Hi Rob, thanks for your answer. Let me see if I got it right, I would use javascript

RE: RES: [PHP] Game development approach

2005-03-25 Thread Jay Blanchard
[snip] First thanks for your answer and your help. I would like to explore this concept of using the PHP. I mean, I've already coded some small games in C++, and implementing a game loop is kinda easy, since you have the control of all the data being processed. But PHP scripts, as I currently kn

Re: RES: [PHP] Game development approach

2005-03-25 Thread Alexandre
Robert Restad wrote: I suggest you write a 'tick' engine, which i.e. games like Planetarion use. This should be written in C or C++, compiled... You can run this using PHP of course, and run it from command line/shell, but PHP isnt ideal for this. If you have a decent server and not too much player

Re: [PHP] header("Location: page.php target=_parent")?????

2005-03-25 Thread Brian V Bonini
On Fri, 2005-03-25 at 08:57, Jacques wrote: > How should I formulate the header function to replace the current frameset > page with a new one? I have tried a combination of header("Location: > page.php target=_parent"); but I get an error message saying the page does > not exist. > > Also, ca

Re: [PHP] header("Location: page.php target=_parent")?????

2005-03-25 Thread maillists
On Friday 25 March 2005 08:57, Jacques wrote: > Also, can I save a frameset page with a .php extension? I have tried it > out and it seems to work. Maybe perhaps I should not do this as there may > be some implications later on??? I have not had any problems with .php ext frameset pages. I hav

[PHP] header("Location: page.php target=_parent")?????

2005-03-25 Thread Jacques
How should I formulate the header function to replace the current frameset page with a new one? I have tried a combination of header("Location: page.php target=_parent"); but I get an error message saying the page does not exist. Also, can I save a frameset page with a .php extension? I have

Re: [PHP] Download Link !

2005-03-25 Thread maillists
On Friday 25 March 2005 14:25, [EMAIL PROTECTED] wrote: > Hello, > > When I purchased a website template from templatemonster.com, they sent > the download link to my email, this link was active for only 2 or 3 days > then it became inactive. > > Now I'm writing a script for selling website templat

RE: [PHP] Problem with header in an if

2005-03-25 Thread Jay Blanchard
[snip] > /* send the errors to the interface and exit*/ > if('' !== $errorsReported){ > for($i = 0; $i < count($errorsReported); $i++){ > echo $errorsReported[$i]; > } unset($errorsReported); print_r($erro

Re: [PHP] Game development approach

2005-03-25 Thread maillists
On Tuesday 22 March 2005 21:13, Alexandre wrote: > Hi there, > > I'm developing an online game (using PHP+MySQL, and being totally > interfaced via web) which needs to have a "game cycle" running. For > example, the player is flying a plane, so he sets the plane speed to 10%, > then the game cycle

Re: [PHP] Where is php installed on linux

2005-03-25 Thread Jason Wong
On Friday 25 March 2005 19:03, Merlin wrote: > I want to install Turck MMCasche. The install instructions say that the > path to the php install has to be declared. Now I was searching the > linux system for the php install but could not find it! It is compiled > as a module and there is a file /u

[PHP] Where is php installed on linux

2005-03-25 Thread Merlin
Hi there, I want to install Turck MMCasche. The install instructions say that the path to the php install has to be declared. Now I was searching the linux system for the php install but could not find it! It is compiled as a module and there is a file /usr/local/bin/php but no directory. The i

Re: [PHP] Pagination

2005-03-25 Thread Colin Ross
watch out for SQL injection attacks on that one though: what if the 'user' went to "page.php?start=1;SELECT * from `mysql`; On Thu, 24 Mar 2005 22:55:01 +0100, pavel <[EMAIL PROTECTED]> wrote: > > I am wanting to paginate records from a MySQL Database. > > I want there to be 5 records on a page,

Re: [PHP] How can I destroy parameters by page

2005-03-25 Thread Colin Ross
on a side note, for devs, i don't really like how you can override the values of the $_GET (or $_POST) array, seems like it could be a security threat. Also, with that ability, you can never tell (especially if you are making a mod, etc for a larger system) if what your dealling with is the ACTUAL

[PHP] Download Link !

2005-03-25 Thread Ken
>On Fri, 25 Mar 2005 11:25:09 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> >wrote: > Hello, > > When I purchased a website template from templatemonster.com, they sent > the download link to my email, this link was active for only 2 or 3 days > then it became inactive. > > Now I'm writing a script

Re: [PHP] How can I destroy parameters by page

2005-03-25 Thread [EMAIL PROTECTED]
Use unset() unset($_GET['item']); unset($_GET['ac2']); if you want to destroy the value and its name in the same $_GET array. or unset($item); if you want to destroy another variable, not related to $_GET You can use the same with $_POST... Devta. IHow Can I destroy some variable that I pass by u

[PHP] Download Link !

2005-03-25 Thread [EMAIL PROTECTED]
Hello, When I purchased a website template from templatemonster.com, they sent the download link to my email, this link was active for only 2 or 3 days then it became inactive. Now I'm writing a script for selling website templates, the templates are uploaded to a certain folder, when someone b

RE: [PHP] [semi OT]: Planning projects

2005-03-25 Thread kamen 123
Hello For planning project I like simplistic design and scalability. I describe business objects involved in the project and the processes between them with plain text and schemas. Discuss them with the client. When he confirms these documents I write code according to this functional design/plan