Re: [PHP] Resampling images -- need lock ?

2009-04-20 Thread Martin Zvarík
I see... I will need this too: ignore_user_abort(true); kranthi napsal(a): i dont think flock will help in this case.. flock will b of help when u want to lock a particular file(to read/write) but it'll not help u to stop execution of a php script -- PHP General Mailing List (http://www.

[PHP] Re: Resampling images -- need lock ? SOLVED

2009-04-20 Thread Martin Zvarík
Martin Zvarík napsal(a): I have 10 images of different sizes. If user clicks ROTATE, a script will go through all these 10 images and rotates them. If the user clicks TWICE, the first script will get aborted in the middle (so few images are already rotated) and then the second request will

[PHP] Re: Query stopping after 2 records?

2009-05-04 Thread Martin Zvarík
ords and dies half way thru the 3rd? Thanks in advance for clues to fix this. T.Miller Should be: -- $sql = ... $query = mysql_query($sql) or die(... while ($r = mysql_fetch_array($query)) { -- Notice that you need to assign the mysql_query to a $query variable! If

Re: [PHP] Re: Query stopping after 2 records?

2009-05-04 Thread Martin Zvarík
p, or do you get an error message? Depending on how long it's taking to perform the action, the script will stop just because it's taking a while. (by default, I think it's 30 seconds.) If so, use: ini_set("max_execution_time", "time in seconds"); On Mon, May

Re: [PHP] CURL intermittant problem

2009-06-11 Thread Martin Scotta
w.pilotpig.net/ > 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta

Re: [PHP] Re: Dynamic Titles

2009-06-12 Thread Martin Scotta
://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; > > > > Cheers > > Also the line: > > case "$config[HTTP_SERVER]help.php" : > > probably won't work very well : should be either > > case $config[HTTP_SERVER].'help.php': > > or > > case "{$config[HTTP_SERVER]}help.php": > > according to whether you like interpolation in quotes or not. > > > I recommend finding a development environment or editor that does syntax > highlighting - that would catch all of these problems before you even save > the file. > > -- > Peter Ford phone: 01580 89 > Developer fax: 01580 893399 > Justcroft International Ltd., Staplehurst, Kent > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta

Re: [PHP] fopen() on a network share?

2009-06-16 Thread Martin Scotta
> > > > -- > > > Thanks! > > > -Shawn > > > http://www.spidean.com > > > > > > > I think 'servername\sharename\folder\file.xml' will work if you're > > using single quotes around the string. The only slashes that would > > need escaped are the first two since the first slash in '\\' escapes > > the second. > > > > Andrew > > > Guess not, as the backslash after the hostname escapes the next character. > no matter if it's quoted. > > 'this is unterminated, btw \' > -- Martin Scotta

Re: [PHP] Persistent data between two executions

2009-06-16 Thread Martin Scotta
e both security and > relative efficiency into account. I would want to make sure that data > isn't shared between multiple concurrent sessions, which would be a bad > thing for what I'm doing. my oh-so-limited knowledge of PHP is shining > through, I think :) > > Thanks so much! > > James > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta

Re: [PHP] Php and regex help or advice

2009-06-17 Thread Martin Scotta
tags($results); > > > echo $raw; > ?> > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta

Re: [PHP] Object of class could not be converted to string

2009-06-18 Thread Martin Scotta
ww.elemental.co.za > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > _ > Conheça os novos produtos Windows Live! Clique aqui. > http://www.windowslive.com.br -- Martin Scotta

Re: [PHP] populate form input option dropdown box from existing data

2009-06-18 Thread Martin Scotta
> Regardless if I put 14 into $ex or "14" or '14' or even if I put the 14 > instead of the $ex into the if line, I get a blank screen. It seems tp > me, from what I see in the manual that this should work... or am I > supposed to know something that is not clear in the examples... ? > > > -- > Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." > - > Phil Jourdan --- p...@ptahhotep.com > http://www.ptahhotep.com > http://www.chiccantine.com/andypantry.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta

Re: [PHP] Re: Can someone tell me why this is not working?

2009-06-18 Thread Martin Scotta
27;howlong']); > > > > if ($purchprice) { > > echo "Purchase Price:$ $purchprice"; > > } > > if ($newmort) { > > echo "Mortgage Amount:$ $newmort"; > > } > > if ($howlong) { > > echo "How Long has seller owned property: $howlong"; > > } > > > > Thanks > > > > Gary > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta

Re: [PHP] Re: isset question

2009-06-18 Thread Martin Scotta
sage >> news:ea.e8.08167.6ac8a...@pb1.pair.com... >> >> >>> I have a form that gives the submitter a choice or either one set of >>> questions, or another. I am still getting the message even if the input was >>> left blank. So on the line below, >>> >>> $msg.= isset($_POST['mort']) ? "The mortgage amount is $mort\n" : " "; >>> >>> I get >>> >>> The mortgage amount is >>> >>> What am I missing here? >>> >>> Thanks >>> >>> Gary >>> >>> >>> >> >> >> >> >> > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta

[PHP] Re: XSS Preventing.

2009-06-23 Thread Martin Zvarík
e you read the database - what a stupid waste of performance anyway. Cons: --- Instead "&" you'll see "&" ... is that a problem? Not for me and I believe 80% of others who use DB to store & view on web. Martin -- PHP General Mailing List (http://www.php.

Re: [PHP] Re: XSS Preventing.

2009-06-23 Thread Martin Scotta
ethings about these issues. And i understand that If you use > htmlentities() BEFORE insertion, when querying DB from XML, PDF or other > data format, there will be some problems. > > I have some PHP books, the author codding like Martin Zvarík's way. If you > have any pr

Re: [PHP] Re: XSS Preventing.

2009-06-23 Thread Martin Zvarík
Cons: 1. Can't easily edit information in the database True, so if you use phpmyadmin for editing - don't do what I suggested. 2. Can't display raw for the user (e.g. edit a forum post) Edit a forum? You display the data in TEXTAREA... 3. Uses more space in the DB True, although I

Re: [PHP] Re: XSS Preventing.

2009-06-23 Thread Martin Zvarík
Eddie Drapkin napsal(a): 2. Can't display raw for the user (e.g. edit a forum post) Edit a forum? You display the data in TEXTAREA... Because seeing something like: "Yeah!" is what he said. Is awesome for the user experience. If you don't do html...() before putting to text

Re: [PHP] modifying within foreach

2009-06-23 Thread Martin Scotta
the elements you want to keep into a new array. >>>>> >>>>> Kirk >>>>> >>>> What about passing it by reference? >>>> >>>> foreach($results as &$key => &$item) >>>> { >>>> // modify items he

Re: [PHP] Re: XSS Preventing.

2009-06-23 Thread Martin Zvarík
Philip Thompson napsal(a): On Jun 23, 2009, at 9:29 AM, Martin Zvarík wrote: Don't htmlentiies() before DB save. In general: - mysql_real_escape_string() before DB insertion - htmlentities() before dispaly I, on the other hand, would do htmlentities() BEFORE insertion. Pros: --- The

Re: [PHP] Re: Progressbar

2009-06-25 Thread Martin Scotta
ike there are always updates to some > component or other, many of which I do not use and some of which would > not actually install. > > When I went looking for an IDE, I wanted a good code editor with > features like syntax checking and code completion, and I wanted a > debugger that I could step through code to figure out why something > wasn't working as I expected. There were a couple that were close, but > I chose Zend Studio at the time because it seemed to have the most > complete/accurate code completion not only of the core language, but > also recognizing functions and classes declared within the PHP code in > the project itself (especially when you include a basic phpdoc block > that describes the function @params and @return). Perhaps the new > version still does all that wonderfully well, but as I said I've found > it to be not worth the hassle. Perhaps, to be fair, I need to take > some time to get familiar with the new paradigm, but that furthers my > point: I want an editor that I can be productive with more or less out > of the box. > > Andrew > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Removing empty values from array

2009-06-25 Thread Martin Scotta
way to do it? -- Martin Scotta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Image Type BMP @ "Save Image As" Dialog on IE

2009-06-28 Thread Martin Zvarík
Nitsan Bin-Nun napsal(a): I have wrote a PHP script that serves JPEG images in smaller size, the resize is done using GD on-the-fly. I have noticed an interesting issue during the "save image as..." dialog on serveral internet explorer browsers, somehow, for some strange reason, the JPEG file is

[PHP] namespace keyword

2009-07-02 Thread Martin Scotta
"NAMESPACE" in the class? Is it a reserved word? -- Martin Scotta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Lookup domain in directories VS database

2009-07-05 Thread Martin Zvarík
Imagine you are hosting 10.000 subdomains. SOLUTION #1: you create directories like: a/ b/ ... s/ s/some-subdomain.freehosting.com/ (this includes CONF.php, where you store some basic infos) Everytime visitor hits the page you do: @include('t/test-subdomain.freehosting.com/conf.php')

Re: [PHP] Simple login form with cookies

2009-07-08 Thread Martin Scotta
they > provide the password again (even though they are already > authenticated) on the same form with the new username. Then you can do > the same encrypt/compare that you do for authentication, and if it > matches you just update the username and the hash at the same time. > > Andrew > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Obeying the rules (was Simple login form with cookies)

2009-07-09 Thread Martin Scotta
and the value of their > contribution and spend their time and talents where they are appreciated and > not waste them on such nonsense. > > Cheers, > > tedd > > -- > --- > http://sperling.com  http://ancientstones.com  http://earthstones.com > > -- >

Re: [PHP] runtime access to static variable

2009-07-10 Thread Martin Scotta
PHP - General mailing list archive at Nabble.com. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > if you need to access to a class constant use the built-in function if( defined( get_class($myClass) .'

Re: [PHP] RFC/Survey for Our Newer Folks (Including Lurkers)

2009-07-13 Thread Martin Scotta
uck with > me :p > > -- > Thanks, > Ash > http://www.ashleysheridan.co.uk > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] MySql Injection advice

2009-07-14 Thread Martin Scotta
cy services! > > Also, IP addresses can be converted to IP numbers with the long2ip() > function of PHP, which means you can store them as long ints and do > normal number comparisons on them, great for matching an IP address to a > range of 'valid' ones. > > Thanks > Ash > www.ashleysheridan.co.uk > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Need Help.

2009-07-14 Thread Martin Scotta
/www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Scope of Variables and use of global and this->var

2009-07-14 Thread Martin Scotta
the function as static by using " public static > function calculateRectangle($width, $height) { " > then you can access the method by using just 1 call: > $area = SomeMathFunctions::calculateRectange(10,15); > > So for creating utility functions its better to use static m

Re: [PHP] Need Help.

2009-07-14 Thread Martin Scotta
javascript Click to lalalal I've said it is not for a php thread On Tue, Jul 14, 2009 at 10:29 AM, Bob McConnell wrote: > From: Martin Scotta >> >> hahahahahaha >> >> How are you to delete my history? >> The fact that you "develop" a website does not

Re: [PHP] [GD] Image errors

2009-07-14 Thread Martin Scotta
itle sets to > "picture.php (JPEG image)" and if i right-click it and click on > "Proprieties" i get "0px × 0px (resized as 315px × 19px)". > > P.S.: I get the same result when I write $immagine = > imagecreatefromjpeg(...) > > (Sorry for my engl

Re: [PHP] [GD] Image errors

2009-07-14 Thread Martin Scotta
He is calling the function by variable something like this $func = 'var_dump'; $func( new Foo ); On Tue, Jul 14, 2009 at 1:30 PM, Ashley Sheridan wrote: > On Tue, 2009-07-14 at 13:27 -0300, Martin Scotta wrote: >> $immagine = $tipo($this->updir.$id.'.png'); >

Re: [PHP] [GD] Image errors

2009-07-14 Thread Martin Scotta
On Tue, Jul 14, 2009 at 1:48 PM, Ashley Sheridan wrote: > On Tue, 2009-07-14 at 13:41 -0300, Martin Scotta wrote: >> He is calling the function by variable >> >> something like this >> >> $func = 'var_dump'; >> >> $func( new Foo ); >>

Re: [PHP] [GD] Image errors

2009-07-14 Thread Martin Scotta
( $this->updir . $id . '.png' ); } hey, look, just 2 lines! On Tue, Jul 14, 2009 at 2:20 PM, Ashley Sheridan wrote: > On Tue, 2009-07-14 at 14:16 -0300, Martin Scotta wrote: >> On Tue, Jul 14, 2009 at 1:48 PM, Ashley >> Sheridan wrote: >> > On Tue, 2009-0

[PHP] I have an idea

2009-07-14 Thread Martin Scotta
You can do a lot of things with him, even have fun with it. My idea is to make a simple game where your have to write some AI to beat the other players AI The idea, as simple as it looks, is really difficult to implement specially about security so, do you like me idea? -- Martin Scotta -- PHP

Re: [PHP] Alphabetical pagination

2009-07-15 Thread Martin Scotta
eneral idea is correct. >> >> 2)  It implements numeric pagination, which is usually based on a >> fixed number of rows per page. The OP wanted alphabetical pagination >> (like an address book) with each page containing all entries that >> begin with the selected letter. >> >> >> Andrew > > I just had a query doing the same thing one time, and that did take it's time > (about 2-3 seconds) but it did have a few million records to look at, so I > can understand why it was slow! > > And it was on MSSQL, with no indexes set up :( I nearly cried when I saw what > I was dealing with! > > -- > Thanks, > Ash > http://www.ashleysheridan.co.uk > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: I have an idea

2009-07-15 Thread Martin Scotta
On Wed, Jul 15, 2009 at 4:55 AM, Carlos Medina wrote: > Martin Scotta schrieb: >> >> Hi >> >> Do you noted that all the discussion here are about problems, bugs, or >> just "urgent pleaaase help me" >> I have an idea. It is not really THE idea... b

Re: [PHP] I have an idea

2009-07-15 Thread Martin Scotta
ea, as simple as it looks, is really difficult to implement >> specially about security >> >> so, do you like me idea? >> >> -- Martin Scotta >> > > > sorry if this is getting OT: > > Martin, I wrote a really fun and charming remake of a great that 2 others

Re: [PHP] I have an idea

2009-07-15 Thread Martin Scotta
On Wed, Jul 15, 2009 at 12:29 PM, tedd wrote: > At 1:21 AM -0300 7/15/09, Martin Scotta wrote: >> >> Hi >> >> Do you noted that all the discussion here are about problems, bugs, or >> just "urgent pleaaase help me" >> I have an idea. It is not rea

[PHP] boolean vs int comparison

2009-07-15 Thread Martin Scotta
, $boolean ? ' ': ' ' , $test ,' $int === ' , bol2string($_test[-1]), $_test[0] !== $_test[-1] ? ' / $int !== 0' : '' , PHP_EOL; ?> -- Martin Scotta

Re: [PHP] Exception not being caught

2009-07-16 Thread Martin Scotta
class A could not be converted to > > string." > > > > If it's catchable, why isn't it caught in my example? > > It's not an exception, it's a "fatal error". Fatal errors are caught > by error handling functions, not by catch blocks. > > Consequence of having (at least) two separate error handling > mechanisms in the same language. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta

Re: [PHP] Sub Menu System?

2009-07-16 Thread Martin Scotta
arting over at this point, but I'm hoping there is > something I can just purchase, so I can concentrate on the rest of the > sitehopefully the menu system would support PHP and ASP. > > Thanks for any information! > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta

Re: [PHP] Alphabetical pagination (RESOLVED)

2009-07-16 Thread Martin Scotta
> My point of view: # i'll use constants for these values assert( ord('A') == 0x41 ); assert( ord('Z') == 0x5A ); # 1. get the ascii code of the 1st character or from A=0x41 $letter = ord( array_key_exists('letter', $_GET) ? strtoupper( $_GET['letter']{0} ) : 'A' ); # 2. different solutions # 2.a check if it is range ussing <= ussing constants (faster) $letter = chr( 0x41<= $letter && $letter <= 0x5A ? $letter : 0x41 ); # 2. different solutions # 2.b check if it is range min/max and with constants (faster) $letter = chr( min( max(0x41, $letter), 0x5A) ); I'd use the 2.b but this has different behaviour when $letter > Z (should this ever happen?) In the other hand I think it is the faster one. -- Martin Scotta

Re: [PHP] Alphabetical pagination (RESOLVED)

2009-07-16 Thread Martin Scotta
On Thu, Jul 16, 2009 at 12:01 PM, Miller, Terion < tmil...@springfi.gannett.com> wrote: > > One question I still have...I had help with this script of course and I'm > confused with the %s what does it do? > > On 7/16/09 9:53 AM, "Martin Scotta" wrote: &g

[PHP] Add php.net to my browser search box

2009-07-16 Thread Martin Scotta
Quick search in PHP.net! php quick search http://php.net/images/logos/php-icon-white.gif http://search.php?pattern={searchTerms}"/> UTF-8 false I know php.net use method="POST", but it's quite easy to provide a GET mechanism. is this the correct place for posting this? -- Martin Scotta

Re: [PHP] Invalid Argument why?

2009-07-16 Thread Martin Scotta
thing like this: > > // Always better to be plural when you have an array. > $rows = whatever_your_rows_come_from(); > > foreach($rows as $row) > { > $inType = $row['inType']; > echo $inType . ''; > } > > > HTH, > Kyle > -- Martin Scotta

[PHP] file_set_contents() do several times?

2009-07-19 Thread Martin Zvarík
Makes sense? or is it enough to do it just once? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: file_set_contents() do several times?

2009-07-20 Thread Martin Zvarík
David Otton napsal(a): > 2009/7/20 Martin Zvarík : >> > $i = 0; >> do { >> $i++; >> $r = file_put_contents('file.txt', 'content'); >> } while($r === false && $i < 3); >> >> if ($r === false) die('error'

Re: [PHP] Re: newbie question - php parsing

2009-07-22 Thread Martin Scotta
t; > 2009/7/23 Shane Hill > > > 2009/7/22 João Cândido de Souza Neto > > > > > You made a mistake in your code: > > > > > > > > > > > > must be: > > > > > > > > > > > > > > > Short tag and not recommended as its deprecated now, would be void at PHP > 6.0 > -- Martin Scotta

Re: [PHP] Re: unsetting a referenced parameter in a function

2009-07-22 Thread Martin Scotta
; > RTM: http://php.net/unset The behavior of *unset()* inside of a function can vary depending on what type of variable you are attempting to destroy. If a globalized variable is *unset()* inside of a function, only the local variable is destroyed. The variable in the calling environment will retain the same value as before *unset()* was called. / ... / If a variable that is PASSED BY REFERENCE is *unset()* inside of a function, only the local variable is destroyed. The variable in the calling environment will retain the same value as before *unset()* was called. I think the manual is very clear about unset. -- Martin Scotta

Re: [PHP] Re: unsetting a referenced parameter in a function

2009-07-23 Thread Martin Scotta
? > > > > when you state it in those terms (which are clearly correct) i wouldn't. > > > > but if the way i think is "unset() destroys the specified variables" (as > the > > manual puts it) then i expect that the specified variable would be > > destroyed, not the reference. > > > > so, as i said, i was a bit surprised when the variable wasn't destroyed. > > once i understood what was happening, i thought it a bit confusing to > have > > such scope-dependent differences in behavior of a language element. > > > > > It might be easier to understand if you don't use the same var names: > > function foo(&$arg) { > $arg = 42; > unset($arg); > $arg = 'meaning'; > } > > $a = 0; > foo($a); > print("$a\n"); > > > -- > Thanks! > -Shawn > http://www.spidean.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta

Re: [PHP] Renaming all variables in a repository

2009-07-23 Thread Martin Scotta
is and could > either point me in the right direction or just down and out tell me > how to do it. > > Thanks so much > --Eddie > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta

[PHP] PHP as Language

2009-07-24 Thread Martin Scotta
Hi all Is there a formal definition for the php language? Where I can found it? I've STW with no results. -- Martin Scotta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP 5.2.9 + NCurses

2009-07-30 Thread Martin Scotta
any set of classes that handle ncurses easily? -- Martin Scotta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Dan Brown

2009-08-03 Thread Martin Scotta
est in this, please exercise your > email-delete capabilities at this time. > >    Thanks! > > -- > > daniel.br...@parasane.net || danbr...@php.net > http://www.parasane.net/ || http://www.pilotpig.net/ > Check out our great hosting and dedicated server deals at > http://twitter.com/pilotpig > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Warning: OutsourcingRoom.com

2009-08-05 Thread Martin Scotta
Ho hum... >> > >> > Thanks, >> > Ash >> > http://www.ashleysheridan.co.uk >> > >> > >> > -- >> > PHP General Mailing List (http://www.php.net/) >> > To unsubscribe, visit: http://www.php.net/unsub.php >> > >> > >> >> Har har.  This was not a mindless 411 scam.  It is a bit different >> when an actual site people use gets hacked and their personal >> information stolen.  I too received one of these emails and it was >> very convincing.  It has my exact username from the Elance site and >> was crafted in such a way that it seems this new site was a partner >> with Elance somehow. >> >> -- >> http://www.ericbutera.us/ >> > Is there nothing that anybody can actually do about this? Where is the > new company based? Are there laws in that country about this sort of > thing? > > Thanks, > Ash > http://www.ashleysheridan.co.uk > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Warning: OutsourcingRoom.com

2009-08-05 Thread Martin Scotta
11:14 AM, Ashley Sheridan wrote: > On Wed, 2009-08-05 at 11:10 -0300, Martin Scotta wrote: >> Nobody can actually do anything. This happen all the time. >> >> Sites like facebook or myspace send invitations to all your mail's >> contacts, but that's not the problem

Re: [PHP] navigation include not functioning

2009-08-05 Thread Martin Scotta
xt (to >>> indicate a page's current position). If the condition is not true, all the >>> links (except the true current 'page') are supposed reload index.php and >>> pass a variable to itself to place into $thisPage using >>> href="index.php

Re: [PHP] navigation include not functioning

2009-08-05 Thread Martin Scotta
on. >>>> >>>> >>>> >>>> >>>> On Wed, Aug 5, 2009 at 10:10 AM, Jerry Wilborn >>> >>>>> >wrote: >>>>> >>>>> Look >>>>> >>>> >>>> >>>>  I'm having trouble understanding your description of the problem.  Can >>>> >>>>> you >>>>>> tell us what you're seeing and what you expect to see? >>>>>> Jerry Wilborn >>>>>> jerrywilb...@gmail.com >>>>>> >>>>>> >>>>>> >>>>>> On Wed, Aug 5, 2009 at 12:00 PM, Allen McCabe >>>>> >wrote: >>>>>> >>>>>> I am trying to generate pages by importing content in includes, and >>>>>> using >>>>>> >>>>>>> my >>>>>>> navigation include to tell PHP to replace a $thisPage variable which >>>>>>> all >>>>>>> the >>>>>>> includes use >>>>>>> >>>>>>> The idea behind it (I know tons of people do it, but I'm new to this >>>>>>> concept), is to have a 'layout' page where only a variable changes >>>>>>> using >>>>>>> $_GET on an href (index.php?page=services or index.php?page=about) to >>>>>>> load >>>>>>> the new 'pages'. >>>>>>> >>>>>>> PROBLEM: >>>>>>> All my links are displaying the current page state, and links are not >>>>>>> building around the link text (hrefs are built conditionally with if >>>>>>> $thisPage != services then build the link, otherwise leave it as >>>>>>> normal >>>>>>> text). Same thing with the background image behind the link text (to >>>>>>> indicate a page's current position). If the condition is not true, all >>>>>>> the >>>>>>> links (except the true current 'page') are supposed reload index.php >>>>>>> and >>>>>>> pass a variable to itself to place into $thisPage using >>>>>>> href="index.php?page=" (after which I have a variable which stores >>>>>>> "about" >>>>>>> or "services" within the if statement near the link text. >>>>>>> >>>>>>> If this sounds like something you are familiar with (former issues and >>>>>>> whatnot) please let me know what I'm doing wrong. I would be happy to >>>>>>> give >>>>>>> you any code you want to look at (index.php or navigation.php, >>>>>>> whatever). >>>>>>> >>>>>>> Thanks again for your help PHP gurus! >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > -- Martin Scotta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] navigation include not functioning (RESOLVED)

2009-08-05 Thread Martin Scotta
out" == $page) > > Then if you mis-type "==" as "=", PHP will fail immediately with a parse > error. > > It feels a little weird but if it saves a lot of head-desk moments it's > probably worth it. Now if only I could get into the habit myself... >

Re: [PHP] dynamically naming PHP vars on the fly?

2009-08-05 Thread Martin Scotta
;$Fruit_apple"; // I want this to return "organic" > > Or how are you guys dynamically naming PHP vars on the fly? > > > John Butler (Govinda) > govinda.webdnat...@gmail.com > > > > > -- > PHP General Mailing List (http://www.php.net

Re: [PHP] Displaying user data and picture

2009-08-06 Thread Martin Scotta
;> http://www.nabble.com/file/p24839092/guest-book.zip guest-book.zip >> -- >> View this message in context: > http://www.nabble.com/Displaying-user-data-and-picture-tp24839092p24839092.html >> Sent from the PHP - General mailing list archive at Nabble.com. >> > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] "PHP 6 and MySQL 5 for Dynamic Web Sites" Book

2009-08-06 Thread Martin Scotta
> PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > That probably seems silly to you... but there are authors (and editors) who thinks writing a book about the last version of PHP is a good business, and don't care if the language is full featured or even "released" It is up to you to read the book or not. -- Martin Scotta

Re: [PHP] "PHP 6 and MySQL 5 for Dynamic Web Sites" Book

2009-08-06 Thread Martin Scotta
surprised if the feature stays the same at all. Just take a > look at http://wiki.php.net/summits/pdmnotesmay09 and see what they're > cooking up. Like I said before, PHP6 isn't feature-complete, and I > don't suspect it's near it either, so it's definitely way premature to > write a book on PHP6 and silly to buy one. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta

Re: [PHP] Pattern Matching

2009-08-06 Thread Martin Scotta
tly appreciated. > > Thanks! > Floyd > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta

Re: [PHP] reason for a "Notice:.." on one site but not another? (Same code.)

2009-08-10 Thread Martin Scotta
; Interesting that it works (without notice) if we check against the isset () > one first. It makes if() look more intelligent that I would think... as if > it saying, "good now that we've established that the var isset, now is it > also equal to '___'., as opposed to just, "is var set, and is var equal to > "___'. -- Martin Scotta

Re: [PHP] reason for a "Notice:.." on one site but not another? (Same code.)

2009-08-10 Thread Martin Scotta
the conditions to their > respective boolean results before evaluating the logical operators. > > Andrew > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-10 Thread Martin Scotta
or find now) in PHP > how to say "inverse your value" (to a boolean). > ? > > TIA! -G > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta

Re: [PHP] Embedding foreach loops

2009-08-10 Thread Martin Scotta
> Is this something I need to have in a database to work? > >> > > > > no, you can do it with the arrays... but it may be easier to work with > > over the long run if that data was in a db. > > > > Anyway right after you finish creating the array and it's embedded > arrays, > > in your code, then add this: > > var_dump($shows); //--so you can see what you just created. If it looks > > right, THEN go on bothering to try and parse it with your (embedded) > > foreach's { > > > > > > John Butler (Govinda) > > govinda.webdnat...@gmail.com > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- Martin Scotta

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-10 Thread Martin Scotta
t; TIA! -G > > > > > > > > > > > > > $arr = range(1, 10); > > > > $i = 0; > > foreach ( $arr AS $row ) { > > > > $row_color = ( ( $i++ % 2 ) ? 'green' : 'red'); > > > > echo $row_color; > > > > } > > > > ?> > > > > > > -- > > 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 > > -- Martin Scotta

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-11 Thread Martin Scotta
ray( 'even', 'odd' ); # after new requirements it is... $styles = array( 'white', 'white', 'gray' ); foreach($items as $item) { printf( '%s', current( $styles ), $item ); next( $styles ) or reset( $styles ); } The simplest solution is always the best choice. This provides maintainability and flexibility to changes ( that we don't know yet ) -- Martin Scotta

[PHP] Single quoted strings (was: ereg_replace to preg_replace translation)

2009-08-11 Thread Martin Scotta
e legible. $sql = preg_replace('|\n#[^\n]*\n|', '', $sql); Personally I try to not use double quoted. PHP parses single quoted very much faster. # for this echo "Hi, $name, wellcome $home"; # I use echo 'Hi, ', $name, ', wellcome ', $home; # or printf( 'Hi, %s, wellcome %s', $name, $home ); And of course, this is a matter of taste! -- Martin Scotta

Re: [PHP] Calendar Problem

2009-08-12 Thread Martin Scotta
On Wed, Aug 12, 2009 at 10:25 AM, Robert Cummings wrote: > > > tedd wrote: > >> At 4:08 PM -0400 8/11/09, Robert Cummings wrote: >> >>> tedd wrote: >>> Hi gang: I want to show the dates for all Fridays +-30 days from a specific date. For example, given today's date (8/11/2

Re: [PHP] Re: Is select_db necessary?

2009-08-12 Thread Martin Scotta
Mandriva Linux Contributor [http://www.mandriva.com/] > >PulseAudio Hacker [http://www.pulseaudio.org/] > >Trac Hacker [http://trac.edgewall.org/] > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > ', $link ); What SQL was sent to the database? Looking at bin logs I've found this. 1. use database => mysql_select_db 2. use database: SELECT * FROM => mysql_query The DB is usually a common bottle-neck for most applications. You can have several webservers, but can't do that with the DB... of course, you can have multiples slaves but just 1 master. is this the best way to send queries? What's the better and faster way? -- Martin Scotta

Re: [PHP] Calendar Problem

2009-08-12 Thread Martin Scotta
gt; > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Well, this was a nice experiment. What do we must learn about this? performance < legibility Stuart solutions look that's the faster, but in the other hand Shawn's solution 2 looks the most legible (so far). -- Martin Scotta

Re: [PHP] Re: Is select_db necessary?

2009-08-12 Thread Martin Scotta
> > would be interesting to see. > > I personaly woudn't spend the time on logs, a computer is logical, I try to > be logical, and I would > try to create code which is logical speedy. I expect the database kernel > programmer the same. > > I think then we are on th

[PHP] Design Patterns

2009-08-12 Thread Martin Scotta
attached through this list... so, if you want a copy just reply to this message. Any bug, comment, or anything you like to say is welcome! -- Martin Scotta

Re: [PHP] Re: Design Patterns

2009-08-12 Thread Martin Scotta
On Wed, Aug 12, 2009 at 6:27 PM, Ralph Deffke wrote: > it would help if u would tell us what u want to accomplish with this > ativity > > cheers > ralph_def...@yahoo.de > > "Martin Scotta" wrote in message > news:6445d94e0908121323x721254c4ja389978d67b

[PHP] literal strings vs variable strings

2009-08-13 Thread Martin Scotta
Hi all. Is this going to save me anything? something() ) return true; something() ) return true; -- Martin Scotta

Re: [PHP] Re: Re: Re: Design Patterns

2009-08-13 Thread Martin Zvarík
agree. Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] design pattern

2009-08-13 Thread Martin Scotta
ects using many designs patterns. By example the RecursiveDirectoryIterator and it's family use the decorator pattern. Also features such as "late static binding" were added because a design pattern. I think there will be some "separation" in the community, those who will stay using scripts and those who will use heavily OOP. I do not know who the "dark side" will be, xD -- Martin Scotta

Re: [PHP] session variables - help

2009-08-14 Thread Martin Scotta
ds with the remaining complimentary values). > Martin suggested I use the following code for my update script (which is > posted to via the process page): > > [code] > > foreach($_POST as $key => $value) >if( '0' == $value || '' == $value ) >{ >

Re: [PHP] Re: ini files as config - hidden

2009-08-14 Thread Martin Scotta
files .php so, database.ini will be database.php 2) Put in the top of your script this line ; So, when the file is opened as an ini file the semilcolon indicates that it's a comment. But, when the browser call for this file... php just exit's in the first line. Our data will be safe as long as the first line will remains there. -- Martin Scotta

[PHP] PHP_SAPI

2009-08-14 Thread Martin Scotta
inuity, embed, isapi, milter, nsapi, phttpd, pi3web, roxen, thttpd, tux,webjames should I look at php source-code for these values? -- Martin Scotta

Re: [PHP] PHP 5.x magic mathods quick question

2009-08-21 Thread Martin Scotta
ting one (like __set() ) ovewrites the standard one? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta

Re: [PHP] __destruct() not called ! we shot us in the foot try the script

2009-08-25 Thread Martin Scotta
t( $c ); > > $d->doSomething(); > > echo "script ending now ..."; > > ?> > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta

[PHP] DOMNode children iteration (was Re: array() returns something weird)

2009-08-25 Thread Martin Scotta
-- Forwarded message -- From: Martin Scotta Date: Tue, Aug 25, 2009 at 6:24 PM Subject: Re: [PHP] DOMNode children iteration (was Re: array() returns something weird) To: webmas...@strefarytmu.pl Fatal error: Call to a member function getAttribute() on a non-object in testme.php

Re: [PHP] Basic question - Starting a background task without waiting for its end.

2007-01-01 Thread Martin Alterisio
2006/12/31, Michel <[EMAIL PROTECTED]>: I (very simply) try to open a "notepad" on a simple text file in a simplistic PHP script, and would like to go on and display the next page without waiting for this notepad to be shut. After various attempts, I have used an : exec ('bash -c cmd /C start

Re: [PHP] classes and objects: php5. The Basics

2007-01-16 Thread Martin Alterisio
Backward compatibility with PHP4, where member functions couldn't be declared as static. Any member function could be called statically providing a static context instead of an object instance. 2007/1/16, Cheseldine, D. L. <[EMAIL PROTECTED]>: Hi I'm stuck on The Basics page of the php5 Object

Re: [PHP] classes and objects: php5. The Basics

2007-01-16 Thread Martin Alterisio
Forgot to mention that calling a non-statical function this way should generate an E_STRICT warning. 2007/1/16, Martin Alterisio <[EMAIL PROTECTED]>: Backward compatibility with PHP4, where member functions couldn't be declared as static. Any member function could be called

Re: [PHP] nuSoap -method '' not defined in service

2007-01-20 Thread Martin Alterisio
Try the following: $server->register('getColumns', array(), array()); The second argument is an array containing an entry for each argument of the webservice call, and the third argument is an array for the return value. Since you don't have either arguments nor return value, empty arrays should

Re: [PHP] preg_match problem

2007-01-20 Thread Martin Alterisio
Double slash to prevent PHP interpreting the slashes. Also using single quotes would be a good idea: if (preg_match('/[\\w\\x2F]{6,}/',$a)) 2007/1/19, Németh Zoltán <[EMAIL PROTECTED]>: Hi all, I have a simple checking like if (preg_match("/[\w\x2F]{6,}/",$a)) as I would like to allow all

Re: [PHP] preg_match problem

2007-01-21 Thread Martin Alterisio
2007/1/20, Arpad Ray <[EMAIL PROTECTED]>: Martin Alterisio wrote: > Double slash to prevent PHP interpreting the slashes. Also using single > quotes would be a good idea: > > if (preg_match('/[\\w\\x2F]{6,}/',$a)) > Just switching to single quotes would do the t

Re: [PHP] preg_match problem

2007-01-23 Thread Martin Alterisio
2007/1/22, Beauford <[EMAIL PROTECTED]>: ... much blah blah blah ... I've probably read 100 pages on this, and no matter what I try it doesn't work. Including all of what you suggested above - is my PHP possessed? if(preg_match("/[EMAIL PROTECTED]&()*;:_.'/\\ ]+$/", $string)) { gives me this

Re: [PHP] nested, referenced foreach & implicit current array pointer issues

2007-01-30 Thread Martin Alterisio
2007/1/30, speedy <[EMAIL PROTECTED]>: Hello PHP crew, As a followup to: http://bugs.php.net/bug.php?id=22879 That's not a bug, just an user doing things the wrong way and blaming the language. I've stumbled upon this problem in a way: function f() { global $arr; foreach($arr as $

Re: Re[2]: [PHP] nested, referenced foreach & implicit current array pointer issues

2007-01-31 Thread Martin Alterisio
2007/1/30, speedy <[EMAIL PROTECTED]>: Hello Martin, > Tuesday, January 30, 2007, 8:45:50 PM, you wrote: > > function f() > { >global $arr; > >foreach($arr as $k=>$v) { >$v->do_something(); >} > } > > I don't see y

Re: [PHP] OT - Regular Expression

2007-02-09 Thread Martin Alterisio
If you want to do it in one regular expression, without listing each case, you can use a lookahead assertion: /^(?=.*8.*)[0-9]{4}$/ The assertion (?=.*8.*) checks that the following matches the expression contained (.*8.*) which fails if there is not an 8. 2007/2/9, Peter Lauri <[EMAIL PROTECTE

Re: [PHP] OT - Regular Expression

2007-02-09 Thread Martin Alterisio
2007/2/9, Martin Alterisio <[EMAIL PROTECTED]>: If you want to do it in one regular expression, without listing each case, you can use a lookahead assertion: /^(?=.*8.*)[0-9]{4}$/ The assertion (?=.*8.*) checks that the following matches the expression contained (.*8.*) which fails if t

<    9   10   11   12   13   14   15   16   17   18   >