Re: [PHP] PHP vs JAVA

2013-08-20 Thread shiplu
What a co-incidence! I was searching PHP vs Python in google and reading articles. Now a similar mail on my inbox. When any language war goes on, everyone gets biased by the language he/she loves. It applies here too. I think your college teacher loves Java. During PHPvsPython search I found this

Re: [PHP] I am completely lost and need an advice (beginner)

2013-07-18 Thread shiplu
On Fri, Jul 19, 2013 at 1:08 AM, php colos wrote: > Am I reading the wrong books for a beginner? > Do you just read the book or also do what it says to do? If you just read but dont code along with it, you may not learn anything. After reading a lot of book you'll feel you have understand a lo

Re: [PHP] strlen ?

2013-07-05 Thread shiplu
On Fri, Jul 5, 2013 at 11:10 PM, Jim Giner wrote: > Mike Hall comes back as 10, not 9 > F.B. comes back as 5, not 4. > Doesn't work for me. php > var_dump("Mike Hall", strlen("Mike Hall")); string(9) "Mike Hall" int(9) Try trimming it first and then apply strlen. -- Shiplu.Mokadd.im ImgSign

Re: [PHP] Fwd: Wanted : Solid/documented/tests Nested Set Model class for mySQL.

2013-06-06 Thread shiplu
If you find one that you are going to use, dont forget to share it here. I'll need this on a certain phase of my current project. -- Shiplu.Mokadd.im ImgSign.com | A dynamic signature machine Innovation distinguishes between follower and leader

Re: [PHP] Seemingly incorrect strict standard.

2013-06-03 Thread shiplu
Show a short reproducible code.

Re: [PHP] Has this always been the case?

2013-05-31 Thread shiplu
On Fri, May 31, 2013 at 5:12 PM, Stuart Dallas wrote: > That is not entirely correct. It must be a literal value. The expression > 'a'.'b' is a constant value. > I may be being overly picky here, but I think it's an important distinction. > I thought 'a'. 'b' is a constant expression and 'ab' is

Re: [PHP] Has this always been the case?

2013-05-31 Thread shiplu
Yes, this has been always the case. The property initializer in PHP can not have any expression. It should be constant value. If you want to use expression here use the constructor. class MyClass{ protected $nonStaticField; static protected $staticField; public function __construct(){

Re: [PHP] How do I remove a string from another string in a fuzzy way?

2013-05-20 Thread shiplu
Is your ticketing system written from scratch? Because such type of logic is already implemented in existing help desk softwares. I think you can also use a specific string in your email to define which part goes in ticket and which part not. For example, you can include "PLEASE REPLY ABOVE THIS L

Re: [PHP] pass parameter via URL

2013-05-20 Thread shiplu
On Mon, May 20, 2013 at 7:49 PM, iccsi wrote: > Thanks for the message and helping, > Your js looks like to parse URL. > Please let me know if I am wrong, > Do you have any code to generate the URL parameter using control value? > > Thanks again for helping, > > Iccsi,

Re: [PHP] pass parameter via URL

2013-05-20 Thread shiplu
On Mon, May 20, 2013 at 7:17 PM, iccsi wrote: > I would like to know how can I pass a parameter via URL using control > value on the form. > something like myPage.php?MyID=txtMyID.value > I can use myPage.php?MyID=1, but cannot use myPage.php?MyID=txtMyID.value. > > Your help and information is g

Re: [PHP] A little confused

2013-04-23 Thread shiplu
On Tue, Apr 23, 2013 at 4:07 PM, Chris Knipe wrote: > echo date_format($_SESSION['ExpiryDate'], "D, \t\h\e jS \o\f M Y"); > Why not construct DateTime object echo date_format(new DateTime($_SESSION['ExpiryDate']), "D, \t\h\e jS \o\f M Y"); Or $dt = new DateTime($_SESSION['ExpiryDate']); echo

Re: [PHP] Newbie Question - Parse XML with PHP...

2013-04-21 Thread shiplu
On Apr 22, 2013 7:00 AM, "Bastien Koert" wrote: > > I have an app that gets passed in xml and use this code to read that data in > > // We use php://input to get the raw $_POST results. > $xml_post = file_get_contents('php://input'); $xml_post is string. I think now you know what to do.

Re: [PHP] Newbie Question - Parse XML with PHP...

2013-04-20 Thread shiplu
> > > > Question: how do you use $mylist when the xml is not as a file but is > returned on a web page? > I assume It returns as a string from page. Then use simplexml_load_string(). See http://php.net/manual/en/function.simplexml-load-string.php -- Shiplu.Mokadd.im ImgSign.com | A dynamic sig

Re: [PHP] Re: Is BBCode Installed

2013-04-11 Thread shiplu
On Fri, Apr 12, 2013 at 4:24 AM, Stephen wrote: > Now I have to install on my home development machine! You can install it by following command pecl install bbcode Note: root privilege is necessary to install -- Shiplu.Mokadd.im ImgSign.com | A dynamic signature machine Innovation distingu

Re: [PHP] Lifetime

2013-02-26 Thread shiplu
Constants are available as long as the PHP process is executing. Destructors are called before a class instance is being wiped out from memory. But it does not remove a class or undefine a class. It works with instance. So a class constant never gets undefined. It stays with class definition.

Re: [PHP] PHP Application Installer Needed

2013-02-22 Thread shiplu
I think modifying WAMP will do it. Earlier I did distribute apps by deploying Virtualbox appliances. Google "virtualbox appliances" for more information. IMHO this approach is better as the system will not be coupled with the host system. On Fri, Feb 22, 2013 at 4:26 PM, Dare Williams wrote: > L

Re: [PHP] Strip emails from a document

2013-01-26 Thread shiplu
What is your input? On Sat, Jan 26, 2013 at 11:29 PM, Tedd Sperling wrote: > > On Jan 26, 2013, at 12:20 PM, Daniel Brown wrote: > > > >It's imperfect, but will work for the majority of emails: > > > > > function scrape_emails($input) { > > > > preg_match_all("/\b([a-z0-9%\._\+\-]+@[a-

Re: [PHP] Strip emails from a document

2013-01-26 Thread shiplu
I think you meant extract emails from document, right? I'd probably find `@` and iterate before and after unless I get posix punct, space, characters. But it'll probably give some false matches. So its really hard to find 100% emails from an arbitrary text. This is because valid email can contain

Re: [PHP] Configuration Issue (Error 310 ERR_TOO_MANY_REDIRECTS)

2013-01-09 Thread shiplu
Could you run curl --head -i --max-redirs 10 http://yoursite.com > headers.log And paste the log here? On Thu, Jan 10, 2013 at 2:25 AM, Ken Kixmoeller wrote: > Hey, folks - > > One of my applications is being moved to a new server. Testing it out, I > get the subject error. The error is

Re: [PHP] Rest Authentication

2012-11-11 Thread shiplu
Its rather better to auto using a apikey. You'll provide this apikey on the website where user registers their application. On Mon, Nov 12, 2012 at 12:45 AM, Stuart Dallas wrote: > On 10 Nov 2012, at 23:28, Adam Tong wrote: > > > I am developing a REST API. I found the Slim micro-framework use

Re: [PHP] Date comparison going wrong, wrong, wrong

2012-11-11 Thread shiplu
You can always use timestamp which is integer. $todaydate = time(); $showenddate = strtotime($showsRecord['end_date']); On Mon, Nov 12, 2012 at 12:30 AM, Terry Ally (Gmail) wrote: > Hi all, > > I am having a problem with comparing time. I am using the following: > > $todaydate = date("D, M jS,

Re: [PHP] PHP as Application Server

2012-09-26 Thread shiplu
My recent experience is PHP eats more memory. But it matters when you are running it under memory constraint device. For a high end server its not a matter. I built an chat server using socket functions which was intended to run on embedded device. I didn't want to load apache. So I wrote it in pla

Re: [PHP] memory allocation

2012-09-25 Thread shiplu
I would like to see how you are reading data from database? There are many ways to reduce memory usage. Here is a very common way reduce memory. instead of $res = mysql_query("select * from table1 limit 1000"); while($row = mysql_fetch_assoc($res)){ /// process row. } Do this, for($x = 0

Re: [PHP] Joining a team, where no wiki or docs are available

2012-09-24 Thread shiplu
On Mon, Sep 24, 2012 at 9:09 PM, AmirBehzad Eslami wrote: > Shiplu, > For debugging, what else do you use beyond xdebug and var_dump() ? Netbeans for PHP and Eclipse PDT. Both has good debugger support. An all-in-one package will server your purpose. Otherwise configuring xdebug mi

Re: [PHP] Joining a team, where no wiki or docs are available

2012-09-24 Thread shiplu
If there is no wiki there could be inline comment. If not inline comments and those are written by your peers, dont join that team. Even there are inline comments you'll need to understand the architecture fast. Inline comments will help to understand a small context but not the whole For this try

Re: [PHP] Images can execute php script?

2012-09-23 Thread shiplu
On Sun, Sep 23, 2012 at 9:57 PM, admin wrote: > Today I seen a hack into php that has rocked me to my foundation. > I seen a picture uploaded onto a server using php and when php displayed > the > image, phpinfo() was executed and displayed. > > Does this problem exist in PHP 5.2.17 +? > How do y

Re: [PHP] Risks involved in MyISAM to Innodb

2012-09-21 Thread shiplu
On Fri, Sep 21, 2012 at 7:03 PM, Girish Talluru wrote: > Hi Guys, > > I have requirement to change my production database tables which are using > myISAM and now bcoz of some changes we have to move to Innodb. > > Can anyone suggest how the plan should be and risks involve? > > Thanks, > Girish Ta

Re: [PHP] tricky code problem

2012-09-17 Thread shiplu
Without relevant code and what have you tried your questions don't make any sense. -- Shiplu.Mokadd.im ImgSign.com | A dynamic signature machine Innovation distinguishes between follower and leader

Re: [PHP] redirect a shell command to stdout in real time

2012-09-11 Thread shiplu
You can use pipe to run the command and capture the stdout. Then dump it with proper header to browser. Note, If the external command (specially video encoding) takes long time you should probably use cron for this and maintain a queue. I recommend you apply some sorts of caching also. -- Shiplu

Re: [PHP] The end of "mysql"

2012-09-07 Thread Shiplu
, I'm told I'm s... > outta luck. > > I suggest you use a VPS. Cost of a VPS and a shared server is in same range nowadays. -- Shiplu Mokaddim Talks: http://shiplu.mokadd.im Follow: http://twitter.com/shiplu Innovation distinguishes between follower and leader

Re: [PHP] Coding Web search engine in PHP

2012-08-06 Thread shiplu
On Mon, Aug 6, 2012 at 11:22 PM, Daniel Brown wrote: > On Mon, Aug 6, 2012 at 1:15 PM, shiplu wrote: > >> Where *do* come up with those names :) > >> > > > > Sorry I couldn't understand the meaning of your sentence. May be this is > > due to cultural

Re: [PHP] Coding Web search engine in PHP

2012-08-06 Thread shiplu
> Where *do* come up with those names :) > Sorry I couldn't understand the meaning of your sentence. May be this is due to cultural difference. Anyway, Solr is a search engine. Nutch is a crawler. Both can be integrated. Then one can send query to solr server from php using api. See http://wiki.

Re: [PHP] Coding Web search engine in PHP

2012-08-06 Thread shiplu
On Mon, Aug 6, 2012 at 8:24 PM, Ansry User 01 wrote: > We are trying to code a very simple and customized search engine for > internal purposes. Please suggest if the PHP is the way to go or suggest > the alternatives?? > > It would be great if you can lead us to the links which would give us a >

Re: [PHP] Regex

2012-07-27 Thread shiplu
>#[0-9a-zA-Z,\.]# > > > > You should escape out that period as it will match any character otherwise. > Thanks, > Ash > Ash, Thats not true. In character class only meta-characters are \ ^ - [ and ]. This is the rule of PCRE (see http://www.pcre.org/pcre.txt

Re: [PHP] PDO: extend or encapsulate?

2012-07-15 Thread shiplu
>From OOP point of view. Use encapsulation: When a class has a "has-a" relation-ship with other class you should use encapsulation. For example, If MyDB is a class that "has-a" pdo driver in it, then PDO will be encapsulated inside MyDB class. This is also called containment. MyDB should contain P

Re: [PHP] Way to test if variable contains valid date

2012-07-03 Thread shiplu
> > > I want to thank you, Daniel, for this help. - I was looking for an > "isarray" type function There is no such function or facility in php. However you can check date in string by DateTime object also try { $date = new DateTime('2000-01-01'); } catch (Exception $e) { echo $e->getMe

Re: [PHP] Dynamically Populating Multi-Dimensional Arrays

2012-05-31 Thread shiplu
On Thursday, May 31, 2012, Mackintosh, Mike wrote: > Hi All, > > > > I was working on a project and needed to dynamically populate a > multi-dimensional array based on the size of an array. The script does > exactly what I want it to do, but I can't imagine that it's done in the > best way. I used

Re: [PHP] What is The best way/tool for debuging PHP?

2012-05-26 Thread shiplu
There is nothing you can call best. But whether some tools, technology will perform better depends completely on the context. I know some ways to debug PHP codes. 1. Netbeans IDE. The debugging facility here is excellent. You can debug even a single file without creating a project. It uses xdebu

Re: [PHP] Need help on increment date

2012-05-24 Thread shiplu
It works for me too. I tell you two things, a) make sure there is a space after +1 day. So it should look like "+1 day ". This ensures that the unix time is not concatenated with "day". b) calling strtotime 2 times is not a great solution. You can all it once only. Like this, $date = strtoti

Re: [PHP] Function size

2012-05-23 Thread shiplu
On Thu, May 24, 2012 at 1:56 AM, Matijn Woudt wrote: > I agree that large switch block are not always easy and useful to split, > however, writing too much code inside a switch block isn't considered good > practice too IMO. Though, it is unavoidable in some cases I think. I do > have some of the

Re: [PHP] Function size

2012-05-23 Thread shiplu
On Wed, May 23, 2012 at 8:14 PM, Tedd Sperling wrote: > Hi gang: > > On May 21, 2012, at 8:32 PM, tamouse mailing lists wrote: > > A rule of thumb is no more than 50 lines per > > function, most much less. Back in the day when we didn't have nifty > > gui screens and an 24 line terminals (yay gr

Re: [PHP] regexp novice

2012-05-18 Thread shiplu
On Fri, May 18, 2012 at 7:34 PM, Stuart Dallas wrote: > Based on your requirements, 00:40 is completely valid. Why do you think it > should be invalid? 00:40 is not a valid 12-hour format. BTW I just found another non-regex approach. Its even faster. function valid_time_Shiplu2($time) { s

Re: [PHP] regexp novice

2012-05-17 Thread Shiplu
ubstr($time, -2); $h = (explode(':', substr($time, 0, -2))); $h = $h[0]; return (is_numeric($h) && is_numeric($m) && $h>0 && $h<13 && $m>=0 && $m<60); } See the code in action here http://ideone.com/tSQIb -- Shi

Re: [PHP] regexp novice

2012-05-17 Thread shiplu
On Fri, May 18, 2012 at 2:37 AM, Jim Giner wrote: > ok - finally had to come up with my own regexp - and am failing. > > Trying to validate an input of a time value in the format hh:mm, wherein > I'll accept anything like the following: > hmm > hhmm > h:mm > hh:mm > > in a 12 hour format. My prob

Re: [PHP] alias address in REMOTE_ADDR

2012-05-11 Thread shiplu
On Saturday, May 12, 2012, shiplu wrote: > > > On Saturday, May 12, 2012, Tóth Csaba wrote: > >> Hi Everyone, >> >> I've run into a curious problem, not even really sure it's PHP, but >> that's where >> I caught it, so here it is: >

Re: [PHP] alias address in REMOTE_ADDR

2012-05-11 Thread shiplu
On Saturday, May 12, 2012, Tóth Csaba wrote: > Hi Everyone, > > I've run into a curious problem, not even really sure it's PHP, but that's > where > I caught it, so here it is: > > I have two servers hanging on the net, without proxies. Let's call them > Server1 > and Server2. Server1 has multiple

Re: [PHP] Segmentation fault while fetching BLOB data from mysql with ODBC

2012-04-26 Thread shiplu
On Thursday, April 26, 2012, Leandro Dardini wrote: > Anyone has experienced segmentation fault while reading blob (longblog) > data from mysql using ODBC? > > If not, can you provide me few rows of code to show me how you fetch it? > > I am using php 5.3.3 and this code segfaults: > > $conn=odbc_

[PHP] RSS Standardness

2012-04-03 Thread shiplu
Dealing RSS Version. I am going to write an RSS parser. Its a very simple parser which just grabs the latest items date and title. SimpleXML and DomDocument is my friend here. The problem here is there are too many standards for RSS. RSS 2.0, 0.92 and 0.91. What do you think which version should I

Re: [PHP] To ?> or not to ?>

2012-04-03 Thread shiplu
I keep my closing tag. Earlier I started removing closing tag. Then I search for the standardness of this practice and found its not standard. Some frameworks/cms intentionally do this. Besides a signle `\n` character is allowed after the closing tag which does not cause "Can not send Header" error

Re: [PHP] Function mktime() documentation question

2012-03-07 Thread shiplu
> To get the number of days for a specific month, I use: > > // $current_month is the month under question > > $next_month = $current_month + 1; I use this $next_month = $current_month + 1; $next_month_1= mktime(0, 0, 0, $next_month, 1, date("Y") ); $current_month_1= mktime(0, 0, 0, $curr

Re: [PHP] PHP run from console - automatic password input

2011-11-29 Thread shiplu
Did you try -passin, -passout options of openssl command? See the man page here http://linux.die.net/man/1/openssl Specially the "Pass phrase arguments" section. -- Shiplu.Mokadd.im ImgSign.com | A dynamic signature machine Innovation distinguishes between follower and leader

Re: [PHP] PHP run from console - automatic password input

2011-11-28 Thread shiplu
"); But if its a privilege issue on your linux system, its better to start the php script with proper privilege. -- Shiplu Mokadd.im Innovation distinguishes between follower and leader

Re: [PHP] PHP exercises

2011-11-28 Thread shiplu
Here is a good place for logic building. http://projecteuler.net/ -- Shiplu Mokadd.im Innovation distinguishes between follower and leader

Re: [PHP] PHP exercises

2011-11-25 Thread shiplu
et it. When it comes to real deal, you never forget it. -- Shiplu Mokadd.im Follow me, http://twitter.com/shiplu Innovation distinguishes between follower and leader

Re: Re: [PHP] include

2011-11-20 Thread shiplu
s a data point. > > And here's another question. Can a child forked by pcntl_fork() use a > socket that the parent obtained? Reading the socket stuff in the PHP doc, > there are a number of user-supplied notes hinting this might be problematic. > > -- > Cheers -- Tim > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- Shiplu Mokadd.im Follow me, http://twitter.com/shiplu Innovation distinguishes between follower and leader

Re: [PHP] What's the problem with this PHP code?

2011-11-04 Thread shiplu
ok-Pro:**tmp red_angel$ > > > > > So --- what am I missing? What am I doing wrong? I'm pulling my hair out > over this one! Anyone have a clue what's up? I can see that the colon is > present *multiple* times in the string that is meant to be split! How come > PHP's

Re: [PHP] Why does this script run out of memory?

2011-10-28 Thread shiplu
ot; ); // break the loop break; > > } $offset+=$limit; } > ?> > > Its the same thing but you are fetching data in chunks. Now this portion "order by contract" on quarter million rows is not a good practice. It will slow down your query time and make the script severely sl

Re: [PHP] Exporting large data from mysql to html using php

2011-10-24 Thread Shiplu Mokaddim
2-3 minutes is long enough. I think your SELECT query and MySQL schema has something that can be improved. Sent from a handheld device. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Friday Distraction

2011-10-21 Thread shiplu
I saw this 3-4 days ago. And yes, I didn't allow the app to post anything on my wall. :D -- Shiplu Mokadd.im Follow me, http://twitter.com/shiplu Innovation distinguishes between follower and leader

Re: [PHP] Dennis Ritchie, Father of Unix and C programming language, dead at 70

2011-10-15 Thread shiplu
I found this, And I liked it. int main() { printf("Goodbye Daddy\n"); return 0; } -- Shiplu Mokadd.im Follow me, http://twitter.com/shiplu Innovation distinguishes between follower and leader

Re: [PHP] Intentionally generate an "Internal Server Error"

2011-08-06 Thread shiplu
By the way, You can also try sending proper html page and http header that will copy the Internal Server Error. That is completely possible in php. Just use the header() function. -- Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu Innovation distinguishes

Re: [PHP] Intentionally generate an "Internal Server Error"

2011-08-06 Thread shiplu
You can search for a buggy extension that has known issue of segmentation faults. -- Shiplu Mokadd.im Follow me, http://twitter.com/shiplu Innovation distinguishes between follower and leader

Re: [PHP] Intentionally generate an "Internal Server Error"

2011-08-06 Thread shiplu
using GoDaddy. > > Can someone suggest some invalid PHP code that should generate an > internal server error? > > Thank you. > > One way would be, write a php extension and perform segfaults there. -- Shiplu Mokadd.im Follow me, http://twitter.com/shiplu Innovation distinguishes between follower and leader

Re: [PHP] PHP frameworks

2011-07-21 Thread shiplu
sily what they're doing). > Documentation is some of the best out there. > Using Kohana 2. Its too old. But most of my skeleton codes are written in this framework. So not changing it. -- Shiplu Mokadd.im Follow me, http://twitter.com/shiplu Innovation distinguishes between follower a

Re: [PHP] str_replace around a character??

2011-07-13 Thread Shiplu Mokaddim
If you are looking for a one liner reg ex, it may take some time. This may lead wasting your development time. Better you do the following, 1. replace the string with tokens in address. 2. Split using comma. 3. Apply common email regex. 4. Replace tokens with actual strings. 5. Rebuild/join the

Re: [PHP] What type of PHP5 shall I install to learn PHP5 together with Apache, Please specify the Apache type too Since There are Two Apache types also

2011-07-08 Thread Shiplu Mokaddim
See https://help.ubuntu.com/community/ApacheMySQLPHP Also you can try the command bellow sudo apt-get install lamp-server^ Note, ^ is a part of the package name. Sent from a handheld device > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.p

Re: [PHP] Call to undefined function

2011-06-23 Thread Shiplu Mokaddim
Sent from a handheld device On 24-Jun-2011, at 5:53 AM, wrote: > I am running a scheduled task for the first time since switching from linux > to Windows IIS > > I am getting an error when the task runs. > > Fatal error: Call to undefined function mysql_connect() > > > I ran php.exe -m to

Re: [PHP] Warning: Cannot modify header information - headers already sent by - classic

2011-05-20 Thread shiplu
allowing a header('Location:'); call to redirect without throwing an > error after output has been sent to the browser? > > Marc > Marc, I think you should mimic this in command line using curl. You can easily understand where the extra byte before headers are coming. >

Re: [PHP] Sending messages from php to C++ application via UDP socket

2011-05-19 Thread shiplu
On Thu, May 19, 2011 at 3:14 PM, Richard Quadling wrote: > On 18 May 2011 18:03, shiplu wrote: > > Try to think a string is an array of bytes. > > Parse that array of bytes at C++ end. > > There should host to network and network to host data conversion >

Re: [PHP] Sending messages from php to C++ application via UDP socket

2011-05-18 Thread shiplu
Try to think a string is an array of bytes. Parse that array of bytes at C++ end. There should host to network and network to host data conversion function. Use them. -- Shiplu Mokadd.im

Re: [PHP] $$var

2011-03-06 Thread shiplu
Just being curious, I have a question. How many times PHP interpreter will replace this variables? I mean how deep it will be? If I use variable variables like $$a how long it will be evaluated? -- Shiplu

[PHP] Performance Improvement on Calling C++ executable from PHP

2010-12-19 Thread Shiplu
reate a standalone multi-threaded server that calls a.out and php calls that server. 2. Call a.out as a CGI and convert it that way. Any ideas? -- Shiplu Mokadd.im -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Performance Improvement on Calling C++ executable from PHP

2010-12-19 Thread shiplu
my ideas are, 1. Create a standalone multi-threaded server that calls a.out and php calls that server. 2. Call a.out as a CGI and convert it that way. Any ideas? -- Shiplu Mokadd.im My talks, http://talk.cmyweb.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:

Re: [PHP] range header in curl?

2010-11-21 Thread shiplu
3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35 May be this will help you. -- Shiplu Mokaddim http://talk.cmyweb.net

Re: [PHP] Re: use of ini vs include file for configuration

2010-11-11 Thread shiplu
For configuration, I used to use .php file earlier. I just used array syntax to keep the config values. But now I use json syntax. Its easy like xml. Ini file is much more user friendly than json though. -- Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu

Re: [PHP] What other languages do you use?

2010-10-08 Thread shiplu
At home I always speak in Bangla. But at work I have to speak in English. I watch Hindi movies well. So I understand Hindi too. I used, C Java C++ C# ActionScript Javascript Perl PHP Bash LISP Currently I am working in LISP C C++ At home I play with Bash, Javascript, PHP, C -- Shiplu

Re: [PHP] PHPExcel with large files (27,000+ rows)

2010-10-04 Thread shiplu
fast > one! > > > Thanks, > Chris. > 1. Remove any variable that contains big object if its not necessary. 2. Use unset when applicable 3. Read chunk by chunk. 4. Profile it to find the exact place where you are wasting memory. Optimizing that little portion of code

Re: [PHP] version_compare

2010-09-30 Thread shiplu
e questionable. > > Under what conditions would version_compare() return true, yet the > filter_var() be undefined? Because that's what is happening. > > Thank you. > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.ne

Re: [PHP] how do you upload to a 3rd-party remote server?

2010-08-06 Thread shiplu
You have to maintain a queue if I understand it properly. PHP page will send request on one end of queue. And the server side cron will process from other end. Cron will upload it to ftp. Now you can implement a queue using database table or you can just use a file. Shiplu Mokadd.im My talks

Re: [PHP] MySQL Query Puzzle

2010-07-19 Thread shiplu
Use distinct. SELECT DISTINCT COLUMN1, COLUMN2 FROM ... ... Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest) -- PHP General Mailing

Re: [PHP] Determining the similarity between a user supplied short piece of text (between 5 and 15 characters) and a list of similar length text items.

2010-07-17 Thread shiplu
ame can be different. As a developer I am not sure actually what function in php or mysql serves the purpose. Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Job

Re: [PHP] Converting a javascript calculating page to a PHP one

2010-07-17 Thread shiplu
You can use SpiderMoneky of Mozilla or V8 of Google to execute the js. Later you can also create a php extension to call your lib. The flow will be like this, PHP <--> PHP_V8_WRAPPER <--> V8 <--> EXECUTE_JS Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://

Re: [PHP] integrating lib (C++) into php

2010-07-15 Thread shiplu
Sure. All you have to do is write a php extension. Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest) -- PHP General Mailing List (http

Re: [PHP] interface name file

2010-07-08 Thread shiplu
I use naming convention for interface. If an object can be cached, I create an interface I+Cache+able = ICachable. So a sample class would be named as ASampleClass.php And the Interface would be ICachable.php This is a well known interface naming convention. Shiplu Mokadd.im My talks, http

Re: [PHP] curl

2010-07-04 Thread shiplu
# yum install php4-curl or # yum install php-curl Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest) -- PHP General Mailing List (http

[PHP] complex unf8 indic script rendering and cairo

2010-07-02 Thread shiplu
dic script rendering that'll be great. Thanks Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest) -- PHP General Mailing List (http://w

Re: [PHP] Re: stripping first comma off and everything after

2010-06-18 Thread shiplu
I'll use, list($data) = explode(",",$entries[$i]["dn"]); Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest) --

Re: [PHP] Set up MySQL + Apache 2.2.4 on Win XP

2010-06-02 Thread shiplu
Actually you just restore your NS schema in the new EasyPHP stack. Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest) -- PHP General

Re: [PHP] Set up MySQL + Apache 2.2.4 on Win XP.

2010-06-01 Thread shiplu
mber. Its written just like this, port= 3306 Change is to port= 3307 or whatever port you like. Then restart mysql. But remember, all you php app need to connect mysql through that 3307 port which is not standard. So mysql_connect() functions params should be tweaked. Shiplu Moka

Re: [PHP] Set up MySQL + Apache 2.2.4 on Win XP.

2010-06-01 Thread shiplu
application. Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] editing a file

2010-05-24 Thread shiplu
You can use shell commands. Like sed, replace etc .. Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest) -- PHP General Mailing List (http

Re: [PHP] PHP Encoder like IonCube

2010-05-12 Thread shiplu
It just obfuscates. Long ago I created a decoder for this type of encoder. Every day I got 100s of decoding requests. After changing my domain and hosting company I didn't upload it yet. I think bcompiler is better. Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitte

Re: [PHP] PHP Encoder like IonCube

2010-05-12 Thread shiplu
Can you paste a sample encoded version of a php file on pastie.org? Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest) -- PHP General

Re: [PHP] PHP Encoder like IonCube

2010-05-11 Thread shiplu
I dont own a windows computer. I found phpcoder.sf.net. it uses eaccelerator to encode. This is good. But the problem is latest version of e-accelerator discontinued the encoder. So may be, an older version will do it. Didn't configured it yet. Shiplu Mokadd.im My talks, http://talk.cmywe

Re: [PHP] Re: regexp questions

2010-05-11 Thread shiplu
oops! Please see the change log for version 8.00 on http://www.pcre.org/changelog.txt Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest)

Re: [PHP] Re: regexp questions

2010-05-11 Thread shiplu
I think the error is related to changed described here. http://www.pcre.org/changelog.txt Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest

Re: [PHP] regexp questions

2010-05-10 Thread shiplu
For example, the following regex doesn't work. return (bool) preg_match('/^[\pL\pN\pZ\p{Pc}\p{Pd}\p{Po}]++$/uD', (string) $str); Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2p

[PHP] Re: PHP Encoder like IonCube

2010-05-10 Thread shiplu
Hello Ashley, My application will not be accessible through Internet. Users will use it through internal network. And internet is strictly prohibited there. Thats the reason why i'm lookin for such solution. On 5/10/10, Ashley Sheridan wrote: > On Mon, 2010-05-10 at 12:42 +0600, ship

Re: [PHP] PHP Encoder like IonCube

2010-05-09 Thread shiplu
If thats the case its okay. Sometimes an obfuscated code is enough to protect it. As far I remember I heard somewhere it can be achieved by e-accelerator somehow. How is it possible? Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Progr

[PHP] PHP Encoder like IonCube

2010-05-09 Thread shiplu
Is there any php encoder like IonCube ? Looking for an opensource solution. My main target is to deliver encoded php codes so that it can not be re-engineered. Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group

  1   2   >