Re: [PHP] Mail in Spam Box

2006-06-18 Thread Rabin Vincent
On 6/18/06, kartikay malhotra [EMAIL PROTECTED] wrote: I've use PHP mail to send mail to my Gmail ID. But it gets delivered to my Spam box and not the Inbox :( Am I missing a header, signature, certificate? You're probably missing a header, but, who knows, you haven't shown us any code.

Re: [PHP] ImageCopyResized() function

2006-06-18 Thread Rabin Vincent
On 6/18/06, BBC [EMAIL PROTECTED] wrote: is any one know how to use these functions, and what for are they: imagecreatetruecolor(); imagecreatefromjpeg(); ImageCopyResized(); ImageDestroy(); php.net/imagecreatetruecolor php.net/imagecreatefromjpeg php.net/imagecopyresized php.net/imagedestroy

Re: [PHP] How to run one php app from another? RECAP

2006-06-16 Thread Rabin Vincent
On 6/16/06, tedd [EMAIL PROTECTED] wrote: So, what say you fine php people, can anyone give me an example of a php application running (i.e., calling) another? What about something like the code below? I use an extension of that to fake some threading/multi-processing. echo

Re: [PHP] Accepting File Uploads from CURL

2006-06-15 Thread Rabin Vincent
On 6/15/06, Brad Bonkoski [EMAIL PROTECTED] wrote: Hello All, I am using PERL to generate an XML file from a database query. no problems there. I then try to use curl to send it to an upload script. Essentially the command line looks like this: curl -H 'Content-Type:text/xml' -d file.xml

Re: [PHP] PHP6 build help

2006-06-14 Thread Rabin Vincent
On 6/14/06, Rory Browne [EMAIL PROTECTED] wrote: Only if (s)he''s on a debian based linux distro. I see from his configure output, that he's on Linux, but what makes you think he's on Debian ( or on a system with apt-rpm ) ? The first line of Ligaya's email said: Ubuntu Breezy Badger, AMD

Re: [PHP] Problem with the passthru function

2006-06-14 Thread Rabin Vincent
On 6/14/06, Venkatesh Babu [EMAIL PROTECTED] wrote: I have a small php file (test.php) whose code is shown below: ?php $retval=1; $command='/bin/ls'; passthru($command, $retval); print(Exit status: . $retval); ? This test.php works fine when I execute from command prompt as

Re: [PHP] PHP6 build help

2006-06-13 Thread Rabin Vincent
On 6/14/06, Ligaya Turmelle [EMAIL PROTECTED] wrote: Richard Lynch wrote: You realize that compiling PHP6 from CVS is, errr, not really for newbies... :-) Yeah - I know. but I am helping out the php qa team by writing some phpt tests... and they prefer (though don't require) the tests also

Re: [PHP] weird problem in php

2006-06-12 Thread Rabin Vincent
On 6/12/06, weetat [EMAIL PROTECTED] wrote: I have a form which have select tag which have the value for example -New York. When use submit the form , i need to find the first occurence of - , i use strpos function as shown below : $country = $_POST['country']; $findme = '-'; $pos =

Re: [PHP] Video compression with php?

2006-06-12 Thread Rabin Vincent
On 6/12/06, Merlin [EMAIL PROTECTED] wrote: I am searching for a way to convert video during an upload to a flash format including compression. Is there any php module which does something like that? I know that there is a lot out there for images, but for videos? Look into ffmpeg. I think it

Re: [PHP] Video compression with php?

2006-06-12 Thread Rabin Vincent
On 6/12/06, Merlin [EMAIL PROTECTED] wrote: yes you are right there is a php extension for ffmpeg. However as I learned from their sourceforge page is, that this sw does only enable one to get snapshots out of a video, but not to convert and compress ist. What I am looking for is a software

Re: [PHP] remove keys from array

2006-06-11 Thread Rabin Vincent
On 6/11/06, Ahmed Abdel-Aliem [EMAIL PROTECTED] wrote: when i have array in the form of : Array ( [0] = 2 [ID] = 2 [1] = asdasd [CategoryName] = asdasd ) ) how can i make it in the form of : Array ( [ID] = 2 [CategoryName] = asdasd ) ) To remove a single element you can use unset:

Re: [PHP] Mail sending program (beginner)

2006-06-10 Thread Rabin Vincent
On 6/10/06, aci india [EMAIL PROTECTED] wrote: NOTE: Sorry for the very long code Please paste long code snippets in a website like pastebin.com. Also, the code is hard to read because of the complete lack of indentation. I suggest you atleast attempt to debug your code before posting it

Re: [PHP] Multidimension Array

2006-06-09 Thread Rabin Vincent
On 6/9/06, weetat [EMAIL PROTECTED] wrote: How to get the array value in the [TBA04490054] and [JAE070406RT] ? For example , [0] = 'SAD04520AZD' ,[1]= 'SAL04430RE9' and so on. Anybody have any ideas or suggestions how to do it ? Thanks - weetat Array ( [TBA04490054] = Array

Re: [PHP] arrays

2006-06-09 Thread Rabin Vincent
On 6/9/06, Jesús Alain Rodríguez Santos [EMAIL PROTECTED] wrote: if I have two arrays, example: $a = array (one, two, three, four, two); $b = array (seven, one, three, six, five); How can I get in another variable a new array with the same elements into $a and $b. php.net/array_intersect

Re: [PHP] Skip first 4 array values

2006-06-09 Thread Rabin Vincent
On 6/9/06, Jonas Rosling [EMAIL PROTECTED] wrote: Is there any way you can skip for example the first 4 array values/posisions in an array no matter how many values it contains? php.net/array_slice if you want to cut them off. Rabin -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] popup window from php page

2006-06-08 Thread Rabin Vincent
On 6/8/06, William Stokes [EMAIL PROTECTED] wrote: How do I open a popup window from php code when a web page is loaded? Does it require javascript usage? Yes, this needs to be done with Javascript. Google will help you on this. Rabin -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Running Scripts from the Command Line in Linux

2006-06-08 Thread Rabin Vincent
On 6/8/06, OOzy Pal [EMAIL PROTECTED] wrote: How can I run a .php script from the command in Linux? $ php yourscript.php Rabin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Getting totals

2006-06-07 Thread Rabin Vincent
On 6/7/06, Rob W. [EMAIL PROTECTED] wrote: I got the fix, strstr didnt work right because it was relaying more than just what I was thinking. Here is the fix. $value=array(strstr($block, $address)); foreach ($value as $var) { $block_total_ip++; } How can this work? $value

Re: [PHP] Getting totals

2006-06-07 Thread Rabin Vincent
On 6/7/06, Rob W. [EMAIL PROTECTED] wrote: Yeah, it counts how many times block is in $address, so if there's 254 ip's listed in the database, it will incriment it 254 times and display that. Well, the code snippet you've shown does NOT do any kind of checking to see if $block is in $address.

Re: [PHP] HTTP ERRORS Boolean

2006-06-07 Thread Rabin Vincent
On 6/7/06, Rodrigo de Oliveira Costa [EMAIL PROTECTED] wrote: Guys is there a way that I can call the func file(www.url.com) and get a result true if there is a page and false if the page doesnt exists (error 404)? This would work, but will not specifically check for a 404: $page =

Re: [PHP] file( ) function

2006-06-07 Thread Rabin Vincent
On 6/8/06, Mayank Maheshwary [EMAIL PROTECTED] wrote: $name = $_POST[filename]; $lines = file($name); $i = 0; $len = sizeof($lines); //echo $i; while($i $len) { //echo $lines[$i]; $temp = $lines[$i]; $temp = trim($temp); //echo $temp; if($temp1 ==

Re: [PHP] Getting totals

2006-06-06 Thread Rabin Vincent
On 6/6/06, Rob W. [EMAIL PROTECTED] wrote: So far what I have gotten is a stristr match but it's not working correctly. I have a variable that basically weed's out the last digits of the ip it's self from help previously So my code so far is: if (stristr($block,$address)) { $count_ip++; }

Re: [PHP] Getting totals

2006-06-06 Thread Rabin Vincent
On 6/7/06, Rob W. [EMAIL PROTECTED] wrote: Sorry for the miss understanding, That's the way the viarable will look, i'm putting it in as a viariable. if (strstr($block,$address)) { $inc++; } Like I said before, strstr's argument list is haystack (what to search in) first and then needle

Re: [PHP] Delete

2006-06-04 Thread Rabin Vincent
On 6/4/06, Larry Garfield [EMAIL PROTECTED] wrote: Make each button a separate form, with the id as a hidden value. Like so: div form method='post' pMy first entry/p input type='hidden' name='id' value='1' / input type='submit' value='Delete' / /form /div [snip] You may find it easier to

Re: [PHP] Delete

2006-06-04 Thread Rabin Vincent
On 6/4/06, Larry Garfield [EMAIL PROTECTED] wrote: Only if delete.php is a confirmation page. Never ever ever have a delete function that operates solely by GET. Here's why: http://thedailywtf.com/forums/thread/66166.aspx Yes, I've seen that one before. IMO the main problem there is the

Re: [PHP] php java intregration

2006-06-03 Thread Rabin Vincent
On 6/2/06, Vedanta Barooah [EMAIL PROTECTED] wrote: i am setting up php_java.dll extension under windows/iis, my php version is 5.1.2. can any one point me to the download location of php_java.jar which is needed for the setup. Download Collection of PECL modules for PHP from the Windows

Re: [PHP] ASCII Chars Only

2006-06-03 Thread Rabin Vincent
On 6/3/06, Richard Collyer [EMAIL PROTECTED] wrote: Hello, Trying to get the following working. I am trynig to select only ASCII characters (not extended ASCII) so that if the string contains characters outside the 32 - 126 range of good characters then $Discard is returned as 0. But it is

Re: [PHP] Delete

2006-06-03 Thread Rabin Vincent
On 6/4/06, George Babichev [EMAIL PROTECTED] wrote: Hello everyone! I wrote a blog application, but now for the admin panel, i am trying to add a feature to delete blog posts. It would show the title of the post next to it, and have a delete link which would delete it. How would I do this? I

Re: [PHP] php java intregration

2006-06-03 Thread Rabin Vincent
On 6/4/06, Vedanta Barooah [EMAIL PROTECTED] wrote: the pecl snapshots have the dll php_java.dll, but does not have the jar php_java.jar which is also required? I don't know about the snapshots, but the PECL zip on the download page does have the jar you are looking for. Rabin -- PHP General

Re: [PHP] HTML Mail script reading text from MySQL

2006-06-02 Thread Rabin Vincent
On 6/2/06, Tom Chubb [EMAIL PROTECTED] wrote: What I meant is say a page outputs an HTML table eg: table width=100 cellspacing=0 cellpadding=0 [snipped] /table But I want to get that code into the $message variable. I have written many mail scripts before it's just getting the data into the

Re: [PHP] $_FILES doesn't work but $_POST works

2006-05-31 Thread Rabin Vincent
On 5/31/06, kartikay malhotra [EMAIL PROTECTED] wrote: However, with Mbuni MMS Gateway (which provides HTTP POST), the above condition in if loop isn't satisfied. I think $_FILES isn't working. However the following code works: ?php $in='/usr/share/wallpapers/alien-night.jpg';

Re: [PHP] $_FILES doesn't work but $_POST works

2006-05-31 Thread Rabin Vincent
On 5/31/06, chris smith [EMAIL PROTECTED] wrote: On 5/31/06, kartikay malhotra [EMAIL PROTECTED] wrote: 2. Have you tried simply saving $_POST['userfile'] to a file? $save = $_POST['userfile']; $f=fopen($out,'a'); copy($save, $out); Files don't go into $_POST - they go into

Re: [PHP] MMS Gateway + PHP

2006-05-29 Thread Rabin Vincent
On 5/29/06, kartikay malhotra [EMAIL PROTECTED] wrote: I've a typical problem. I'm using Mbuni MMS gateway. This gateaway provides a method of forwarding an incoming MMS file to a HTTP Server, where it could be uploaded. I run a PHP script on the server, to dump the MMS into a database. Now I

Re: [PHP] Why does this preg_replace function not work?

2006-05-26 Thread Rabin Vincent
On 5/26/06, Dave M G [EMAIL PROTECTED] wrote: PHP List, In the code below, I want to take the text within $content, and change every instance of [h3] into h3, and every instance of [/h3] into /h3. And then do the same for [em], [/em], [strong], and so on. However, this code does absolutely

Re: [PHP] Upload files problems

2006-05-26 Thread Rabin Vincent
On 5/25/06, Ryan Creaser [EMAIL PROTECTED] wrote: Ing. Tomás Liendo wrote: Hi! When the users of my system try to go up files of more than 460 K, they receive the message: Fatal error: Maximum execution time of 90 seconds exceeded in

Re: [PHP] Slow query-building function

2006-05-26 Thread Rabin Vincent
you create the and? If so, why do you need to strtolower() it? [stripped rest of code] For the rest of the code, the same changes as above apply. For info the strim() function combines ltrim() and rtrim(). Why? PHP has its own function to do that. php.net/trim. -- Rabin Vincent http://rab.in

Re: [PHP] calling JS function from php

2006-05-25 Thread Rabin Vincent
On 5/25/06, suresh kumar [EMAIL PROTECTED] wrote: I am facing one problem in my project.I am trying to call a javascript function from php.but it not executing.this is my code. You can't call a javascript function from php. What you can do is output javascript code that calls a javascript

Re: [PHP] help needed with pager

2006-05-25 Thread Rabin Vincent
On 5/25/06, Ross [EMAIL PROTECTED] wrote: http://scottishsocialnetworks.org/editor.php http://scottishsocialnetworks.org/editor.phps the pager in this page works except try and choose aberdeen from the area dropdown. You should get 18 answers which is fine except when page 2 is pressed at the

Re: [PHP] Monitoring Remote Server Services using php !!!

2006-05-25 Thread Rabin Vincent
On 5/25/06, Phil Martin [EMAIL PROTECTED] wrote: Hi everybody, I'm new to the list and also new to php, I hope I can learn many things from here. My first doubt is the following: I'm trying to create a small monitor system, just to suit my needs in monitoring some services in my

Re: [PHP] Question about set_time_out and shell_exec

2006-05-24 Thread Rabin Vincent
On 5/24/06, Suhas [EMAIL PROTECTED] wrote: Hi, I am trying to write a script which will avoid browser timeout problem and in that process I have created 2 files FILE1.php: set_time_out(1); echo shell_exec(/usr/local/bin/php -f FILE2.php ); FILE2.php: @mail($to,$sub,$msg); sleep(60);

Re: [PHP] date iteration

2006-05-23 Thread Rabin Vincent
On 5/23/06, Dave Goodchild [EMAIL PROTECTED] wrote: Hi all, I am writing an app that runs a prize draw, wherein the admin chooses the duration by adding a start date and number of days for the draw to run. These values are passed into a small function that generates an array holding the start

Re: [PHP] HELP - Clean and simple

2006-05-22 Thread Rabin Vincent
On 5/22/06, Jonas Rosling [EMAIL PROTECTED] wrote: :-) Sorry! I've been digging with this for a while now so I don't think I have the best code left. But this is what I have for the moment: while($row=mysql_fetch_array($result)) { if (!$$row[0]) { $$row[0] = array();

Re: [PHP] selecting current month from a database

2006-05-22 Thread Rabin Vincent
On 5/21/06, Paul Goepfert [EMAIL PROTECTED] wrote: Hi all, I know this might be trivial problem but I can't seem to figure it out. Here is my problem I have a drop down menu where I have the months of year as menu items. I want to be able to have the current month be the selected month. I

Re: [PHP] Uploading Files

2006-05-21 Thread Rabin Vincent
On 5/21/06, P. Guethlein [EMAIL PROTECTED] wrote: I'm at one of those frustration levels can't seem to get a script working that will post and upload a file to the server. Im working with the below. Can you help? ?php $numoffile = 1; $file_dir = d:/upload/; if

Re: [PHP] detect if file exist

2006-05-21 Thread Rabin Vincent
On 5/21/06, Alain Roger [EMAIL PROTECTED] wrote: i have 1 folder, in this folder sometime a file can be sometimes not... 1. i would like to detect if the folder contains a file or not. only 1 file can be in this folder but i do not know the name of this file, and the extension should be xls.

Re: [PHP] detect if file exist

2006-05-21 Thread Rabin Vincent
On 5/21/06, Ryan A [EMAIL PROTECTED] wrote: U file_exists() ? file_exists doesn't help here since the filename of the file is not known. glob or the *dir functions do the trick. Rabin [please bottom-post...] A simple search on the search engines for php file exists gave me loads of

Re: [PHP] safe_mode

2006-05-20 Thread Rabin Vincent
On 5/20/06, tedd [EMAIL PROTECTED] wrote: At 9:01 PM -0400 5/19/06, John Hicks wrote: tedd wrote: Hi gang: Please excuse me for asking another dumb-ass question, but here goes. I'm finding that setting safe_mode to ON is more difficult than I first thought. In my phpinfo, safe_mode is set to

Re: [PHP] Date() finding yesterday

2006-05-20 Thread Rabin Vincent
On 5/21/06, John Taylor-Johnston [EMAIL PROTECTED] wrote: I cannot seem to get this right. How can I produce yesterday? $today = date(Y-m-d); $yesterday = date(Y-m-) . date(d)-1; $yesterday = date(Y-m-d)-1; $yesterday = date(Y-m-.d-1); I've been looking at the manual :) ... Use

Re: [PHP] Copy of image - smaller

2006-05-15 Thread Rabin Vincent
On 5/15/06, Gustav Wiberg [EMAIL PROTECTED] wrote: [snip] //What should/could I do here? // //Set new width and height // $new_width = 100; $new_height = 200; $tmp_image=imagecreatefromjpeg($toPath . $mfileAdd); $width =

Re: [PHP] Help w/ 'headers already sent' and file download

2006-05-15 Thread Rabin Vincent
On 5/16/06, Mike Walsh [EMAIL PROTECTED] wrote: I have an application which I am working on which takes a file supplied by the user via a File Upload, peforms some processing on it, then prompts the user to download a generated CSV file. What I would like to do is report some processing

Re: [PHP] Trouble sending data via TCP socket

2006-05-15 Thread Rabin Vincent
On 5/16/06, J. King [EMAIL PROTECTED] wrote: To further my understanding of how Jabber works I have decided I should try and write my own XMPP implementation in PHP. However, I've run into trouble rather quickly. To connect to a Jabber server, one must open a TCP socket to the server

Re: [PHP] METHOD=POST not worikng

2006-05-14 Thread Rabin Vincent
On 5/13/06, IraqiGeek [EMAIL PROTECTED] wrote: [snip] html titletest script/title body ?php //If the user wants to add a joke if(isset($_GET['addtext'])): ?//If I use METHOD=GET here, the script works flawlessly form action=?php echo($_SERVER['php_self']);? METHOD=POST [/snip]

Re: [PHP] causing HTTP error status

2006-05-06 Thread Rabin Vincent
On 5/6/06, Richard Lynch [EMAIL PROTECTED] wrote: On Fri, May 5, 2006 5:01 am, Nic wrote: Hi Rabin Rabin Vincent [EMAIL PROTECTED] writes: On 5/5/06, Nic [EMAIL PROTECTED] wrote: But /mydir/some.php doing: header(HTTP/1.1 404 Rubbish!!!) _never_ causes the error document to be picked

Re: [PHP] User confirmation questions?

2006-05-05 Thread Rabin Vincent
On 5/5/06, William Stokes [EMAIL PROTECTED] wrote: In PHP is it possible to generate windows style question boxes and get the users choice back? Or do I need javascript or something else for that? For example if a user hits a button in form I could ask for his confirmation for the action. Like

Re: [PHP] causing HTTP error status

2006-05-05 Thread Rabin Vincent
On 5/5/06, Nic [EMAIL PROTECTED] wrote: But /mydir/some.php doing: header(HTTP/1.1 404 Rubbish!!!) _never_ causes the error document to be picked up. That's right. Apache's not going to take action based on the headers you generate in your PHP script. These headers are just going to go to

Re: [PHP] User confirmation questions?

2006-05-05 Thread Rabin Vincent
On 5/5/06, tedd [EMAIL PROTECTED] wrote: At 8:58 AM +0300 5/5/06, William Stokes wrote: Hello, In PHP is it possible to generate windows style question boxes and get the users choice back? Or do I need javascript or something else for that? For example if a user hits a button in form I could

Re: [PHP] Showing an image outside of the web folder

2006-05-05 Thread Rabin Vincent
On 5/5/06, James Nunnerley [EMAIL PROTECTED] wrote: Doing a readfile ($file_location) outputs the binary... can someone point me in the direction of being able to translate that binary into a viewable image file? Drop the appropriate content-type header: header('Content-type: image/png');

Re: [PHP] User confirmation questions?

2006-05-05 Thread Rabin Vincent
On 5/5/06, tedd [EMAIL PROTECTED] wrote: At 9:38 PM +0530 5/5/06, Rabin Vincent wrote: On 5/5/06, tedd [EMAIL PROTECTED] wrote: At 8:58 AM +0300 5/5/06, William Stokes wrote: Hello, In PHP is it possible to generate windows style question boxes and get the users choice back? Or do I need

Re: [PHP] Problem with usort

2006-05-04 Thread Rabin Vincent
On 5/4/06, Jon Earle [EMAIL PROTECTED] wrote: $ret_val = 0; if ($aday == $bday) {$ret_val = 0;} else {$ret_val = ($aday $bday) ? -1 : 1;} return ret_val; You're missing the $ for ret_val on the return line. PHP thus understands the return value as a string, ret_val, which would be

Re: [PHP] Geting feet wet with REGEX and url rewriting (maybe a bit 0T)

2006-05-04 Thread Rabin Vincent
On 5/4/06, Ryan A [EMAIL PROTECTED] wrote: RewriteRule ^blog-([0-9]+).html$ index.php?act=blogid=$1 This is fine, but you should really be escaping the . (by writing it as \.). Otherwise, it matches any character, not just the literal period. mysite.com/blog/blog-2-the_great_escape.html