Domain Search | www.


Related Pages:

If i setcookie to expire in the past the browser should kill the cookie well my script cant find the cookie anymore
Current app im working on has a MM relationship between sherpas and the territories they cover currently the app
Ok perhaps this isnt the right channel for this but since I am doing some PHP work I wondered if you could help







f00li5h, I am sorry, what do you mean dellimiters? I know what delimiters are (they separate items) but I am not sure what you mean in the contexzt
\/s/contexzt/context

hmmm, do I need to store tags in arrays ?

they mark the start and end of the pattern, php.net/manual/en/function.preg-replace.php

f00li5h, ah, I see!!!
brilliant!
f00li5h, thank you

sure thing

f00li5h, I am sorry, back to the regex, what would you say that the code does? As far as I can tell it matches alternate instances of the quote character

it is replaces "'s with -1 ... whatever that means

f00li5h, as far as i understand it, -1 means match and replace unlimited number of times

noone said anything about http://sausage.no-ip.org:88/tick.php usually i get in an argument for something

how can i generate a random but always unique alphanumeric string ?

md5(mktime());

sounds promising

TehSausage, Everyone knows sausages can't program.

but too long

substr(md5(mktime()),0,_length_);

will a substr always be unique ?

mktime() would be predictable and only change every second

MarcosBL, I have found a nice example to parse tag content http://br.php.net/manual/en/ref.xml.php#25557

anyone here use eclipse?
how is that just after i install plugins i have to update them already...
(

I just fetched the all-in-one on the pdt site
works like a charm

cipherz, never.

MarcosBL, but I didn't get how to echo the content

what ?

neveeeer!

mine worked out of the box both on my amd64 and on a normal i686 system

I'm going to get it working on my own...I mean...
Eclipse is huge.

well I had that idea too, but after a couple of hours I gave up easier to just fetch the all-in-one package

Takes so long to update...because....it's....huge.

true
so fetch the all-in-one and have it working right away

No!
How is Eclipse?

hi

and have it do stuff yet

k3ph, just echo $data[0], or $data[0][1] ... etc
it seems to return an array

*** glibc detected *** /usr/sbin/httpd: double free or corruption (!prev): (..) ***

try print_r($data) to see what contents

can i compare a number and a string?

well sometimes it does autocomplete ok for me, but then again I am used to vim I just needed a class overview

how can it mean that? mixed preg_replace ( mixed $pattern, mixed $replacement, mixed $subject [, int $limit [, int &$count]] )

does not sound healthy

if impossible to get all mails from php hosting function or smth like this?

not rly no

cipherz, do you use eclipse all the time?

now I do

cipherz, when i first used it it sucked
cipherz, i'm giving it another try

is that really the line of code you have?

cipherz, I really want a nice IDE...

f00li5h, yes, it is.

had the same experience but it gives me what I need an overview, my project is growing too much in number of classes
yeah and zend costs money

MarcosBL, ooo I see now how this while is working, thanks

so, the $subject is -1?

grrrr zend.

not the place, but #mysql seems dead... can anyone help with this ? http://rafb.net/p/6E4Lhd12.html

MarcosBL, what is that strange language?
MarcosBL, are you an alien?

spanish ?

what is spanish?

brian xD
yep, i'm spanish

if impossible to get all mails from PHP functions or smth like this? email use pop3 I Trying imap but nothing :/

f00li5h, hmm, ok, I will test it and report back.

why does PDT insist that I need WST...
When I have it installed?

why (Number of NULLs) then (Number of NOT NULLs) on the next row?

what the hell is wrong with eclipse

well.. it will be enought with just number of nulls
i can do some maths after the mysql hosting query

oddly; after a restart it works fine..

but i just can't count the number of nulls :/

what is "number of nulls" supposed to be looking at? number of empty columns or such?

number of columns without an integer
User One | NULL
for example
need to know how many columns have a NULL and how many have a number

firstly, don't use JOIN as a WHERE (reference too: "AND tareas_entregas.tarea = "6"")

for example, 3 NULLS and 8 numbers (no-nulls, doesn't need top know wich number)
mmm, i need that condition iin the join, to eliminate users that doesn't make that condition... or should i put it in any other place ?

i get one string from file (fgets), and set another one. they are equal, but if($firstIP == $secondIP) doesn't execute
what can be wrong?

it should be in the WHERE, you grouped it right in there make use of it !
I'd just do table_name.* and count the number of columns with an entry on return..
otherwise, you can use IS NULL or IS NOT NULL to check for a value..

anyone here use phpthumb?

COUNT(ISNULL(column)) or somehting like that ?

anything NULL touches turns to NULL, so NULL + 1 == NULL. So that would probably return null as well, better off doing COUNT(column) as value then do mysql_num_rows($result)-$row['value'] or such

is there a php class/ script / easy way to go through a CSV which currently only contains a DELIMITER, and add an Enclosure character around it's fields?
Field1,Field2,Field3 to "Field1","Field2","Field3"
is this easily achievable?

$string = '"'.str_replace(',','","',$string).'"'; ?

åáàíóööà

Mace[work], ok, that's the php web hosting approach, thank you, only thing is i was trying to get it mysql approach

#mysql :P
Like I say though, whatever NULL touches turns to NULL in any scenario. So if you're calculating with NULL, always expect NULL as the result, so I think they'll tell you a less detailed response of what I told you

it's official i hate eclipse.

you moan too much

sorry.

emacs time!

I'm going to try Komodo actually.

they never learn!

I don't think I like emacs.

The important question is whether emacs likes /you/

there's a surprise :P

I actually hate all software and computers.

if impossible to get all mails from PHP functions or smth like this? Email use pop3 I Trying imap but nothing :/

English only please

yeah but how do you handle start of the line end of the line?

Maybe I do like emacs.
I forget.

EOL ?

I can't grasp vim.

[INSERT] and [ESC] are your friends

commands make me angry.
I don't like that I have to turn on a mode to insert.

:nohl - turn off that annoying highlighting

I spent many months getting emacs the way I like it, then 7 years later, I switched to vim

What highlighting?

without 2 modes, you can't have single key commands

the highlighting annoys me

I can't grasp vim.
I don't get it.
I can't comprehend it's syntax.

Mace[work], i will follow that approach, do the calc in php, and memcache the result

you can do more with fewer keystrokes with vim

you should be memcacheing all results anyway
unless you specify otherwise

zophy, how?
I find that the vim commands are very difficult to get used to.

most things are

And to get in the mindset of using vim there is a huge learning curve.

nobody uses all the vim commands, just like nobody uses all the emacs commands

it was worth the effort for me

and me

How did you learn to use vim?

yeah, there is a much larger learning curve for vim than emacs

vimtutor

I try and it just ends up taking me an hour to do simple things.

it took me longer than a day to figure that [INSERT] and [ESC] are seperate modes.

how do I get an overview in vim

overview?

Like, see other files in a directory
and open that file

vim path to directory
(it shows a quick-help in the listing too)

there's an extension for firefox, vimperator that makes FF kinda vim-like

that is all fine and dandy that I do vim path but how do I get back to that when I open a file

What editors have you tried?

nano...
I'm lazy.

ugh

You want a CLI only editor?

either hit return on a file or :e filename

So lazy that I refuse to learn how to use a editor where there documentation can't be displayed all on the screen at once.

Notepad then..

file.txt - Minimalist text editor

I use Linux.

notepad++ rulez

Well, a pretty simple linux host CLI editor, that is very simple to use, is mcedit

pencil and erase rulez

wget http://www.urlwhereafileeaxftlikeyourslives.com/file.txt - Even more minimalistic

question

how to strip spaces, blanks, CR/LF from a string? I have to convert the string value into a integer

If you're in KDE, then Kate or Kwrite are good, simple, editors. Somewhat more complex could be Kdevelop for scripting languages

does fputs() add a \n on the end?

if you're going to be spending the better part of every day using a text editor, does it matter how long it takes to learn the editor?

I want to learn vim.
But I am so used to using a mouse and stuff...

if learning the editor, over the long run, will save you time

vim has a mouse support function too

gvim does

There's a GUI edition of VIM out there. GVIM i believe?

flung, even standard vim

ORLY?
I don't use the mouse either way, so I don't know

set mouse=a
in vimrc for example

the mouse support will only put you off...

vi vi vi is the editor of the beast (think of it in latin numerals)

damn, I still can't get a content of a XML hosting tag into a string variable

how are you doing it?

I have a curl getting some unparsed xml (no xlst)

i have some scripts doing that aswell

then I search for string tagname

having trouble with fputs guys

Thumann, can I take a look ?

hang on

I'm having problems with multiple tags

has anyone experienced issues with an inlcude('') within an include('')ed file silently failing? I'm running PHP5 on WinXP (for development)?
i have, say page.php which contains include('../objects/database.php'), and database.php contains include('config.php') which simply contains some config variables

wtf? MSExchange has a 75GB mail store limit?

if i run database.php, config.php is included fine, if i run page.php then database.php is included, but config.php is not included in that and no warning is given

I think it may look for config.php in the same dir as page.php

muahahahaha

am I wrong?

flung, didn't think of that, will try adjusting for that
that's done it

not likely

why are you laughing at me?

weird, i would have expected PHP to give a warning if it couldn't find the file, that appears to have worked though

not at you. At Exchange.
if you don't have the error reporting level high enough, it won't

have you got display_errors on?

yup, god knows i've seen plenty of errors so far

Oh. Their solution is 'clean out your mailbox'

how unsurprising

and if i mess up the file name in an include statement directly inside the page i run i get a warning

error_reporting(E_ALL)
that's why you should use require() and notinclude()

yo mike you're usually a pro at this
i've done a super pastebin ~ http://pastebin.zentrack.net/11753
Commented what i'm trying to do, code, & output

http://pastebin.ca/614083

Thumann,

i've tried require, it has the same effect
i.e. no warning given, and it doesn't break execution

see fgetcsv/fputcsv and tempfile()

Thumann, I was reading PHP DOM http://www.geekpedia.com/tutorial156_How-to-read-XML-using-PHP-DOM.html

I use this on a really.. really big array

tmpfile(), that is

Thumann, is it fast?

yeah, but simplexml is also great
i use that here and there aswell

Thumann, thanks, I'll try to use it

FFFFFFFFFFFS i just found my problem
this is nuts

Hi guys, is it possible to search/count an array and have it return the number of times a value is XYZ ?

count(array_search($search, $array)) ?

php.net/array_search

stop
the above is wrong.

mine is right though

see array_count_values()

php.net/array_count_values is better

Mace[work]: i tried array_count_values() but it complained about only being able to count .. umm.. strings and integers i think

as opposed to?

objects

try array_keys with the optional search_value

far out

He's right, it can't count boolean etc

i've had a problem for ages

Hey

and i never knew it was because in my fgetcsv, i had handle 1000 characters which was cutting out because there was more than 1k chars

Thumann, thank you ^_^ worked flawlessy

cheers

o/

Would there be any reason why php isn't reading my php.ini (CentOS)?

doesn't it limit to 1024 anyway?

make a phpinfo() page and check which php.ini it's using, and edit the correct one

continue; goes to the next iteration of a forloop right?
for($j = 9 $k = 9; $j count($arr2); $j++) {
$j = 9 k=9

I am

what is it not parsing then?

display_errors

hi

http://www.pastebin.ca/614093

I want to access a website via PHP. So... I have the site URL, a username and a password. How can I access the website data via PHP??

well, if error reporting isn't being disabled in your scripts, and you have the syntax correct in your php.ini, and you have restarted your apache for the changes to take effect, then no clue
curl
Mace[work]: bad example, since all of them are 70 in this case, but it does vari..

how do you kill a php script on your web server which has begun an infinite loop?

find the pid of the process, then kill it.

tx!

hi all - does anyone here use the komodo ide - i wondered if the automated code hints included php code libraries that have been developed by individuals or just the core php functions

random question, someones asked for some example php code, which i dodn't have to hand, however i could code some up, does anyone have an idea on what i could code to show off my php skills?

something that ticks all the boxes?
OOP, database access, etc
that's probably all they're looking for
something that uses sessions to persist a user login based on a users database table as well would probably be good i guess

#phpc

ffs

JaredCE, code a Google like app, that will impress them

ok thats given me something to think about, thanks

i was joking -_-!

my apologies didnt know that room existed

this is valid right? while(strlen($arr2[$k][10]) 1) { $k++; }
cause it's causing serious lag to my script when i use it
reading a 20,000 row CSV, 10,000 of those rows have an empty [10] field. so i'm trying to skip those

maybe you want to do some caching?

cache what

the results

what results
how

ah
sorry, i thought you read 20k results on each request

ok,, i have a timestamp in mysql table,, i want to select records which don't have the timestamp within the last 48 hours
is there an easy way to do that?

nah

in the sql rather than converting to unix timstamp in php and re-checking against that?

http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_timediff

i read the 20,000 row csv into an array
then i roll through each row & assign it to a new array but in different order

rza, hmm, thanks.. i'll read

so the idea is to read a csv into array, create new array, populate the new array with the other array, but in a different order & then rewrite to file
while(strlen($arr2[$k][10]) 1) { $k++; } the script seems to take a hell of a lot longer

or == "" ?

ok ill try that

hmm same

will try == ''
rather than strlen

because you're looping through 20000 rows maybe?

could be the cause i guess.
nah i think its the strlen() on 20,000 rows thing

hmm then its more likely to be the file operations
the while is not that heavy

lets see how this goes

how do you read the lines ?

fgetcsv
to array
for($j = 9; $k count($arr2); $j++) { $arr[$j][0] = $arr2[$k][10];


Related Topic:

If i setcookie to expire in the past the browser should kill the cookie well my script cant find the cookie anymore
Current app im working on has a MM relationship between sherpas and the territories they cover currently the app
Ok perhaps this isnt the right channel for this but since I am doing some PHP work I wondered if you could help