Re: [PHP] How to point at a spot and get relevant information?

2003-08-14 Thread skate
> > > Dear all, > > > > Anybody knows how to write a graphic plotting code such that when users > > point > > at that spot, they can get the information relevant to that spot? Thanks > > in advance. > > that'd be pretty intense. to do this feasbly with PHP, you'd have to analyse the picture fir

Re: [PHP] greedy preg

2003-08-14 Thread skate
> Do you need to use ".*?"? If there will be only white characters, use > \s* instead. > unfortunately there's some content either side of $file before this content is different for each item, so i can't define it in the pattern. -- PHP General Mailing List (http://www.php.net/) To unsubsc

Re: [PHP] magical file writing truncation

2003-08-14 Thread skate
> > [snip] > > $newFile = "xml/".$type."/".$now.".xml"; > > while(file_exists($newFile)) > >$newFile = "xml/".$type."/".$now++.".xml"; > > $text = $_POST['text']; > > $text = urlencode(stripslashes(nl2br($text))); > > [/snip] > > ack, sorry to double post... it appears that it actua

Re: [PHP] magical file writing truncation

2003-08-14 Thread skate
Let's work backwards then. Instead of $text = urlencode(stripslashes(nl2br($text))); try $text = urlencode(nl2br($text)); echo "$text"; Can you post the first couple of raw lines of text and then the echo'd output? -- okay, the first few lines of raw text are as follows... it's a c

Re: [PHP] find string

2003-08-14 Thread skate
> > if ($action!='a1' || $action!='a3') //tried == also > { > //do stuff > } > else > { > //do other stuff > } > the logic behind this particular one doesn't work... if it's either not one, or not the other... it'll always be true... unless both are set to exactly the same... the logic if($actio

Re: [PHP] send group of files at once to website administrator

2003-08-14 Thread skate
> Hi, > > I have the following code which I use to make regular backups of my > databases. Is there a way to have all backup files sent at once after they > are created, istead of presenting the list of files available for download? > send an email... there should be plenty of mime mailers aro

Re: [PHP] Half solved (was foreach in search)

2003-08-14 Thread skate
> > $someVar=$test[0]. "&" .$test[1]. "&" .$test[2].etc > $someVar = implode( "&", $test ); ... should do the trick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] magical file writing truncation

2003-08-14 Thread skate
anual. i'm not passing by reference as far as i know, but this is the only way i can think of what the problem can be. FYI: i'm using urlencode as certain characters are causing problems with the XML structure of my files, and this seems to solve it nicely. h

Re: [PHP] magical file writing truncation

2003-08-14 Thread skate
[snip] i really can't get my head around this one at all. could it possibly be a windows issue??? i know windows can be an arse in dealing with files, but i can't see how it could pick up on a variable inside PHP and truncate it? [/snip] I just have one more thought because you brought up Window

Re: [PHP] greedy preg

2003-08-14 Thread skate
> And what about [^>]* -if there are no html tags > not thought about that, but XML tags, not HTML tags... does that make any difference? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] greedy preg

2003-08-14 Thread skate
> Not sure if I understand you correct but > the way you wrote your replace pattern the result should be > . > If you want just the file to be replaced you have to use something like > preg_replace("|.*?($file).*?|si",'\\1',$contents) > no, i want just the whole replaced for that particular file

Re: [PHP] ignore_user_abort()

2003-08-14 Thread skate
> Are there any disadvantages to turn on this feature? > > what if someone submitted the wrong info? or maybe the wrong credit card details? they genuinely might want to abort. although to be fair, these people are the stupid ones the need to be punished and banned from the PC. i can't think of

Re: [PHP] magical file writing truncation

2003-08-14 Thread skate
I didn't see anything right off of the bat. You may want to output the text both ways and then compare them using http://us3.php.net/manual/en/function.strcmp.php apart from the fact that the slashes are there in one, and not in the other, there is no difference... $fp = fopen($n

Re: [PHP] greedy preg

2003-08-14 Thread skate
$contents = preg_replace( "|.*?".$file.".*?|si", "", $contents ); okay, so i figured out that it's matching the first occurence of which will always be the first record and then going on to match the $file and deleting everything between. obviously not what i want. without giving a unique attri

Re: [PHP] Half solved (was foreach in search)

2003-08-14 Thread skate
> implode.why the [EMAIL PROTECTED] didnt i think of that?? > Thanks dude. > Just one last question, the last variable i am getting is page=1, how do i > increase this? > Basically I need to do a $page++ > so do it then $xxx=0; foreach ($_GET as $a => $v) { print "Current value of \$a

Re: [PHP] greedy preg

2003-08-11 Thread skate
> > You cannot store file pointers. If you output the variable it's going to > look something like "Resource ID #1" which is meaningless except to the > instance of the script that created it. Or did you mean something different > by "$file pointer"? sorry, wrong words... when i meant $file is

Re: [PHP] Correct Coding

2003-08-11 Thread skate
> That can generate an error if $Task was never assigned a value. > could you not do if(@$Task == "Add" ){do something } to suppress the error of the variable not being set? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] magical file writing truncation

2003-08-10 Thread skate
[snip] Session+Start+%28Yahoo%21+-+fatcubanskate%3Athe_lady_in_waiting1982%29%3 A+Th u+Jul+10+21%3A23%3A42+2003+%3Cbr+%2F%3E%0D%0A%5B21%3A23%5D+the_lady_in_w aiti ng1982%3A+hey+sexy%21%21%21+%3Cbr+%2F%3E%0D%0A%5B21%3A24%5D+fatcubanskat e%3A +hey+sugar+%3Cbr+%2F%3E%0D%0A%5B21%3A24%5D+fatcubanskate%3

Re: [PHP] magical file writing truncation

2003-08-09 Thread skate
> > obviously there's no simple solution here... can anyone point me in the way > of an alternative way of doing this? i could try the file write in 3 stages, > first part of content, text, end of content, as they seem to write fine > seperatly. > this is magical, evening seperating the file open

Re: [PHP] magical file writing truncation

2003-08-08 Thread skate
> [snip] > $newFile = "xml/".$type."/".$now.".xml"; > while(file_exists($newFile)) >$newFile = "xml/".$type."/".$now++.".xml"; > $text = $_POST['text']; > $text = urlencode(stripslashes(nl2br($text))); > [/snip] > > At this point (for testing putposes) I would echo "$text"; and start >

Re: [PHP] Flash Actionscript List or Forum

2003-08-08 Thread skate
on't know if flash supports any truely global stuff... although i could be wrong, coz i'm a flash 5 boy, and haven't done much mx'ing yet... -skate- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Attention everyone 0-t

2003-08-08 Thread skate
> > any ideas on what we can do about it? > set the server up to change the sent from email address to [EMAIL PROTECTED] this'll not only stop the spambots and spam blockers picking up on individual email address', but also means that when people reply to all, that you don't get 2 emails in resp

[PHP] greedy preg

2003-08-07 Thread skate
$contents = preg_replace( "|.*?$file.*?|si", "", $contents ); it's being run on an XML file, where each entry is .. with a $file pointer in there. it works okay, except for the fact that it deletes that record, and every record before it. i can't figure out why it's being greedy? i know i

Re: [PHP] greedy preg

2003-08-06 Thread skate
> What are the possible values of $file? Are you looking to replace just a > specific occurance of a $file between tags? Maybe this will help: > > $contents = preg_replace("|[^<]*$file[^<]*|si","",$contents); > > or just use the 'U' modifier for "ungreedy"... > i'm looking to replace the entire

Re: [PHP] greedy preg

2003-08-06 Thread skate
> > Yeah, it should be. What kind on content can be around $file and also > within the tag? > here's a snip of the xml file... it's finding the $file correctly, but deletes all records from the beginning of the file onwards. it leaves the xml file with valid xml ... at the start... so for the

[PHP] easier than switch

2003-08-04 Thread skate
okay, so i know there's an easy way to do this, and i've seen it done, sure of it. so please forgive the stupidity of my question, i don't even know where to begin to look in the archives either... i have several forms on one page, they all submit a different variable, i then want to set one va

Re: [PHP] connecting access (*.mdb) database with PHP

2003-08-02 Thread skate
> how can I connect access database(*.mdb) with php? what is the code? I > will be happy if you write php code. > > damn, i'd be happy if other would write my code too... check out the COM connections in the manual. best place for you to start, should be able to connect to most ms applicati

Re: [PHP] Using eregi_replace()

2003-08-01 Thread skate
last delimiter, but still inside the expression. read up in the manual, as the posibilities of PREG are enourmous... -skate- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Trouble getting $HTTP_RAW_POST_DATA

2003-08-01 Thread skate
> Since print_r is usually used for debugging, it would be nice that > php does this for you. Any comments on this before i throw the > idea to the php-dev list? > if it's just used for debugging, can't you just use the tags around it? i mean, it's no big deal, and you don't really need it forma

Re: [PHP] Simple Math Calculation Problem....

2003-08-01 Thread skate
> The int() function is for C/C++ programming only. This Int() function is > not supported in PHP. In PHP it would be Intval(). For float, Floatval(). > For double, DoubleVal(). Etc. But beware of the Octual numbers. > sorry, confusing my flash action script again :( -- PHP General Maili

Re: [PHP] Simple Math Calculation Problem....

2003-08-01 Thread skate
>$Days = (($clockDate - $inputDate) / (24 * 3600)); $Days = int(($clockDate - $inputDate) / (24 * 3600)); you tried that? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Trouble getting $HTTP_RAW_POST_DATA

2003-08-01 Thread skate
> Also, print_r() does not include any HTML formatting, so you will need to > look at the source for the page in the browser to make it readable. or your could use ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] splitting content into pages

2003-07-31 Thread skate
>Another solution would be to abandon the idea of a fixed size >background. Try to make it variable instead. althought not the most cross browser effective, you could also try some css to fix the background... style="background-repeat=none" should do the job. -- PHP General Mailing List (h

Re: [PHP] Right Click Hyperlink

2003-07-31 Thread skate
> Does anyone know if there is anything in PHP or any other language that > would > you can't do this in PHP, physically impossible. you also can't do it with any other server side language. the only way to do it is with a client side language, such as the JavaScript ways posted, or possibly the

Re: [PHP] Possible My Website was hacked... with PHP... please tell me what this is???

2003-07-31 Thread skate
> Although this is a very good idea it would only benefit people who had > access to their own installation of PHP. Most people are only able to use > PHP on a shared server so perhaps wouldn't have access to the php.ini > file. > but then most service providers could protect themselves? i don't

Re: [PHP] Possible My Website was hacked... with PHP... please tell me what this is???

2003-07-31 Thread skate
hould be a new post, but this is kinda following on, so please forgive me :) -skate- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: How can I add records to database every 60 minutes???

2003-07-30 Thread skate
>i take it scripts are being called over and over right? if so then add a > time function to one of those scripts. when gameplay starts load the time to > mysql (or a file) and then everytime the script is run check the time to see > if the time has exceeded 60 minuets, if it has run you php s

Re: [PHP] List Problems

2003-07-28 Thread skate
> Any body else getting a message back with subject like: > [ERR] Re: [PHP] subject of message. > yeah, i'm getting that every now and then. maybe 1 or 2 a day tho... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Dynamically generate a drop down list

2003-07-28 Thread skate
print ""; } > > I tried doing something of this sort..but didn't work.. > Any suggestions? > Thanks in advance, > Mukta > hope it works, this is just from the top of my head... -skate- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Array help

2003-07-28 Thread skate
>because in reality I don't have just these 4 fields > but 43 fields in one table that have to be taken. "Select *..." seems a much > easier way to get it > you have 43 fields in 1 table? if you are seriously considering offering hosting packages, then i'm guessing your wanting to be half prof

Re: [PHP] How is this possible?

2003-07-27 Thread skate
the date print ""; print "DATE"; for( $i=0; $i<$n; $i++ ) print "".$content[date][$i].""; print ""; } print ""; ?> like i said, this isn't the most glamorous way of doing it, and you really should look this

Re: [PHP] How is this possible?

2003-07-27 Thread skate
0][1]; display[monthlyfee][] = $result[1][0]; display[monthlyfee][] = $result[1][1]; ... and so on. not sure if i'm explaining this very well, or with the greatest syntax, but hopefully you get the idea... -skate- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Flash Variables

2003-07-27 Thread skate
he filename, include your variables as you would using GET... this will pass the variables directly into _root in your flash movie where you can utilise them from there. this should solve your problem. although please excuse any syntax error

Re: [PHP] Your E-Book

2003-07-27 Thread skate
dammit!!! the link doesn't work... i was REALLY excited to find out what my boss doesn't want me to know!!! it's also reassuring to know (reading at the bottom) that this is NOT SPAM!!! i feel safe knowing that this isn't actually spam, and that all members of this list actually requested this em

Re: [PHP] Link acting as a submit button

2003-07-25 Thread skate
what is the javascript on it? sorry, missed the start of the thread... - Original Message - From: "Matt Palermo" <[EMAIL PROTECTED]> To: "Comex" <[EMAIL PROTECTED]>; "php-general" <[EMAIL PROTECTED]> Sent: Friday, July 25, 2003 1:05 PM Subject: RE: [PHP] Link acting as a submit button >

Re: [PHP] File upload

2003-07-25 Thread skate
could be a problem with the post settings in apache? i know apache sets some restrictions on the size and what's allowed. can't see how it'd be a linux problem... does the file appear in your tmp directory at all? - Original Message - From: "Jonas Thorell" <[EMAIL PROTECTED]> To: "'Peda'"

Re: [PHP] need help

2003-07-24 Thread skate
check out sourceforget.net, lots of web applications on there for hosting management, and i believe there's a few email applications. - Original Message - From: "dan montgomery" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 24, 2003 12:55 PM Subject: [PHP] need help >

Re: [PHP] I'm really getting annoyed with PHP

2003-07-23 Thread skate
you could also shove some JavaScript in there if you don't like the way the PHP header("location:...") function works... location.href="new_page.php"; of course corrections for my bad syntax as i'm doing this out of my head. but anyway, just PHP to print that script when you want a redirect

Re: [PHP] USB Flash Drive

2003-07-23 Thread skate
do a search on autorun.inf, that's the file that autorun's CD's. although i dunno if it'll work with a USB flash drive... can't hurt to try i guess... and as mentioned, this has nothing to do with PHP... - Original Message - From: "Digital Directory USA, Inc" <[EMAIL PROTECTED]> To: <[EM

Re: [PHP] I need a PHP alternative to Windows Scheduled Tasks

2003-07-23 Thread skate
e PHP script to run when you need it, rather than the PHP script waking up and doing it's stuff when it should... - Original Message - From: "skate" <[EMAIL PROTECTED]> To: "Phil Powell" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTE

Re: [PHP] I need a PHP alternative to Windows Scheduled Tasks

2003-07-23 Thread skate
you could have a look at AINTX, it's a windows port of the *nix cron alternatively, if you've got a few bucks lying around, go buy yourself a really old PC, install *nix on it, and use that to run your scheduled cron's. they're much more reliable and obviously, if your not using that machine, then

Re: [PHP] Hi

2003-07-23 Thread skate
the poker game is actually really weak anyway... a pair of 6's shouldn't win anything... - Original Message - From: "Rausch Alexandru" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 22, 2003 9:42 AM Subject: [PHP] Hi MYSQL problems problems. I want to install an user lo

Re: [PHP] Register Globals

2003-07-21 Thread skate
a good editor with a good find and replace tool... i know dreamweaver MX can do a find and replace for an entire site once you've defined it. - Original Message - From: "Daryl Meese" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 21, 2003 1:17 PM Subject: [PHP] Register G

Re: [PHP] Mac Address Lookup

2003-07-18 Thread skate
very little chance, a machine won't transmit it's MAC address, that the main point of the TCP/IP stack is to convert IP address' into MAC address' at routers and such. - Original Message - From: "Ashwin Kutty" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, July 18, 2003 5:19 PM

Re: [PHP] omitting the #!

2003-07-18 Thread skate
yeah, your currently running php through cgi on your live server, just install php as a proper module, and you should be good to go. you may also be able to stick a header on every page that includes the #!. not 100% with this tho, you'll have to have a look into it... - Original Messag

Re: [PHP] Still problem with files

2003-07-18 Thread skate
have you tried \r\n ? - Original Message - From: "Beauford.2005" <[EMAIL PROTECTED]> To: "'Curt Zirzow'" <[EMAIL PROTECTED]>; "'PHP'" <[EMAIL PROTECTED]> Sent: Thursday, July 17, 2003 3:40 PM Subject: RE: [PHP] Still problem with files > For whatever reason your suggestions still caused

Re: [PHP] Mail From option in PHP.ini

2003-07-18 Thread skate
the sendmail_path in php.ini is to do with where abouts the sendmail program is located, not where your sending mail from... if you define the extra headers in the mail, such as FROM and REPLY-TO, you shouldn't have any problems. basically, it's just like fake-mail, and your recipient should be no

re: [PHP] Zip to postcode

2003-04-02 Thread skate
sorry, don't have anything to add for code, but just a note to remember that UK post codes can also be in the form... QQ11 1QQ Q1 1QQ Q11 1QQ QQ1 1QQ so it's a real pain to write an expression for this... -skate- Can someone please tell me how i change the following code: if (!e

Re: [PHP] Php.ini doesn't exit

2003-04-02 Thread skate
you can set _some_ directives directly in php check the manual for the set ini options, can't remember the exact function... php will work without an .ini file, but will have all defaults set. again, check thru the manual to see what the defaults are. - Original Message - From: "Javier C

Re: [PHP] Newbie

2003-04-02 Thread skate
could this not also be solved by switching register_globals as on? reading through the error, it looks like that's what it's complaining about. there is security risks to turning this on, which is probably why it doesn't suggest doing it, but depends how secure you need your site to be? and also ho

Re: [PHP] Array Question

2003-04-01 Thread skate
look into things like JOIN and SORT BY in MySQL, they're quicker and more efficient than PHP for doing DB stuff (so i'm told) took me awhile to get my head around JOIN, but once you've got it, you'll never be without it ;) "Mark McCulligh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTE

Re: [PHP] question

2003-03-30 Thread skate
ahkay, makes perfect sense now :) thanks - Original Message - From: "Don Read" <[EMAIL PROTECTED]> To: "skate" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, March 30, 2003 2:19 PM Subject: Re: [PHP] question > > On 30-Mar-2003 sk

Re: [PHP] question

2003-03-30 Thread skate
excuse me for being dumb, but can you explain this line for me? if (! (++$i % 2)) i've done scripts like this before, but never used anything like this? but then i never was a great coder :) thanks - Original Message - From: "Don Read" <[EMAIL PROTECTED]> To: "Marius" <[EMAIL PROTECTED]

Re: [PHP] Passing data between the web to an Intranet

2003-03-26 Thread skate
as another solution (and not knowing mysql replication myself, so can't comment on this) you could connect remotely to your MySQL database that is on your intranet, and dump the data straight into it. it really depends how open to the world that system is, or can be, and how security concious you a

Re: [PHP] Persistent connections with mysql_pconnect()

2003-03-25 Thread skate
> Sent: Tuesday, March 25, 2003 5:11 PM Subject: [PHP] Persistent connections with mysql_pconnect() > On Tuesday 25 March 2003 09:02 am, "skate" <[EMAIL PROTECTED]> wrote: > > leaving the connection open creates security questions, > > and also leaves resources ope

Re: [PHP] connecting to mysql db

2003-03-25 Thread skate
again, this can be a security risk. i'm afraid the best way is to include connection code on every page... -- skate - fatcuban.com "Iggy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > This really doesn't explain me much. I mean the difference betwee

Re: [PHP] substr() on part an ereg() capture

2003-03-25 Thread skate
couldn't you just do substr( $blah, 0, 55) or something similar? (i'm crap with syntax, so that's just off my head...) -skate- fatcuban.com - Original Message - From: "Justin French" <[EMAIL PROTECTED]> To: "php" <[EMAIL PROTECTED]> Sent