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:$a and

Re: [PHP] greedy preg

2003-08-14 Thread skate
$contents = preg_replace( |item.*?.$file..*?/item|si, , $contents ); okay, so i figured out that it's matching the first occurence of item 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 item a

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 news/news. If you want just the file to be replaced you have to use something like preg_replace(|item.*?($file).*?/item|si,'\\1',$contents) no, i want just the whole item/item replaced for

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

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 =

[PHP] magical file writing truncation

2003-08-14 Thread skate
, 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. help??? much appreciated... -skate- code

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

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 around,

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($action==a1 ||

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

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 actually reverse truncates the

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 item/item 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

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 first with the GD

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

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

Re: [PHP] magical file writing truncation

2003-08-09 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 looking for clues. If I

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, and

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

Re: [PHP] Flash Actionscript List or Forum

2003-08-08 Thread skate
... 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

[PHP] greedy preg

2003-08-07 Thread skate
$contents = preg_replace( |item.*?$file.*?/item|si, , $contents ); it's being run on an XML file, where each entry is item../item 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

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 item 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 ... news at the start... so for

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 item tags? Maybe this will help: $contents = preg_replace(|item[^]*$file[^]*/item|si,,$contents); or just use the 'U' modifier for ungreedy... i'm looking to replace the entire

[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

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

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 pre.../pre -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

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 pre tags around it? i mean, it's no big deal, and you don't really need it

Re: [PHP] Using eregi_replace()

2003-08-01 Thread skate
, 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] Possible My Website was hacked... with PHP... please tell me what this is???

2003-07-31 Thread skate
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] 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 see

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

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

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

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

Re: [PHP] Dynamically generate a drop down list

2003-07-28 Thread skate
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] 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] 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

Re: [PHP] Flash Variables

2003-07-27 Thread skate
there. this should solve your problem. although please excuse any syntax errors, this is straight from the top of my head... -skate- -- 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

Re: [PHP] How is this possible?

2003-07-27 Thread skate
][] = $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] How is this possible?

2003-07-27 Thread skate
(and you have a db to back it up) you should get a table with the format i think your after... Thanks, -Ryan no probs, hope my sloppy code helps you a little ;) -skate- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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] 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 Actually, I

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 need

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 login

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,

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

2003-07-23 Thread skate
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 PROTECTED] Sent: Wednesday, July 23, 2003 10:23 AM Subject: Re: [PHP] I need

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: [EMAIL

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... script language=JavaScript location.href=new_page.php; /script of course corrections for my bad syntax as i'm doing this out of my head. but anyway, just PHP to print that

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

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

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 me problems,

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

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

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

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 (!ereg(^[0-9

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

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

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 skate wrote: excuse me for being dumb, but can you explain

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

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: Tuesday, March 25, 2003 1:24 PM Subject: [PHP] substr

Re: [PHP] connecting to mysql db

2003-03-25 Thread skate
in there, but 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 between having that code on every page

Re: [PHP] Persistent connections with mysql_pconnect()

2003-03-25 Thread skate
: [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 open, what if a user closes his browser window, how do you know to close the connection