Re: [PHP] Re: $_POST issues
On 12/01/2010 10:08 PM, Daniel P. Brown wrote: On Wed, Dec 1, 2010 at 12:15, Nadim Attari wrote: where does receipt.php gets the $_GET data ? Isn't it from response.php where the $_POST data are being http_build_query()'ed ?? $param = http_build_query($_POST);<- According to cURL, it's never even hitting response.php to redirect. It's going straight to receipt.php with $_GET data. (THERE IS NO $_POST DATA.) Besides, you kept stating that the 'redirect' was working fine, which is technically incorrect: there's absolutely zero chance that works as you presented it. You can't just throw in some text to tell the browser to redirect to a page. You'd have to do a header("Location: "); call, a meta refresh, a JavaScript window.location() call or something similar. Thus that indicates that the text from response.php is interpreted as a direction by the processing gateway's API when it calls out to your server. Knowing this, I see the $_POST data expected here. This wasn't in question, as it's obviously building the query string. We now know that it feeds this data in plain text back to the remote server for further processing, which then directs the browser to receipt.php --- with $_GET data (id est - THERE IS NO $_POST DATA). Your browser is never hitting response.php. Only the remote server is doing that. If you want to get the data as sent by the remote server to your server in response.php, you'll either need to write that to a file like I did: file_put_contents('output.nadim.log',$param); Or you'll need to consult the processing gateway's API documentation to learn how to avoid requiring this seemingly unnecessary step. Thank you Daniel for this detailed post of yours. Really appreciated. Saving the $_POST data (in response.php) in a file will serve nothing. - And you said this was an unnecessary step from the payment gateway - All i need is the result of the transaction, which I'll get in receipt.php thr' $_GET. All I can say is that I do not have any control on the payment gateway (you may realise it has been badly implemented - if it is not too harsh to say like that) Another unnecessary step occurs in send_transaction.php - you have seen that once the XML data is sent to the payment gateway (well SBM asked me to send like that - i mean no declaration, just the tags), the gateway sends back and and i have to redirect my browser to that page, concatenating the paymentid in the query string. --- this should have been done automatically by the payment gateway itself. Really baffling. I think I'll report this to my boss, who shall contact the client (YU Lounge). Now up to the client to decide whether they'll be doing business with SBM payment gateway solution or not. BTW, would you recommend someone to use this payment gateway ? What are your comments on such payment gateway implementation ? Anyway thanks again for your time and help Daniel. Best regards, Nadim Attari Alienworkers.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: $_POST issues
On 12/01/2010 09:15 PM, Daniel P. Brown wrote: On Wed, Dec 1, 2010 at 11:56, Nadim Attari wrote: My problem is not the redirection; but all I want is to get the data in $_POST Again: there is no $_POST data. Why does receipt.php work while response.php doesn't? THERE IS NO $_POST DATA. where does receipt.php gets the $_GET data ? Isn't it from response.php where the $_POST data are being http_build_query()'ed ?? $param = http_build_query($_POST); <- Your code in receipt.php even uses $_GET. You can see it in the browser's address bar on the response. It is $_GET. THERE IS NO $_POST DATA. Change: $param = http_build_query($_POST); To: $param = http_build_query($_GET); Or: $param = http_build_query($_REQUEST); P.S. - THERE IS NO $_POST DATA. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: $_POST issues
On 12/01/2010 08:56 PM, Nadim Attari wrote: On 12/01/2010 06:50 PM, Bundhoo M Nadim wrote: Hello, Can someone explain me what this piece of code basically does ? http://www.domaine.com/page.php?";; $param = http_build_query($_POST); print $param; exit(0); ?> Well, the code is redirecting to some page with query string constructed using the $_POST data. My problem is not the redirection; but all I want is to get the data in $_POST If I just put only this piece of code: i get nothing. But the above codes is successfully redirecting me to page.php with a properly constructed query string -> which means that $_POST was never empty. So why var_dump($_POST) is returning just array(0) { } ??? nadim attari alienworkers.com Hello all, Perhaps I am not being able to explain you my problem correctly (sorry my poor English) Here is the tests i'm doing: http://www.yulounge.com/_sbm/servlet/send_transaction.php And you can get the codes here: http://www.yulounge.com/_sbm/servlet/servlet.zip I've got these codes from them at SBM. I'm asking myself this question: Why can't I get the values of $_POST (response.php in the example) but the page is able to http_build_query() using the same $_POST ?? To demonstrate what I am trying to figure out, please try this one also: http://www.yulounge.com/_sbm/example2/send_transaction.php Codes: http://www.yulounge.com/_sbm/example2/var_dump.zip In this example2, only the page response.php has been changed. Thx in advance, Nadim Attari Alienworkers.com Sorry If you already done tests or downloaded example2. I made a mistake specifying the response and error urls. I've corrected it on the server. You can test / download example 2. nadim attari alienworkers.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: $_POST issues
On 12/01/2010 06:50 PM, Bundhoo M Nadim wrote: Hello, Can someone explain me what this piece of code basically does ? http://www.domaine.com/page.php?";; $param = http_build_query($_POST); print $param; exit(0); ?> Well, the code is redirecting to some page with query string constructed using the $_POST data. My problem is not the redirection; but all I want is to get the data in $_POST If I just put only this piece of code: i get nothing. But the above codes is successfully redirecting me to page.php with a properly constructed query string -> which means that $_POST was never empty. So why var_dump($_POST) is returning just array(0) { } ??? nadim attari alienworkers.com Hello all, Perhaps I am not being able to explain you my problem correctly (sorry my poor English) Here is the tests i'm doing: http://www.yulounge.com/_sbm/servlet/send_transaction.php And you can get the codes here: http://www.yulounge.com/_sbm/servlet/servlet.zip I've got these codes from them at SBM. I'm asking myself this question: Why can't I get the values of $_POST (response.php in the example) but the page is able to http_build_query() using the same $_POST ?? To demonstrate what I am trying to figure out, please try this one also: http://www.yulounge.com/_sbm/example2/send_transaction.php Codes: http://www.yulounge.com/_sbm/example2/var_dump.zip In this example2, only the page response.php has been changed. Thx in advance, Nadim Attari Alienworkers.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $_POST issues
On 12/01/2010 07:18 PM, Jay Blanchard wrote: [snip] If I just put only this piece of code: i get nothing. [/snip] Where are you putting this var_dump? That's the only code on the page. Otherwise, the other codes - header(), print, etc. are on the page. nadim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: imagecopyresize
Hello Chris, Here's a link: http://pages.intnet.mu/nadim/php/image.upload.txt The code is minimal. Things I would like to add: - resize transparent gifs - resize animated gifs Time doesn't permit me, unfortunately :-( Regards, Nadim Attari - Auto-Deppe C. Hänsel wrote: -Original Message- From: Karl DeSaulniers [mailto:k...@designdrumm.com] Sent: Tuesday, April 06, 2010 10:39 AM Subject: [PHP] Re: imagecopyresize Sweet deal. Thanks Nadim. I think I got my script to work finally, but if it proves to be a no-go. I will definately take a look. Thanks for sharing. Best, Karl On Apr 6, 2010, at 3:29 AM, Nadim Attari wrote: Hello Karl, Use the attached code i wrote myelf for my projects. You can upload and create images of other sizes. Hope it will be easy to use. Ese if you need help, come on MSN (my email address) Note that you will have to implement the watermark part - i'm providing you the upload and create codes only. regards, nadim attari mauritius (indian ocean) --- Hello Nadim, would you mind sharing this script with me / us, too? I'd love to have a look at it, if you don't mind :o) All the best Chris __ Information from ESET NOD32 Antivirus, version of virus signature database 5003 (20100406) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Regex
M. Sokolewicz wrote: Nadim Attari wrote: Hello, I have some text in a table... the text contains hyperlinks (but not html coded, i.e. plain "Some text...http://www.something.com";) When i retrieve these texts from the table, i want the hyperlinks to become clickable, i.e. "Some text...href="http://www.something.com";>http://www.something.com" I know this sould be done using Regex, but i don't know regex. Any help (links, examples, etc) Thanks Nadim Attari You don't know Regex. Well, that's simple then, TRY to learn it. Noone will (or should) give you any answers if it's absolutely clear that you're not putting any effort into trying to find one yourself. "I know this should be done using Regex, but I don't know regex.", wouldn't you think it'd be a good idea to look up a tutorial somewhere or try to find out what this "regex" exactly is? Try to type regex in the php doc, see the notes for the various functions? really, a little more effort goes a long way. - tul Hello, I know i MUST learn it.. time does not permit me. But surely i'll learn how to use this powerful tool! And if i didn't need a quick help from this ML, why i would be here ... do you think if time permitted me to learn this, i'll ask a little help from this ML ? I am learning and will continue to learn throughout my life. And remember, the day one says "i've learnt everthing now" this is the day his downfall begins ... Anyway i've got something working: function hyperlinks($text = '', $class = 'link') { $text = trim($text); if ($text != '') { if (trim($class) != '') $class = ' class="'.$class.'"'; $in = array('`((?:https?|ftp)://\\S+)(\\s|\\z)`', '`([[:alnum:]]([-_.]?[[:alnum:]])[EMAIL PROTECTED]:alnum:]]([-_.]?[[:alnum:]])*\.([a-z]{2,4}))`'); $out = array('$1$2', 'href="mailto:$1";'.$class.'>$1'); $text = preg_replace($in, $out, $text); } return $text; } Renders http, https, ftp, mailto. Thanks M. Sokolewicz and everyone. Nadim Attari -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Regex
Hello, I have some text in a table... the text contains hyperlinks (but not html coded, i.e. plain "Some text...http://www.something.com";) When i retrieve these texts from the table, i want the hyperlinks to become clickable, i.e. "Some text...href="http://www.something.com";>http://www.something.com" I know this sould be done using Regex, but i don't know regex. Any help (links, examples, etc) Thanks Nadim Attari -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Need shopping cart for online updating
Lisa A wrote: > I currently use Pay Pal shopping cart, but I need to find a good, cheap > shopping cart that my clients can update themselves. Does anyone know of > something I can install so they can work on it easily. They need to do this > online. > thanks, > Lisa A Hello, I don't know what you are looking for. Have a look here http://www.hotscripts.com/PHP/Scripts_and_Programs/E-Commerce/index.html Regards, Nadim Attari Alienworkers.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP Search Engine
> HI All, > > Has anyone on here created a search engine in PHP? > > I have project to create a search engine that will search about 50K or > so pages of information on 100 or so various domain names. > > What have you all done in the past? PHPdig was a failure. > > Do you recommend any of the ones that are for sale? > > Thanks, > > -- > Leonard Burton, N9URK > [EMAIL PROTECTED] http://www.xapian.org/ Nadim Attari -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to post a question?
> Posting a question on how to post a question. Here it goes: http://www.collectionscanada.ca/obj/h9/f1/284-v3.jpg Just put your hand on top of it and say "ABRACADABRA" Nadim Attari -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Ok, why is this happening...
Hello, I've changed the codes. Please run this one to view the results. The notable change is: $calculatedGross = $originalNet * (1.000 + ($commissionPct * 0.010)); Regards, Nadim Attari Alienworkers.com '; echo ' Test Rounding Net Premium'; echo ''; flush(); echo ''; echo ' '; echo ' Index'; echo ' Original Net'; echo ' Commission %'; echo ' Calculated Gross'; echo ' Calculated Net'; echo ' Result'; echo ' Comparisson'; echo ' '; $numberOfFailures = 0; $index = 0; for ($originalNet = 1.000; $originalNet <= 10005.000; $originalNet++) { for ($commissionPct = 1.000; $commissionPct <= 20.000; ($commissionPct += 0.100)) { $calculatedGross = $originalNet * (1.000 + ($commissionPct * 0.010)); $calculatedNet= $calculatedGross / (1.000 + ($commissionPct * 0.010)); $comparisson = "if ($originalNet !== $calculatedNet) = " . (($originalNet !== $calculatedNet) ? 'Condition true, it is not equal' : 'Condition false, it is equal') . "\n"; if ($originalNet !== $calculatedNet) { $numberOfFailures++; $result = 'NEQ'; } else { $result = 'EQ'; } echo ''; echo ' ' . ++$index . '.'; echo ' ' . round($originalNet, 2) . ''; echo ' ' . round($commissionPct, 2) . ' %'; echo ' ' . round($calculatedGross, 2) . ''; echo ' ' . round($calculatedNet, 2) . ''; echo ' ' . $result . ''; echo ' ' . $comparisson. ''; echo ''; flush(); } } echo ''; echo "# of calculations failed to match the original net premium = $numberOfFailures"; echo ''; echo ''; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: url reload
First of all you should go to: http://www.google-is-my-best-friend.com Then http://www.google.com.au/search?hl=en&q=%22call+same+page%22+%2B+php Found in the comments: http://www.zend.com/zend/spotlight/code-gallery-wade7.php?article=code-gallery-wade7&kind=sl&id=3324&open=1&anc=0&view=1 - Ok. Here it goes: http://www.php.net/manual/en/reserved.variables.php function myFunction($anchor = '') { $link = "$anchor"; return $link; } // the page calling the function $aLink = myFunction($_SERVER['PHP_SELF'] . '?var=' . $data); echo $aLink; Best Regards, Nadim Attari "timothy johnson" <[EMAIL PROTECTED]> a écrit dans le message This should be pretty simple but I cant find any info on it at the site. I am writing a function that will create a anchor, but I want it to call the same page it is on. Is there a way to get the current php page I am on so that when I output my anchor for that correct page. so if I call it from index.php the link will say: index.php?var=data but if I can the same function from say photos.php then the link would be: photos.php?var=data.. thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Magazine
"Richard Davey" a écrit dans le message > Hello Nadim, > > Friday, July 1, 2005, 7:23:44 AM, you wrote: > > NA> Two PHP magazines available are: > NA> - php|arch (www.phparch.com) > NA> - phpMag (www.php-mag.net) > > NA> Want to subscribe to one of these 2. Please help me decide by sending your > NA> comments on these 2 mags. > > They're both good. I only read the PDF version of php|a, which is much > cheaper and lets me print out only the pages I want to scribble notes > on. Someone (Richard Lynch) advised me to subscribe to the PDF versions of both magazines if i can afford. I think it's a possibility ! > > php mag is nicely laid out and the content quality is as high as > php|a, but it's pretty expensive. Why not just buy a couple of issues > of each and see which you prefer? > > On the topic of PHP Magazines, they are maturing quite a lot but still > suffer badly from coming across more as a collection of un-related > articles written by developers about their latest projects. Because > all the contributions come in from across the world, there's very > little consistency either in writing style or theme of content each > issue, and sometimes authors whose native language isn't English > create works that are harder to read. > > They're both a great read and I appreciate nearly all of the articles > in them, and the people who've spent the time writing them. The Seems that i'll subscribe to both, PDF versions !!! > disjointed nature of the content isn't the authors fault, it's just > the way they are edited at the moment. Regular columns (such as > Security Corner in php|a or Guru Speak in php-mag) are helping to > address this, but what you won't find in them are all the authors > working together to address a specific topic. For example in most > development magazines I read they'll often have a theme for the issue, > i.e. security, and then the articles will be centered around that > theme from differing levels of complexity and scope. I am sure the > current crop of PHP magazines will migrate towards something more > coherent in structure as time goes on (and their circulations > increase), rather than feeling like a grab-bag of non-specific PHP > goodies as they do today. > > Best regards, > > Richard Davey Best Regards and thanks, Nadim Attari Alienworkers.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Magazine
Hello, Two PHP magazines available are: - php|arch (www.phparch.com) - phpMag (www.php-mag.net) Want to subscribe to one of these 2. Please help me decide by sending your comments on these 2 mags. Regards, Nadim Attari Alienworkers.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Image upload form
http://www.php-help.net/sources-php/image.upload.function.353.html Regards, Nadim Attari Alienworkers.com > Hi, After a disastrous first attempt (which uploaded images but only by > chance) it was suggested I rework the entire thing. This one seems to > check the file against getimagesize and if that doesn't prove false, > check the type and make the extension then rename the file. But the > moving part is not working, and it does not kick back any error, it just > fails. > > Can anyone tell me what I am doing wrong, and also if this is sufficient > to a) upload images safely and b) protect against tampering? > > Thanks in advance, > JJ > > > > error_reporting(E_ALL); > >$uploaddir = "images/jpg/test/"; > > // print_r($_FILES); > >$local_file = $_FILES['userfile']['tmp_name']; > > if (sizeof($local_file)) >{ > > //try to get image size; this returns false if this is not an actual > image file. >$image_test = getimagesize($local_file); > > if ($image_test !== false) { >$mime_type = $_FILES['userfile']['type']; >switch($mime_type) { >case "image/jpeg": >$pext = 'jpg'; >break; >case "image/tiff": >$pext = 'tif'; >break; >default: >echo "The file you are trying to upload is an image, but it is not > a tif or jpeg and therefore unacceptable."; >} > } else { > echo "The file you are trying to upload is not a valid image file"; > } > > $main_image = md5(date("l-F-j-Y i:s")).'.'.$pext; > > >move_uploaded_file($main_image,$uploaddir); > >} > >?> > > > > > Cartoon: > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: unable to load php_gd2.dll
Try extension_dir = "./extensions" Nadim Attari Alienworkers.com > Okay I at loss. I have tried but i can seem to get the > php_gd2.dll to work properly. Any help this is what i have > done so far. > > I have in my php.ini file, > > ; Directory in which the loadable extensions (modules) > reside. > extension_dir = "C:\PHP\extensions" > > I have also uncommented the > > extension = php_gd2.dll > > I have in the c:\php\extension folder the php_gd2.dll > > I have restarted IIS but still nothing > > I am using Window XP $ 2000 with IIS 5.0 but still nothing > > Please help > Disieyi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Javascript Calendar and PHP
> What Javascript calendar works good with PHP? > Thanks http://www.blueshoes.net/en/javascript/datepicker/ Regards, Nadim Attari -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: upload image file to my server
you may use this function http://www.alienworkers.com/misc/uploadImage.htm Regards, Nadim Attari > Hello, hard people. > > I want to do this, I like to upload image file, > What can I do?. > > somebody help me.? > > best regards TOMAS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: asking comment
If you are storing the name of the uploaded image in a table (mySQL DB), then the row in which you gonna store this name must have a unique id (auto_increment field) ... why don't you use this id as your image name. here you'll NEVER have the same image name. Example You have an HTML form where surfer enter details + upload an image. On submitting the form, the PHP script stores all the details + uploads the image and put it in the right folder on the server. Table myTable id int(6) unsigned auto_increment imagename varchar(15) otherdetails varchar(255) once you insert a row in the table, get the id of the row. Use this id to name ur image. steps: 1. mysql_query("insert into myTable (imagename, otherdetails) values ('', '$otherdetails')"); 2. get rowid - mysql_insert_id() 3. rename image to "id.ext" 4. update row in table: update myTable set imagename = 'id.ext' where id = 'id' You may use this script to do step 3 http://www.alienworkers.com/misc/uploadImage.htm Hope it helps... Nadim Attari, Alienworkers.com > Hello, > > I got a bit frustrated with image upload stuff with different image name > problems. So I created a system that gives the uploaded imaged a random > numeric name between 1-10 000 000 and saves the file to a server folder and > the image name to mysql DB. > > Is there a so sort of a problem here that I am not thinking of? I only can > imagine problem that the rand() gives the same value twice. But I cant see > this as a major problem because there would be maybe not more than 1000 > uploaded pictures. So the chance is at worst something like 1:10 000 that > same name is created to the image. > > Anyway if same name is created what's the best way to check that? I was > thinking of putting the image name field in DB as a unique field. That would > do it? Right? > > Thanks again > -Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: multidimensional array sort
Try http://terra.di.fct.unl.pt/docs/php/function.array-multisort.php.htm function array_csort() {//coded by Ichier2003 $args = func_get_args(); $marray = array_shift($args); $msortline = "return(array_multisort("; foreach ($args as $arg) { $i++; if (is_string($arg)) foreach ($marray as $row) $sortarr[$i][] = $row[$arg]; else $sortarr[$i] = $arg; $msortline .= "\$sortarr[".$i."],"; } $msortline .= "\$marray));"; eval($msortline); return $marray; } Regards, Nadim Attari -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Artificial Intelligence for PHP
Hello, These links might help: http://coding.mu/index.php/archives/category/php/ http://www.phparchitect.com/news/466 http://www.phppatterns.com/index.php/article/articleview/71/1/11/ Regards, Nadim "C.F. Scheidecker Antunes" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > Hello, > > I am interested on Artificial Intelligence for PHP, pattern maching, etc. > More specifically: data mining, statistics and pattern maching. > > Couple of years ago there was a presentation on the MELL Extension - AI > for PHP. > > I've tried to google it but I've found no code or examples. > > Does anyone have any knowledge on using PHP for AI systems or know of > any resource, a book > or on the internet that might help me out? > > Thanks in advance, > > C.F. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: data grids...
BlueShoes: PHP Framework and CMS http://www.blueshoes.org/en/javascript/ Regards, Nadim Attari Alienworkers.com "Blackwater Dev" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > Does anyone have a nice clean way to provide data grids with php short > of simply creating a bunch of input boxes or using flash? > > Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: File Transfer
This gonna help: http://www.php.net/ftp Regards, Nadim Attari "Syed Ghouse" <[EMAIL PROTECTED]> a ecrit dans le message de news:[EMAIL PROTECTED] Hi All i have to transfer files from one server to another server thru php program.will anybody tell me how to do it? Regards syed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Cannot load modules
Download the binary Package (zip file) where you gonna find these libraries mySQL: == Copy the "libmysql.dll" in your System32 folder. This is needed for php_mysql.dll to load. CURL [from the manual] Note to Win32 Users: In order to enable this module on a Windows environment, you must copy libeay32.dll and ssleay32.dll from the DLL folder of the PHP/Win32 binary package to the SYSTEM folder of your Windows machine. (Ex: C:\WINNT\SYSTEM32 or C:\WINDOWS\SYSTEM) "Bronislav Klucka" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > Hi, > I'm using Apache2 and PHP5 and mysql on WinXP and I have problem with > loading modules. When starting apache, error occures: > > PHP startup: unable to load dynamic library 'c:\Program > files..\php_curl.dll' - Module was not find > PHP startup: unable to load dynamic library 'c:\Program > files..\php_myslq.dll' - Module was not find > > I'm loading 4 modules, all at the same location, how is it possible, that > PHP loads 2 of them and 2 of them not??? > INI file: > > extension_dir = "c:\Program Files\ApachePhpMysql\php\ext\" > > extension=php_curl.dll > extension=php_imap.dll > extension=php_mbstring.dll > extension=php_mysql.dll > > > Thnx for any help... > > Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Location header does not work?
just suggesting... try this: if ($option == 'content' and $task == 'view' and $id == 159 and $Itemid == 162) { session_write_close(); header("Refresh:0; url=https://computing.eng.iastate.edu/mambo/index.php?option=content&task=vi ew&id=159&Itemid=162"); exit; } let us know whether it works... If it doesn't, try javascript window.location() > if ($option == 'content' and $task == 'view' and $id == 159 and $Itemid == > 162) > { > session_write_close(); > header("Location: > https://computing.eng.iastate.edu/mambo/index.php?option=content&task=view&id=159&Itemid=162";); > exit; > } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP-5 book
Thanks you all for your recommendations !!! ~ nadim attari -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP-5 book
1. http://www.eyrolles.com/Informatique/Livre/9780672325618/livre-advanced-php-programming.php 2. http://www.eyrolles.com/Informatique/Livre/9782212113235/livre-php-5-avance.php two interesting books i found. Which one would you suggest ? thanks ~ nadim attari -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP-5 book
Hello friends, Can someone advise me of a very good PHP-5 book. Most probably i'll buy it from eyrolles.com Thanks, ~ nadim attari -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: auto-submit
javascript !!! = document.aForm.submit(); == "Jim Rainville" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] Hi - I'm writing a multi-page php script that keeps track of state with a hidden variable in the html forms. It's all working well except I would like to know how to auto submit a form and change the state. For example when I'm in state 2 and the user enters some data and hits a submit button I want the script to change to state 3 - process some data in that state then go back to state 1. I want the transition to go back to state 1 without the user having to hit a submit button - i.e. I want the form to auto-submit. Is there a way to do this? Thanks for any help you can give. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Server Push
> I am just looking for some different techniques on how server push is > done on PHP: http://www.craftysyntax.com/CSLH/ Download, have a look at the codes and enjoy... ~ nadim attari -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Session problem
> I have a problem with sessions. If someone closes their internet explorer > window without logging off the session remains open. When you try to go > back to the site IE hangs until I manually remove the sess_ files from > the /tmp directory. Any insights on this one?? > > VR/Tim http://www.php.net/setcookie (find 'expire' in this manual) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Save page
"Brandon Holtsclaw" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > try something like > > $handle = fopen ("http://www.pagetoget.com/thispage.html";, "rb"); > $contents = ""; > do { > $data = fread($handle, 1024); > if (strlen($data) == 0) { > break; > } > $contents .= $data; > } while(true); > fclose ($handle); > >From the PHP manual: // Another example, let's get a web page into a string. See also file_get_contents(). $html = implode ('', file ('http://www.example.com/')); > then you have all text from the .html page in $contents and you can do a > fwrite on it to a local file, echo it, str_rep etc etc etc > > Brandon Holtsclaw > [EMAIL PROTECTED] > > > - Original Message - > From: "Mike Mapsnac" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, May 10, 2004 10:37 AM > Subject: [PHP] Save page > > > > Hello > > > > I' m writing php script that will request page and save it locally. The > page > > URL will be parameter (example: http://www.pagetoget.com/thispage.html). > How > > php can request such page and save it locally on the file? > > > > Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Moving a file
> Is there a build-in function to move files in php ? > or sholud i just open file A and copy it content to file B , then del file > A. > > Thanks for help. First http://www.php.net/copy to destination Then http://www.php.net/unlink source. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Images & PHP
> http://www.imagemagick.org/ -- Forgot to include this link... http://pecl.php.net/package/imagick -- > Hope this will help !!! > > Regards, > > Nadim Attari -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Images & PHP
http://www.imagemagick.org/ Hope this will help !!! Regards, Nadim Attari -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Flash MX
Hello PHPeople, I have to send data to flash. Should i use the "urlencode()" or the "rawurlencode()" function to encode the data? Thx, Nadim Attari -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Arrays & Keys?
> I'm doing the language thing. Is this what u r looking for ? http://www.php.net/manual/en/function.setlocale.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Java script prompt - help
>> I would like to have a yes \ no prompt displayed and depending on which button is pressed take the right course of action. http://www.devguru.com/Technologies/ecmascript/quickref/win_confirm.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: windows 2003 server configuration
http://dedntfaq.hostingsupport.com/iis6_php_install.txt regards, nadim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Credit Card validation
http://www.zend.com/codex.php?CID=22 Hope it helps... Nadim Attari -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: display a hiddenfield
echo ""; echo " "; echo " "; echo ""; --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Simple PHP Encoder
http://turck-mmcache.sourceforge.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session management
Handling Session with PHP 4 http://www.zend.com/zend/tut/session.php (Feb 15, 2000) Session Authentication http://www.zend.com/zend/spotlight/sessionauth7may.php (May 15, 2001) Custom Session Handling http://www.zend.com/zend/spotlight/code-gallery-wade8.php (April 30, 2003) === Maintaining State On The Web - An overview http://www.zend.com/zend/art/maintainingstate.php (November 8, 2001) Beginner's Guide to URL Rewriting http://www.sitepoint.com/article/910 (October 22nd 2002) Forums de WRI -> URL Rewriting et .htaccess http://www.webrankinfo.com/forums/forum_12.htm (... in French) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Clone of Hotmail,yahoo
> I don;t have any idea of how to implement it. i.e the TextBox so a present Page shoulg get the value from the other independent form. Use the example below and suit it according to your context. I remind you that it's not a PHP thing, only JavaScript; But you can use PHP to show the email addresses. == MainForm.htm == Admin Section function CategoryPicker() { var w_width = 500; var w_height = 500; var screen_width = screen.width; var screen_height = screen.height; var w_top = (screen_height/2) - (w_height/2); var w_left = (screen_width/2) - (w_width/2); window.open('picker.htm','CategoryPicker','scrollbars=yes,width='+w_width+', height='+w_height+', top='+w_top+',left='+w_left+''); } function ValidateForm() { if (document.CategoryForm.Category.value == "") { alert("Please enter a Category Name !!!"); document.CategoryForm.Category.focus(); return; } document.CategoryForm.submit(); } Parent Category: === picker.htm === Categories function ReturnCategory(CategoryName, pId) { opener.CategoryForm.pid.value = pId; opener.CategoryForm.PCategory.value = CategoryName; window.close(); } 1 Category-1 1 Category-2/a> 1 Category-3/a> // Hope it helps. // Regards, // // Mohammad Nadim Attari -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Help with Mod mathematical function
> Data = (index Mod 16) http://www.php.net/manual/en/language.operators.arithmetic.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: checking how many records are returned?
> Is there a way to check how many records are returned from a query to the > database? Which database? MsSQL? mySQL? mSQL? PostgreSQL? ? If it's mySQL then try mysql_num_rows -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Search in PhP
> i have a site in php but not using database i want to > add the search facilty in that site means user can > search into the contents of the site .so how can i do > that in php without using database.waiting for ur soon > reply Hello, - First of all try to get a list of all files (php, html, etc) - for each file, -- get the contents, and then strip_tags($theContentOfOneFile); -- try to find whether the keyword to be found is in the contents, e.g. use substr_count() store the number of occurences in an array $searchArray = array('fileName' => 'number_of_occurences') - sort the array, e.g. arsort($searchArray) - display the results foreach($searchArray as $fileName => $occurences) { if ($occurences == 0) break; // display as you wish echo "Found in $fileName $occurences times"; } Hope it helps, Nadim Attari -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Variable not passed twixt pages..
> ... ... ... > $query = "insert into email values ('" . $_REQUEST['mailaddress'] Use $_GET or $_POST, according to the method used... $_GET['mailaddress'] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: numberformat
> Is there a way, to define an integer number e.g. 7, to be defined as 07? 07 = 7 But 09 != 9 (Well 9 isn't in the set but the '0' in front will make the number octal) 09 is an octal number Dunno what you gonna do with this formatting.. but think again ... Nadim Attari -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is it possible to test an uploaded file to check the type?
> So, check $_FILES['userfile']['type'] against a set of allowed file > types, and you're set... What about this: array getimagesize ( string filename [, array imageinfo]) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: download php
> So is there any way? http://www.turcksoft.com/en/e_mmc.htm Hope it helps... Nadim Attari -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: what's wrong with this?????
> $result = mysql_query('CREATE TABLE members (userid INT(25) NOT NULL > AUTO_INCREMENT, first_name VARCHAR(30) NOT NULL, last_name VARCHAR(50) NOT > NULL, email_address VARCHAR(255) NOT NULL, username VARCHAR(30) NOT NULL, > password VARCHAR(30) NOT NULL, activated ENUM('0','1') DEFAULT '0' NOT NULL, > date_joined DATETIME NULL, last_login DATETIME NULL);')or die("Create table > Error: ".mysql_error()); --- - First of all verify ' (single quote) or " (double quote) here... this should solve the problem BUT - Another problem will crop 'coz u didnot define a key... Read - PRIMARY KEY (index_col_name,...) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Having problems with an IF statement, just doesn't make sense
Paying attention to this line: > Also if I use !isset it returns true with a null value for $theme Well this is clear in the manual: isset() will return FALSE if testing a variable that has been set to NULL So !isset($a_Null) = !FALSE = TRUE >From PHP Manual = $var = 0; if (empty($var)) { // evaluates true echo '$var is either 0 or not set at all'; } if (!isset($var)) { // evaluates false echo '$var is not set at all'; } Read manual: empty() and isset() -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Install PHP on windows using PHP installler
> Is it better to install PHP using the PHP installer or using the Zip file > version? Go for the PHP Installer. It's straight forward to install... Do download the Zip file also, in case u need any extensions (DLL) Nadim Attari http://www.alienworkers.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: problem with mktime
> The following line of code doesn't work for me: > $previous_issue_unixdate = mktime(0, 0, 0, $previous_issue_month, > $previous_issue_day, $previous_issue_year, 0); > $previous_issue_month is set to 06, _issue_day is 30 and _issue_year to > 2003. Still $previous_issue_unixdate is emtpy. > anders thoresson -- echo mktime(0, 0, 0, 09, 30, 2002, 0); echo mktime(0, 0, 0, 9, 30, 2002, 0); OUTPUTS: 1009656000 1033329600 NOTE: = 09 and 9 are not the same !!! 09 = octal number (well 9 doesn't exist in octal !!!) 9 = digital number But mktime(0, 0, 0, 06, 30, 2002, 0) and mktime(0, 0, 0, 6, 30, 2002, 0) should produce the same result: 1025380800 1025380800 > Still $previous_issue_unixdate is emtpy. I dunno what to say... should work Hope it helps... Nadim Attari http://www.alienworkers.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Help please!
> We always send the mail to [EMAIL PROTECTED], and not using "reply to group" function,I think there's no easy way to do this.If you really have problems with PHP,sending mail is not the important thing,the more important thing is to get a good reply!Sorry,it's my own opinion:) - Yea for sure, the most important thing is to get your PHP problems solved here.. - Well I've been able to send from my news client (Outlook Express). This post was not mailed but "Reply to Group"ed Thx for the help... Nadim Attari http://www.alienworkers.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Help please!
> hmm, well this post is here twice. so it works better than you thought? ;-) Well it doesn't... I have to send it as a mail to [EMAIL PROTECTED], then it works... If I click on the thread and try to "Reply to Group", it doesn't work !!! Anyway I can send my post now... and special thanks goes to Edward Dudlik (Becoming Digital). Nadim Attari http://www.alienworkers.com
[PHP] Re: Month name
> How can I get the month name from a date? If you could post with an example > i'll be gratefull Two links to help you... http://www.php.net/manual/en/function.getdate.php http://www.php.net/manual/en/function.strtotime.php
[PHP] Re: Returning TWO variables from function
> Can someone let me know how to return TWO variables from a function Try http://www.php.net/manual/en/language.references.php
[PHP] Re: PHP Mysql Hit Counter
http://www.hotscripts.com/PHP/Scripts_and_Programs/index.html
[PHP] Fw: Help please!
Hi php-general, I have subscribed to news://news.php.net/php.general. But when I post something (i'm using Outlook Express), it seems that the post is sent; but in fact it isn't and so I don't find my post(s) on the newsgroup. Help please! Nadim Attari
[PHP] Help please!
Hi php-general-digest, I have subscribed to news://news.php.net/php.general. But when I post something (i'm using Outlook Express), it seems that the post is sent; but in fact it isn't and so I don't find my post(s) on the newsgroup. Help please! Nadim Attari