Re: [PHP] Is it possible to click download button,and run 2 tasks downloading a file and show number of downloads(ajax)simultaneously?

2012-10-15 Thread Negin Nickparsa
Thanks Tedd,

ajax works fine now,when submiting a button it will show the number and it
doesn't have any problem


$(function() {

 $(".button").click(function(){
 var id=$(this).attr('id');
 var dataString = 'id='+ id ;
$.ajax({
   type: "POST",
   url: "download_number.php",
   data: dataString,
   cache: false,
   success: function(html)
   {
  $("#div_"+id).html(html);
  }  });
}

button:



div:





by the way* I totally will refuse this approach* because,although the ajax
is working,but I can't do anything for click to download the related file
because when I go to my php page I can't redirect it to a page for download
and besides echo the output to be written in div element,so that,the best
solution is just redirect to a page and download the file in first place.
after submiting write a $_POST['submit'] and just store the download
count,update the table and if user refreshed the page,can see the number of
downloads,*as sure there isn't anything better than this.*

Marco suggested me iframe,reloading it,like a manual ajax but I think it
has much of troubles.

by the way thanks for all helps.


Re: [PHP] Is it possible to click download button,and run 2 tasks downloading a file and show number of downloads(ajax)simultaneously?

2012-10-15 Thread Negin Nickparsa
oh my bad:)! there is a cool solution,I forgot the blank page!:) yep!
solved:)


 window.open('download.php', '_blank' );

now I can count up,and download:)

 $(".button").click(function(){
 var id=$(this).attr('id');
 var dataString = 'id='+ id ;
$.ajax({
   type: "POST",
   url: "download_number.php",
   data: dataString,
   cache: false,
   success: function(html)
   {
  $("#div_"+id).html(html);
  }  });
 window.open('download.php', '_blank' );
 });

so cool!!:)

On Mon, Oct 15, 2012 at 7:42 PM, Negin Nickparsa wrote:

> Thanks Tedd,
>
> ajax works fine now,when submiting a button it will show the number and it
> doesn't have any problem
>
>
> $(function() {
>
>  $(".button").click(function(){
>  var id=$(this).attr('id');
>  var dataString = 'id='+ id ;
> $.ajax({
>type: "POST",
>url: "download_number.php",
>data: dataString,
>cache: false,
>success: function(html)
>{
>   $("#div_"+id).html(html);
>   }  });
> }
>
> button:
>
> 
>
> div:
>
> 
>
>
>
> by the way* I totally will refuse this approach* because,although the
> ajax is working,but I can't do anything for click to download the related
> file because when I go to my php page I can't redirect it to a page for
> download and besides echo the output to be written in div element,so
> that,the best solution is just redirect to a page and download the file in
> first place. after submiting write a $_POST['submit'] and just store the
> download count,update the table and if user refreshed the page,can see the
> number of downloads,*as sure there isn't anything better than this.*
>
> Marco suggested me iframe,reloading it,like a manual ajax but I think it
> has much of troubles.
>
> by the way thanks for all helps.
>
>
>
>


Re: [PHP] ODBC

2013-05-18 Thread Negin Nickparsa
do you have the driver in linux?
https://www.microsoft.com/en-us/download/details.aspx?id=28160



On Tue, May 7, 2013 at 11:46 AM, georg  wrote:

> but isnt there some yum command that will fix things for me (download if
> necessary, but I actually think
> the ODBC would be in the distribution of fedora ?)
>
> br georg
>
> - Original Message - From: "David OBrien" 
> To: "georg" 
> Cc: "PHP General" 
> Sent: Monday, May 06, 2013 11:06 PM
> Subject: Re: [PHP] ODBC
>
>
>
>  On Mon, May 6, 2013 at 3:32 PM, georg  wrote:
>>
>>  Hi,
>>>
>>> Id like to get ODBC connection to SQL from PHP going. Ive done that on
>>> XP,
>>> but now Im switching
>>> to Linux (Fedora).
>>>
>>> My impression in that the connecting part is per the DB designers
>>> responsibility. Im using Mimer-SQL,
>>> but cant find any information on how to set up ODBC for that. Any advice
>>> welcome.
>>>
>>> BR georg
>>>
>>
>>
>> http://developer.mimer.com/**howto/howto_57.htm
>>
>>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


[PHP] totally a newbie in sending phone number to a webserver

2013-05-21 Thread Negin Nickparsa
I registered a SMS web service and I have username and password
and there are methods as follow which I can use:

balance
receive
send
send to all
send advanced
status
status advanced

suppose I have a form and I will get the phone number from user
also I have user name,pass and url of the web service
like $phone['number'],$user,$pass,$url

I don't know what exactly I should do to force the php code read from the
functions of the web service does including the url enough?
I am totally mixed up.

can someone tell me what is happening in this procedure?

is there any tutorial so that I can understand it?
I tried to use sample codes but they were different from which I wanted.

Thanks in Advance.


[PHP] high traffic websites

2013-09-17 Thread Negin Nickparsa
In general, what are the best ways to handle high traffic websites?

VPS(clouds)?
web analyzers?
dedicated servers?
distributed memory cache?


Sincerely
Negin Nickparsa


Re: [PHP] high traffic websites

2013-09-18 Thread Negin Nickparsa
Thank you Sebastian..actually I will already have one if qualified for the
job. Yes, and I may fail to handle it that's why I asked for guidance.
I wanted some tidbits to start over. I have searched through yslow,
HTTtrack and others.
I have searched through php list in my email too before asking this
question. it is kind of beneficial for all people and not has been asked
directly.


Sincerely
Negin Nickparsa


On Wed, Sep 18, 2013 at 10:45 AM, Sebastian Krebs wrote:

>
>
>
> 2013/9/18 Negin Nickparsa 
>
>> In general, what are the best ways to handle high traffic websites?
>>
>> VPS(clouds)?
>> web analyzers?
>> dedicated servers?
>> distributed memory cache?
>>
>
> Yes :)
>
> But seriously: That is a topic most of us spent much time to get into it.
> You can explain it with a bunch of buzzwords. Additional, how do you define
> "high traffic websites"? Do you already _have_ such a site? Or do you
> _want_ it? It's important, because I've seen it far too often, that
> projects spent too much effort in their "high traffic infrastructure" and
> at the end it wasn't that high traffic ;) I wont say, that you cannot be
> successfull, but you should start with an effort you can handle.
>
> Regards,
> Sebastian
>
>
>>
>>
>> Sincerely
>> Negin Nickparsa
>>
>
>
>
> --
> github.com/KingCrunch
>


Re: [PHP] high traffic websites

2013-09-18 Thread Negin Nickparsa
Thank you Camilo

to be more in details,suppose the website has 80,000 users and each page
takes 200 ms to be rendered and you have thousand hits in a second so we
want to reduce the time of rendering. is there any way to reduce the
rendering time?

other thing is suppose they want to upload files simultaneously and the
videos are in the website not on another server like YouTube and so streams
are really consuming the bandwidth.

Also,It is troublesome to get backups,when getting backups you have problem
of lock backing up with bulk of data.



Sincerely
Negin Nickparsa


On Wed, Sep 18, 2013 at 12:50 PM, Camilo Sperberg wrote:

>
> On Sep 18, 2013, at 09:38, Negin Nickparsa  wrote:
>
> > Thank you Sebastian..actually I will already have one if qualified for
> the
> > job. Yes, and I may fail to handle it that's why I asked for guidance.
> > I wanted some tidbits to start over. I have searched through yslow,
> > HTTtrack and others.
> > I have searched through php list in my email too before asking this
> > question. it is kind of beneficial for all people and not has been asked
> > directly.
> >
> >
> > Sincerely
> > Negin Nickparsa
> >
> >
> > On Wed, Sep 18, 2013 at 10:45 AM, Sebastian Krebs  >wrote:
> >
> >>
> >>
> >>
> >> 2013/9/18 Negin Nickparsa 
> >>
> >>> In general, what are the best ways to handle high traffic websites?
> >>>
> >>> VPS(clouds)?
> >>> web analyzers?
> >>> dedicated servers?
> >>> distributed memory cache?
> >>>
> >>
> >> Yes :)
> >>
> >> But seriously: That is a topic most of us spent much time to get into
> it.
> >> You can explain it with a bunch of buzzwords. Additional, how do you
> define
> >> "high traffic websites"? Do you already _have_ such a site? Or do you
> >> _want_ it? It's important, because I've seen it far too often, that
> >> projects spent too much effort in their "high traffic infrastructure"
> and
> >> at the end it wasn't that high traffic ;) I wont say, that you cannot be
> >> successfull, but you should start with an effort you can handle.
> >>
> >> Regards,
> >> Sebastian
> >>
> >>
> >>>
> >>>
> >>> Sincerely
> >>> Negin Nickparsa
> >>>
> >>
> >>
> >>
> >> --
> >> github.com/KingCrunch
> >>
>
> Your question is way too vague to be answered properly... My best guess
> would be that it depends severely on the type of website you have and how's
> the current implementation being well... implemented.
>
> Simply said: what works for Facebook may/will not work for linkedIn,
> twitter or Google, mainly because the type of search differs A LOT:
> facebook is about relations between people, twitter is about small pieces
> of data not mainly interconnected between each other, while Google is all
> about links and all type of content: from little pieces of information
> through whole Wikipedia.
>
> You could start by studying how varnish and redis/memcached works, you
> could study about how proxies work (nginx et al), CDNs and that kind of
> stuff, but if you want more specific answers, you could better ask specific
> question.
>
> In the PHP area, an opcode cache does the job very well and can accelerate
> the page load by several orders of magnitude, I recommend OPCache, which is
> already included in PHP 5.5.
>
> Greetings.
>
>


Re: [PHP] high traffic websites

2013-09-18 Thread Negin Nickparsa
I am a little bit curious: Do you _really_ have 1000 requests/second, or do
you just throw some numbers in? ;)

Sebastian, supposedly_asking_to_get_some_pre_evaluation :)

Even in times, where there is not that much traffix? Automatic backup at
3:00 in the morning for example?

3:00 morning in one country is 9 Am in other country, 3 PM in other country
.

By the way Thank you so much guys, I wanted tidbits and you gave me more.

Stuart, I recall your replies in other situations and always you helped me
to improve.list is happy to have you.

Sincerely
Negin Nickparsa


On Wed, Sep 18, 2013 at 3:39 PM, Sebastian Krebs wrote:

>
>
>
> 2013/9/18 Negin Nickparsa 
>
>> Thank you Camilo
>>
>> to be more in details,suppose the website has 80,000 users and each page
>> takes 200 ms to be rendered and you have thousand hits in a second so we
>> want to reduce the time of rendering. is there any way to reduce the
>> rendering time?
>>
>
> Read about frontend-/proxy-caching (Nginx, Varnish) and ESI/SSI-include
> (also NGinx and Varnish ;)). The idea is simply "If you don't have to
> process on every request in the backend, don't process it in the backend on
> every request".
>
> But maybe you mixed up some words, because the rendering time is the time
> consumed by the renderer within the browser (HTML and CSS). This you can
> improve, if you improve your HTML/CSS :)
>
>
> I am a little bit curious: Do you _really_ have 1000 requests/second, or
> do you just throw some numbers in? ;)
>
>
>>
>> other thing is suppose they want to upload files simultaneously and the
>> videos are in the website not on another server like YouTube and so streams
>> are really consuming the bandwidth.
>>
>
> Well, if there are streams, there are streams. I cannot imagine, that
> there is another way someone can stream a video without downloading it.
>
>
>>
>> Also,It is troublesome to get backups,when getting backups you have
>> problem of lock backing up with bulk of data.
>>
>
> Even in times, where there is not that much traffix? Automatic backup at
> 3:00 in the morning for example?
>
>
>>
>>
>>
>> Sincerely
>> Negin Nickparsa
>>
>>
>> On Wed, Sep 18, 2013 at 12:50 PM, Camilo Sperberg wrote:
>>
>>>
>>> On Sep 18, 2013, at 09:38, Negin Nickparsa  wrote:
>>>
>>> > Thank you Sebastian..actually I will already have one if qualified for
>>> the
>>> > job. Yes, and I may fail to handle it that's why I asked for guidance.
>>> > I wanted some tidbits to start over. I have searched through yslow,
>>> > HTTtrack and others.
>>> > I have searched through php list in my email too before asking this
>>> > question. it is kind of beneficial for all people and not has been
>>> asked
>>> > directly.
>>> >
>>> >
>>> > Sincerely
>>> > Negin Nickparsa
>>> >
>>> >
>>> > On Wed, Sep 18, 2013 at 10:45 AM, Sebastian Krebs >> >wrote:
>>> >
>>> >>
>>> >>
>>> >>
>>> >> 2013/9/18 Negin Nickparsa 
>>> >>
>>> >>> In general, what are the best ways to handle high traffic websites?
>>> >>>
>>> >>> VPS(clouds)?
>>> >>> web analyzers?
>>> >>> dedicated servers?
>>> >>> distributed memory cache?
>>> >>>
>>> >>
>>> >> Yes :)
>>> >>
>>> >> But seriously: That is a topic most of us spent much time to get into
>>> it.
>>> >> You can explain it with a bunch of buzzwords. Additional, how do you
>>> define
>>> >> "high traffic websites"? Do you already _have_ such a site? Or do you
>>> >> _want_ it? It's important, because I've seen it far too often, that
>>> >> projects spent too much effort in their "high traffic infrastructure"
>>> and
>>> >> at the end it wasn't that high traffic ;) I wont say, that you cannot
>>> be
>>> >> successfull, but you should start with an effort you can handle.
>>> >>
>>> >> Regards,
>>> >> Sebastian
>>> >>
>>> >>
>>> >>>
>>> >>>
>>> >>> Sincerely
>>> >>> Negin Nickparsa
>>> >>>
>>> >>
>>> >>
>>> >>
>

Re: [PHP] high traffic websites

2013-09-19 Thread Negin Nickparsa
it may be helpful for someone.
I liked GTmetrix kinda helpful and magic. <http://gtmetrix.com/#!>


Sincerely
Negin Nickparsa


On Wed, Sep 18, 2013 at 4:42 PM, Sebastian Krebs wrote:

> 2013/9/18 Camilo Sperberg 
>
> >
> > On Sep 18, 2013, at 14:26, Haluk Karamete 
> wrote:
> >
> > >> I recommend OPCache, which is already included in PHP 5.5.
> > >
> > > Camilo,
> > > I'm just curious about the disadvantageous aspects of OPcache.
> > >
> > > My logic says there must be some issues with it otherwise it would
>  have
> > come already enabled.
> > >
> > > Sent from iPhone
> > >
> > >
> > > On Sep 18, 2013, at 2:20 AM, Camilo Sperberg 
> wrote:
> > >
> > >>
> > >> On Sep 18, 2013, at 09:38, Negin Nickparsa 
> wrote:
> > >>
> > >>> Thank you Sebastian..actually I will already have one if qualified
> for
> > the
> > >>> job. Yes, and I may fail to handle it that's why I asked for
> guidance.
> > >>> I wanted some tidbits to start over. I have searched through yslow,
> > >>> HTTtrack and others.
> > >>> I have searched through php list in my email too before asking this
> > >>> question. it is kind of beneficial for all people and not has been
> > asked
> > >>> directly.
> > >>>
> > >>>
> > >>> Sincerely
> > >>> Negin Nickparsa
> > >>>
> > >>>
> > >>> On Wed, Sep 18, 2013 at 10:45 AM, Sebastian Krebs <
> krebs@gmail.com
> > >wrote:
> > >>>
> > >>>>
> > >>>>
> > >>>>
> > >>>> 2013/9/18 Negin Nickparsa 
> > >>>>
> > >>>>> In general, what are the best ways to handle high traffic websites?
> > >>>>>
> > >>>>> VPS(clouds)?
> > >>>>> web analyzers?
> > >>>>> dedicated servers?
> > >>>>> distributed memory cache?
> > >>>>>
> > >>>>
> > >>>> Yes :)
> > >>>>
> > >>>> But seriously: That is a topic most of us spent much time to get
> into
> > it.
> > >>>> You can explain it with a bunch of buzzwords. Additional, how do you
> > define
> > >>>> "high traffic websites"? Do you already _have_ such a site? Or do
> you
> > >>>> _want_ it? It's important, because I've seen it far too often, that
> > >>>> projects spent too much effort in their "high traffic
> infrastructure"
> > and
> > >>>> at the end it wasn't that high traffic ;) I wont say, that you
> cannot
> > be
> > >>>> successfull, but you should start with an effort you can handle.
> > >>>>
> > >>>> Regards,
> > >>>> Sebastian
> > >>>>
> > >>>>
> > >>>>>
> > >>>>>
> > >>>>> Sincerely
> > >>>>> Negin Nickparsa
> > >>>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>> --
> > >>>> github.com/KingCrunch
> > >>>>
> > >>
> > >> Your question is way too vague to be answered properly... My best
> guess
> > would be that it depends severely on the type of website you have and
> how's
> > the current implementation being well... implemented.
> > >>
> > >> Simply said: what works for Facebook may/will not work for linkedIn,
> > twitter or Google, mainly because the type of search differs A LOT:
> > facebook is about relations between people, twitter is about small pieces
> > of data not mainly interconnected between each other, while Google is all
> > about links and all type of content: from little pieces of information
> > through whole Wikipedia.
> > >>
> > >> You could start by studying how varnish and redis/memcached works, you
> > could study about how proxies work (nginx et al), CDNs and that kind of
> > stuff, but if you want more specific answers, you could better ask
> specific
> > question.
> > >>
> > >> In the PHP area, an opcode cache does the job very well and can
> > accelerate the page load by several orders of magnitude, I recommend
> > OPCache, which is already included in PHP 5.5.
> > >>
> > >> Greetings.
> > >>
> > >>
> > >> --
> > >> PHP General Mailing List (http://www.php.net/)
> > >> To unsubscribe, visit: http://www.php.net/unsub.php
> > >>
> >
> >
> > The original RFC states:
> >
> > https://wiki.php.net/rfc/optimizerplus
> > The integration proposed for PHP 5.5.0 is mostly 'soft' integration. That
> > means that there'll be no tight coupling between Optimizer+ and PHP;
> Those
> > who wish to use another opcode cache will be able to do so, by not
> loading
> > Optimizer+ and loading another opcode cache instead. As per the Suggested
> > Roadmap above, we might want to review this decision in the future; There
> > might be room for further performance or functionality gains from tighter
> > integration; None are known at this point, and they're beyond the scope
> of
> > this RFC.
> >
> > So that's why OPCache isn't enabled by default in PHP 5.5
> >
>
>
> Also worth to mention, that it is the first release with an opcode-cache
> integrated. Giving the other some release to get used to it, sounds useful
> :)
>
>
> >
> > Greetings.
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> github.com/KingCrunch
>


Re: [PHP] filesize() fails on file and works on it's copy (same permissions, same directory)

2013-09-23 Thread Negin Nickparsa
regardless of you, saying they have same permissions I think they do not
have the same permission

try to use --reference for chmod to see if there is any differences

try to copy the file keeping the whole permissions from original using sudo
cp -rp and check.
if this copy has the warning then your problem is from the permissions.


Sincerely
Negin Nickparsa


On Tue, Aug 13, 2013 at 11:30 AM, Michał Kochanowicz
wrote:

> Hello
>
> I've got a file, which can't be checked with filesize(). I copy it (with
> permissions) and then I can filesize() the copy. This is same directory,
> permissions are same. I don't understand what's the difference. Can you
> help me?
>
> Original file:
>   File: 'DSC_5196_fx-1553725666.JPG'
>   Size: 1907383 Blocks: 3728   IO Block: 4096   regular file
> Device: 803h/2051d  Inode: 5905591363  Links: 1
> Access: (0644/-rw-r--r--)  Uid: (   51/http)   Gid: (   51/http)
> Access: 2013-08-13 00:47:28.107477918 +0200
> Modify: 2013-08-12 21:38:27.219913208 +0200
> Change: 2013-08-13 00:47:08.931478654 +0200
>  Birth: -
>
> Copy:
>   File: 'DSC_5196_fx-1553725666_X.JPG'
>   Size: 1907383 Blocks: 3728   IO Block: 4096   regular file
> Device: 803h/2051d  Inode: 144 Links: 1
> Access: (0644/-rw-r--r--)  Uid: (   51/http)   Gid: (   51/http)
> Access: 2013-08-13 00:45:48.0 +0200
> Modify: 2013-08-12 21:38:27.0 +0200
> Change: 2013-08-13 00:47:28.199477914 +0200
>  Birth: -
>
> The only difference is inode: (5905591363 - doesn't work vs 144 - does
> work).
>
> Test script:
>
> 
> 
> 
>  $f3 = '/home/services/httpd/html.**galeria.XXX/gallery/var/**
> albums/988_Rok-2013/333_**Rydzewo-04-06.08.2013/Sobota/**
> DSC_5196_fx-1553725666.JPG';
> $f4 = '/home/services/httpd/html.**galeria.XXX/gallery/var/**
> albums/988_Rok-2013/333_**Rydzewo-04-06.08.2013/Sobota/**
> DSC_5196_fx-1553725666_X.JPG';
>
> print $f3.": ".filesize($f3)."\n";
> print $f4.": ".filesize($f4)."\n";
>
> ?>
> 
> 
> 
>
> Result:
>
> Warning: filesize(): stat failed for /home/services/httpd/html.**
> galeria.XXX/gallery/var/**albums/988_Rok-2013/333_**
> Rydzewo-04-06.08.2013/Sobota/**DSC_5196_fx-1553725666.JPG in
> /home/services/httpd/html.**galeria.michal.waw.pl/**
> gallery3-3.0.x/test.php<http://html.galeria.michal.waw.pl/gallery3-3.0.x/test.php>on
>  line 13
> /home/services/httpd/html.**galeria.XXX/gallery/var/**
> albums/988_Rok-2013/333_**Rydzewo-04-06.08.2013/Sobota/**DSC_5196_fx-1553725666.JPG:
>
> /home/services/httpd/html.**galeria.XXX/gallery/var/**
> albums/988_Rok-2013/333_**Rydzewo-04-06.08.2013/Sobota/**DSC_5196_fx-1553725666_X.JPG:
> 1907383
>
> Regards
> Michał
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] No MIME-Type in "imap_fetch_overview()"

2013-09-23 Thread Negin Nickparsa
I have read your mail twice and still I could not get what you want
exactly.  can't get the structure of the email either although you
elaborate it in details.

you have said something about human rights that I couldn't understand why?
but if you want to get the type of files fetch the structure and then you
can use disposition string, find the "attachment" and then return the
array.




Sincerely
Negin Nickparsa


On Wed, Sep 18, 2013 at 3:27 PM, Domain nikha.org  wrote:

> Hello all,
>
> im posting this here, because the bug report system of "php.net" is not
> right
> place for my problem. It's not a bug, but a wish - an I found there no
> "wishlist" option at all.
>
> I'm running my own webmail-client, written in PHP. It is stable, fast and
> pretty, showing the full power of the PHP imap section.
>
> Of course it presents paginated content lists for every mailbox the user
> may
> open. These lists tell him some usefull things about every mail actually
> listed:
> Sender, date, subject, size and (eventually) flags.
>
> All these things are nicely delivered by the function
> "imap_fetch_overview()"
> The same could be done by calling "imap_headerinfo()" for every single
> mail, but
> "fetch_overview" seems to be faster, because it does it at once for the
> whole
> batch.
>
> BUT NONE OF THEM returns any information about the MIME-Type of the mail!
>
> Since the user of my webmail client has the intrinsic, natural born an
> general
> human right to KNOW whether some mail in his mailbox has attachments or
> not, I'm
> forced to do very ugly things. My script calls additionally for every (!)
> actually listed mail  "imap_fetchbody($connect, $msg_no, 0)" - where
> "$connect"
> holds the result of "imap_open()".
>
> That gives me the mail header, the script reads the line starting with
> "Content-Type:" and returns its content. Evaluating this against "mixed" or
> "alternative" we have finaly what we want: This mail has attachments! Or is
> written in HTML, what is even more we wanted!
>
> Works fine, but is ugly. First "fetch_overview" parses all mail headers,
> then
> they are fetched again to be parsed for the MIME-Type. I could just omit
> "fetch_overview" and read the headers by my own means, that whould be
> faster,
> but then I loose the size information, that is NOT (and cannot) be part of
> the
> mail header!
>
> If I want to have both, size and MIME-Type, and I WANT to have both,
> respecting
> the intrinsic, natural born and general human rights of my user, im must
> call
> both, "overview" and "fetchbody".
>
> My question is this: Is there a better solution? Or is there someone that
> knows
> someone among the PHP-Developpers to suggest them an improvement of the
> functions "imap_fetch_overivew()" and "imap_headerinfo()". Please, Please,
> add
> the MIME-Type to your fantastic object collections! BTW: It's really easy.
> Read
> the "Content-Type"-Line! Sorry...
>
> Hope, somebody has an idea,
> my regards,
>
> Niklaus
>
>
>
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] No MIME-Type in "imap_fetch_overview()"

2013-09-23 Thread Negin Nickparsa
I have read your mail twice and still I could not get what you want
exactly.  can't get the structure of the email either although you
elaborate it in details.

you have said something about human rights that I couldn't understand why?
but if you want to get the type of files fetch the structure and then you
can use disposition string, find the "attachment" and then return the
array.




Sincerely
Negin Nickparsa


On Wed, Sep 18, 2013 at 3:27 PM, Domain nikha.org  wrote:

> Hello all,
>
> im posting this here, because the bug report system of "php.net" is not
> right
> place for my problem. It's not a bug, but a wish - an I found there no
> "wishlist" option at all.
>
> I'm running my own webmail-client, written in PHP. It is stable, fast and
> pretty, showing the full power of the PHP imap section.
>
> Of course it presents paginated content lists for every mailbox the user
> may
> open. These lists tell him some usefull things about every mail actually
> listed:
> Sender, date, subject, size and (eventually) flags.
>
> All these things are nicely delivered by the function
> "imap_fetch_overview()"
> The same could be done by calling "imap_headerinfo()" for every single
> mail, but
> "fetch_overview" seems to be faster, because it does it at once for the
> whole
> batch.
>
> BUT NONE OF THEM returns any information about the MIME-Type of the mail!
>
> Since the user of my webmail client has the intrinsic, natural born an
> general
> human right to KNOW whether some mail in his mailbox has attachments or
> not, I'm
> forced to do very ugly things. My script calls additionally for every (!)
> actually listed mail  "imap_fetchbody($connect, $msg_no, 0)" - where
> "$connect"
> holds the result of "imap_open()".
>
> That gives me the mail header, the script reads the line starting with
> "Content-Type:" and returns its content. Evaluating this against "mixed" or
> "alternative" we have finaly what we want: This mail has attachments! Or is
> written in HTML, what is even more we wanted!
>
> Works fine, but is ugly. First "fetch_overview" parses all mail headers,
> then
> they are fetched again to be parsed for the MIME-Type. I could just omit
> "fetch_overview" and read the headers by my own means, that whould be
> faster,
> but then I loose the size information, that is NOT (and cannot) be part of
> the
> mail header!
>
> If I want to have both, size and MIME-Type, and I WANT to have both,
> respecting
> the intrinsic, natural born and general human rights of my user, im must
> call
> both, "overview" and "fetchbody".
>
> My question is this: Is there a better solution? Or is there someone that
> knows
> someone among the PHP-Developpers to suggest them an improvement of the
> functions "imap_fetch_overivew()" and "imap_headerinfo()". Please, Please,
> add
> the MIME-Type to your fantastic object collections! BTW: It's really easy.
> Read
> the "Content-Type"-Line! Sorry...
>
> Hope, somebody has an idea,
> my regards,
>
> Niklaus
>
>
>
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


[PHP] designing a post fix

2011-03-17 Thread Negin Nickparsa
i want 2 design a php web for staff members that can sign in with
their accounts n then mail 2 each other i don't know how it really
works by using a mail server i'm beginner at it! but i studied alot
abt it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] designing a post fix

2011-03-17 Thread Negin Nickparsa
internal messaging system

On Thu, Mar 17, 2011 at 8:16 PM, Stuart Dallas  wrote:
> On Thursday, 17 March 2011 at 15:23, Negin Nickparsa wrote:
> i want 2 design a php web for staff members that can sign in with
>> their accounts n then mail 2 each other i don't know how it really
>> works by using a mail server i'm beginner at it! but i studied alot
>> abt it.
>
> Are you talking about interfacing with email, or an internal messaging system?
>
>
> -Stuart
>
> --
> Stuart Dallas
> 3ft9 Ltd
> http://3ft9.com/
>
>
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] designing a post fix

2011-03-17 Thread Negin Nickparsa
I'm Negin
what is Squirrel Mail ?
On Thu, Mar 17, 2011 at 7:55 PM, NetEmp  wrote:
> @Nergin: are you trying to create an application like Squirrel Mail using
> PHP?
>
> On Thu, Mar 17, 2011 at 9:46 PM, Jason Pruim 
> wrote:
>>
>> So what exactly is the question?
>>
>>
>> Jason Pruim
>>
>> On Mar 17, 2011, at 11:23 AM, Negin Nickparsa  wrote:
>>
>> > i want 2 design a php web for staff members that can sign in with
>> > their accounts n then mail 2 each other i don't know how it really
>> > works by using a mail server i'm beginner at it! but i studied alot
>> > abt it.
>> >
>> > --
>> > PHP General Mailing List (http://www.php.net/)
>> > To unsubscribe, visit: http://www.php.net/unsub.php
>> >
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] designing a post fix

2011-03-17 Thread Negin Nickparsa
can i have an email server?
we have 4 example:u...@dpaco.net
or not?
just we must have an emails like gmail n ymail?
if i can have email server how i can code it

i can have tables like this:

CREATE TABLE domains (
domain varchar(50) NOT NULL,
PRIMARY KEY (domain) )
TYPE=MyISAM;



CREATE TABLE forwardings (
source varchar(80) NOT NULL,
destination TEXT NOT NULL,
PRIMARY KEY (source) )
TYPE=MyISAM;



CREATE TABLE users (
email varchar(80) NOT NULL,
password varchar(20) NOT NULL,
quota INT(10) DEFAULT '10485760',
PRIMARY KEY (email)
) TYPE=MyISAM;

from where i can have email server?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] designing a post fix

2011-03-17 Thread Negin Nickparsa
I serached well yeah sort of Squirrel Mail!
but it's one part of it not all part of it


On Thu, Mar 17, 2011 at 8:00 PM, Negin Nickparsa  wrote:
> can i have an email server?
> we have 4 example:u...@dpaco.net
> or not?
> just we must have an emails like gmail n ymail?
> if i can have email server how i can code it
>
> i can have tables like this:
>
> CREATE TABLE domains (
> domain varchar(50) NOT NULL,
> PRIMARY KEY (domain) )
> TYPE=MyISAM;
>
>
>
> CREATE TABLE forwardings (
> source varchar(80) NOT NULL,
> destination TEXT NOT NULL,
> PRIMARY KEY (source) )
> TYPE=MyISAM;
>
>
>
> CREATE TABLE users (
> email varchar(80) NOT NULL,
> password varchar(20) NOT NULL,
> quota INT(10) DEFAULT '10485760',
> PRIMARY KEY (email)
> ) TYPE=MyISAM;
>
> from where i can have email server?
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] designing a post fix

2011-03-17 Thread Negin Nickparsa
i'll give all my users user n password will they be under the same
domain or not?
user1 has the domain gmail n user 2 ymail
or i can have all users the same thing like dpaco.net
this is our site==>dpaco.net
i want to build another part of it with php

On Thu, Mar 17, 2011 at 8:30 PM, Stuart Dallas  wrote:
> On Thursday, 17 March 2011 at 16:56, Negin Nickparsa wrote:
> internal messaging system
>
> In that case it's simply a matter of creating a table structure to hold the 
> messages and building an interface that will display them and allow new 
> messages to be added, probably with email-based notifications. This is fairly 
> straightforward stuff, you just need to think about the elements that make up 
> a message, convert that list into a table structure, add some metadata for 
> unread, etc.
>
>
> -Stuart
>
> --
> Stuart Dallas
> 3ft9 Ltd
> http://3ft9.com/
>
>
>> On Thu, Mar 17, 2011 at 8:16 PM, Stuart Dallas  wrote:
>> > On Thursday, 17 March 2011 at 15:23, Negin Nickparsa wrote:
>> > i want 2 design a php web for staff members that can sign in with
>> > > their accounts n then mail 2 each other i don't know how it really
>> > > works by using a mail server i'm beginner at it! but i studied alot
>> > > abt it.
>> >
>> > Are you talking about interfacing with email, or an internal messaging 
>> > system?
>> >
>> >
>> > -Stuart
>> >
>> > --
>> > Stuart Dallas
>> > 3ft9 Ltd
>> > http://3ft9.com/
>>
>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] designing a post fix

2011-03-17 Thread Negin Nickparsa
u mean i can have localhost mail service or not?

On Thu, Mar 17, 2011 at 8:36 PM, Negin Nickparsa  wrote:
> i'll give all my users user n password will they be under the same
> domain or not?
> user1 has the domain gmail n user 2 ymail
> or i can have all users the same thing like dpaco.net
> this is our site==>dpaco.net
> i want to build another part of it with php
>
> On Thu, Mar 17, 2011 at 8:30 PM, Stuart Dallas  wrote:
>> On Thursday, 17 March 2011 at 16:56, Negin Nickparsa wrote:
>> internal messaging system
>>
>> In that case it's simply a matter of creating a table structure to hold the 
>> messages and building an interface that will display them and allow new 
>> messages to be added, probably with email-based notifications. This is 
>> fairly straightforward stuff, you just need to think about the elements that 
>> make up a message, convert that list into a table structure, add some 
>> metadata for unread, etc.
>>
>>
>> -Stuart
>>
>> --
>> Stuart Dallas
>> 3ft9 Ltd
>> http://3ft9.com/
>>
>>
>>> On Thu, Mar 17, 2011 at 8:16 PM, Stuart Dallas  wrote:
>>> > On Thursday, 17 March 2011 at 15:23, Negin Nickparsa wrote:
>>> > i want 2 design a php web for staff members that can sign in with
>>> > > their accounts n then mail 2 each other i don't know how it really
>>> > > works by using a mail server i'm beginner at it! but i studied alot
>>> > > abt it.
>>> >
>>> > Are you talking about interfacing with email, or an internal messaging 
>>> > system?
>>> >
>>> >
>>> > -Stuart
>>> >
>>> > --
>>> > Stuart Dallas
>>> > 3ft9 Ltd
>>> > http://3ft9.com/
>>>
>>
>>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] designing a post fix

2011-03-17 Thread Negin Nickparsa
when a user will be logged on he/she must have the messages just for
him self yeah? then i must have a column for the mails that he
recieved
4 example select mail1 from users where user=user1

i got it right?

On Thu, Mar 17, 2011 at 8:39 PM, Negin Nickparsa  wrote:
> u mean i can have localhost mail service or not?
>
> On Thu, Mar 17, 2011 at 8:36 PM, Negin Nickparsa  wrote:
>> i'll give all my users user n password will they be under the same
>> domain or not?
>> user1 has the domain gmail n user 2 ymail
>> or i can have all users the same thing like dpaco.net
>> this is our site==>dpaco.net
>> i want to build another part of it with php
>>
>> On Thu, Mar 17, 2011 at 8:30 PM, Stuart Dallas  wrote:
>>> On Thursday, 17 March 2011 at 16:56, Negin Nickparsa wrote:
>>> internal messaging system
>>>
>>> In that case it's simply a matter of creating a table structure to hold the 
>>> messages and building an interface that will display them and allow new 
>>> messages to be added, probably with email-based notifications. This is 
>>> fairly straightforward stuff, you just need to think about the elements 
>>> that make up a message, convert that list into a table structure, add some 
>>> metadata for unread, etc.
>>>
>>>
>>> -Stuart
>>>
>>> --
>>> Stuart Dallas
>>> 3ft9 Ltd
>>> http://3ft9.com/
>>>
>>>
>>>> On Thu, Mar 17, 2011 at 8:16 PM, Stuart Dallas  wrote:
>>>> > On Thursday, 17 March 2011 at 15:23, Negin Nickparsa wrote:
>>>> > i want 2 design a php web for staff members that can sign in with
>>>> > > their accounts n then mail 2 each other i don't know how it really
>>>> > > works by using a mail server i'm beginner at it! but i studied alot
>>>> > > abt it.
>>>> >
>>>> > Are you talking about interfacing with email, or an internal messaging 
>>>> > system?
>>>> >
>>>> >
>>>> > -Stuart
>>>> >
>>>> > --
>>>> > Stuart Dallas
>>>> > 3ft9 Ltd
>>>> > http://3ft9.com/
>>>>
>>>
>>>
>>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] designing a post fix

2011-03-17 Thread Negin Nickparsa
but yes i need notifications
now we use free application named osticket but it doesn't work very well
I can change my codes because i have time
what is your suggestion for me which one can better support my site?
MTA or another free app?

On Thu, Mar 17, 2011 at 8:43 PM, Negin Nickparsa  wrote:
> when a user will be logged on he/she must have the messages just for
> him self yeah? then i must have a column for the mails that he
> recieved
> 4 example select mail1 from users where user=user1
>
> i got it right?
>
> On Thu, Mar 17, 2011 at 8:39 PM, Negin Nickparsa  wrote:
>> u mean i can have localhost mail service or not?
>>
>> On Thu, Mar 17, 2011 at 8:36 PM, Negin Nickparsa  wrote:
>>> i'll give all my users user n password will they be under the same
>>> domain or not?
>>> user1 has the domain gmail n user 2 ymail
>>> or i can have all users the same thing like dpaco.net
>>> this is our site==>dpaco.net
>>> i want to build another part of it with php
>>>
>>> On Thu, Mar 17, 2011 at 8:30 PM, Stuart Dallas  wrote:
>>>> On Thursday, 17 March 2011 at 16:56, Negin Nickparsa wrote:
>>>> internal messaging system
>>>>
>>>> In that case it's simply a matter of creating a table structure to hold 
>>>> the messages and building an interface that will display them and allow 
>>>> new messages to be added, probably with email-based notifications. This is 
>>>> fairly straightforward stuff, you just need to think about the elements 
>>>> that make up a message, convert that list into a table structure, add some 
>>>> metadata for unread, etc.
>>>>
>>>>
>>>> -Stuart
>>>>
>>>> --
>>>> Stuart Dallas
>>>> 3ft9 Ltd
>>>> http://3ft9.com/
>>>>
>>>>
>>>>> On Thu, Mar 17, 2011 at 8:16 PM, Stuart Dallas  wrote:
>>>>> > On Thursday, 17 March 2011 at 15:23, Negin Nickparsa wrote:
>>>>> > i want 2 design a php web for staff members that can sign in with
>>>>> > > their accounts n then mail 2 each other i don't know how it really
>>>>> > > works by using a mail server i'm beginner at it! but i studied alot
>>>>> > > abt it.
>>>>> >
>>>>> > Are you talking about interfacing with email, or an internal messaging 
>>>>> > system?
>>>>> >
>>>>> >
>>>>> > -Stuart
>>>>> >
>>>>> > --
>>>>> > Stuart Dallas
>>>>> > 3ft9 Ltd
>>>>> > http://3ft9.com/
>>>>>
>>>>
>>>>
>>>
>>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] designing a post fix

2011-03-17 Thread Negin Nickparsa
Tnx very much Stuart 4 ur great helps.
now it's more clear 4 me

On Thu, Mar 17, 2011 at 8:55 PM, Negin Nickparsa  wrote:
> but yes i need notifications
> now we use free application named osticket but it doesn't work very well
> I can change my codes because i have time
> what is your suggestion for me which one can better support my site?
> MTA or another free app?
>
> On Thu, Mar 17, 2011 at 8:43 PM, Negin Nickparsa  wrote:
>> when a user will be logged on he/she must have the messages just for
>> him self yeah? then i must have a column for the mails that he
>> recieved
>> 4 example select mail1 from users where user=user1
>>
>> i got it right?
>>
>> On Thu, Mar 17, 2011 at 8:39 PM, Negin Nickparsa  wrote:
>>> u mean i can have localhost mail service or not?
>>>
>>> On Thu, Mar 17, 2011 at 8:36 PM, Negin Nickparsa  
>>> wrote:
>>>> i'll give all my users user n password will they be under the same
>>>> domain or not?
>>>> user1 has the domain gmail n user 2 ymail
>>>> or i can have all users the same thing like dpaco.net
>>>> this is our site==>dpaco.net
>>>> i want to build another part of it with php
>>>>
>>>> On Thu, Mar 17, 2011 at 8:30 PM, Stuart Dallas  wrote:
>>>>> On Thursday, 17 March 2011 at 16:56, Negin Nickparsa wrote:
>>>>> internal messaging system
>>>>>
>>>>> In that case it's simply a matter of creating a table structure to hold 
>>>>> the messages and building an interface that will display them and allow 
>>>>> new messages to be added, probably with email-based notifications. This 
>>>>> is fairly straightforward stuff, you just need to think about the 
>>>>> elements that make up a message, convert that list into a table 
>>>>> structure, add some metadata for unread, etc.
>>>>>
>>>>>
>>>>> -Stuart
>>>>>
>>>>> --
>>>>> Stuart Dallas
>>>>> 3ft9 Ltd
>>>>> http://3ft9.com/
>>>>>
>>>>>
>>>>>> On Thu, Mar 17, 2011 at 8:16 PM, Stuart Dallas  wrote:
>>>>>> > On Thursday, 17 March 2011 at 15:23, Negin Nickparsa wrote:
>>>>>> > i want 2 design a php web for staff members that can sign in with
>>>>>> > > their accounts n then mail 2 each other i don't know how it really
>>>>>> > > works by using a mail server i'm beginner at it! but i studied alot
>>>>>> > > abt it.
>>>>>> >
>>>>>> > Are you talking about interfacing with email, or an internal messaging 
>>>>>> > system?
>>>>>> >
>>>>>> >
>>>>>> > -Stuart
>>>>>> >
>>>>>> > --
>>>>>> > Stuart Dallas
>>>>>> > 3ft9 Ltd
>>>>>> > http://3ft9.com/
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] designing a post fix

2011-03-17 Thread Negin Nickparsa
ok! stuart plz let me think to exactly tell u what i want! because i
must make sentences more clear i know i have bad english sorry!
i will tell u in a moment.

On Thu, Mar 17, 2011 at 9:16 PM, Stuart Dallas  wrote:
> On Thursday, 17 March 2011 at 17:25, Negin Nickparsa wrote:
> but yes i need notifications
>> now we use free application named osticket but it doesn't work very well
>> I can change my codes because i have time
>> what is your suggestion for me which one can better support my site?
>> MTA or another free app?
>
> Negin, this is starting to become a conversation I usually charge for! If you 
> need help spec'ing and/or building a system I may be able to help, but at the 
> moment I'm unclear exactly what problem you're trying to solve. If you need 
> an email solution I suggest you use Google Apps. If you need a ticketing 
> system then there are lots of good options in that area, and personally I 
> think it would be a waste of effort to start from scratch. If neither of 
> those are what you're after, then I'm lost.
>
>
> -Stuart
>
> --
> Stuart Dallas
> 3ft9 Ltd
> http://3ft9.com/
>
>
>> On Thu, Mar 17, 2011 at 8:43 PM, Negin Nickparsa  wrote:
>> > when a user will be logged on he/she must have the messages just for
>> > him self yeah? then i must have a column for the mails that he
>> > recieved
>> > 4 example select mail1 from users where user=user1
>> >
>> > i got it right?
>> >
>> > On Thu, Mar 17, 2011 at 8:39 PM, Negin Nickparsa  
>> > wrote:
>> > > u mean i can have localhost mail service or not?
>> > >
>> > > On Thu, Mar 17, 2011 at 8:36 PM, Negin Nickparsa  
>> > > wrote:
>> > > > i'll give all my users user n password will they be under the same
>> > > > domain or not?
>> > > > user1 has the domain gmail n user 2 ymail
>> > > > or i can have all users the same thing like dpaco.net
>> > > > this is our site==>dpaco.net
>> > > > i want to build another part of it with php
>> > > >
>> > > > On Thu, Mar 17, 2011 at 8:30 PM, Stuart Dallas  wrote:
>> > > > > On Thursday, 17 March 2011 at 16:56, Negin Nickparsa wrote:
>> > > > > internal messaging system
>> > > > >
>> > > > > In that case it's simply a matter of creating a table structure to 
>> > > > > hold the messages and building an interface that will display them 
>> > > > > and allow new messages to be added, probably with email-based 
>> > > > > notifications. This is fairly straightforward stuff, you just need 
>> > > > > to think about the elements that make up a message, convert that 
>> > > > > list into a table structure, add some metadata for unread, etc.
>> > > > >
>> > > > >
>> > > > > -Stuart
>> > > > >
>> > > > > --
>> > > > > Stuart Dallas
>> > > > > 3ft9 Ltd
>> > > > > http://3ft9.com/
>> > > > >
>> > > > >
>> > > > > > On Thu, Mar 17, 2011 at 8:16 PM, Stuart Dallas  
>> > > > > > wrote:
>> > > > > > > On Thursday, 17 March 2011 at 15:23, Negin Nickparsa wrote:
>> > > > > > > i want 2 design a php web for staff members that can sign in with
>> > > > > > > > their accounts n then mail 2 each other i don't know how it 
>> > > > > > > > really
>> > > > > > > > works by using a mail server i'm beginner at it! but i studied 
>> > > > > > > > alot
>> > > > > > > > abt it.
>> > > > > > >
>> > > > > > > Are you talking about interfacing with email, or an internal 
>> > > > > > > messaging system?
>> > > > > > >
>> > > > > > >
>> > > > > > > -Stuart
>> > > > > > >
>> > > > > > > --
>> > > > > > > Stuart Dallas
>> > > > > > > 3ft9 Ltd
>> > > > > > > http://3ft9.com/
>>
>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] designing a post fix

2011-03-17 Thread Negin Nickparsa
:( maybe it's ticketing i don't know exactly!!!:"(
here are the things that i must do:

receiving mails and return of mails
showing emails 2 staff
when a mail received it can be viewed in a moment(like ajax)
drafts and upload and download from mail
determine mails due on
mails that replied and can be closed
searching special mail or special person
attachments
forwardings
digital signature(I know this one is very difficult! 98% I will ignore
this part)
management of meetings and calendar in my language!
private messaging
a period time for a reply of a mail (after time if it didn’t have
reply then close it)
settings for users
sending sms to that user when priod time is going 2 finish
making priority for emergency mails

On Thu, Mar 17, 2011 at 9:21 PM, Negin Nickparsa  wrote:
> ok! stuart plz let me think to exactly tell u what i want! because i
> must make sentences more clear i know i have bad english sorry!
> i will tell u in a moment.
>

> On Thu, Mar 17, 2011 at 9:16 PM, Stuart Dallas  wrote:
>> On Thursday, 17 March 2011 at 17:25, Negin Nickparsa wrote:
>> but yes i need notifications
>>> now we use free application named osticket but it doesn't work very well
>>> I can change my codes because i have time
>>> what is your suggestion for me which one can better support my site?
>>> MTA or another free app?
>>
>> Negin, this is starting to become a conversation I usually charge for! If 
>> you need help spec'ing and/or building a system I may be able to help, but 
>> at the moment I'm unclear exactly what problem you're trying to solve. If 
>> you need an email solution I suggest you use Google Apps. If you need a 
>> ticketing system then there are lots of good options in that area, and 
>> personally I think it would be a waste of effort to start from scratch. If 
>> neither of those are what you're after, then I'm lost.
>>
>>
>> -Stuart
>>
>> --
>> Stuart Dallas
>> 3ft9 Ltd
>> http://3ft9.com/
>>
>>
>>> On Thu, Mar 17, 2011 at 8:43 PM, Negin Nickparsa  
>>> wrote:
>>> > when a user will be logged on he/she must have the messages just for
>>> > him self yeah? then i must have a column for the mails that he
>>> > recieved
>>> > 4 example select mail1 from users where user=user1
>>> >
>>> > i got it right?
>>> >
>>> > On Thu, Mar 17, 2011 at 8:39 PM, Negin Nickparsa  
>>> > wrote:
>>> > > u mean i can have localhost mail service or not?
>>> > >
>>> > > On Thu, Mar 17, 2011 at 8:36 PM, Negin Nickparsa  
>>> > > wrote:
>>> > > > i'll give all my users user n password will they be under the same
>>> > > > domain or not?
>>> > > > user1 has the domain gmail n user 2 ymail
>>> > > > or i can have all users the same thing like dpaco.net
>>> > > > this is our site==>dpaco.net
>>> > > > i want to build another part of it with php
>>> > > >
>>> > > > On Thu, Mar 17, 2011 at 8:30 PM, Stuart Dallas  
>>> > > > wrote:
>>> > > > > On Thursday, 17 March 2011 at 16:56, Negin Nickparsa wrote:
>>> > > > > internal messaging system
>>> > > > >
>>> > > > > In that case it's simply a matter of creating a table structure to 
>>> > > > > hold the messages and building an interface that will display them 
>>> > > > > and allow new messages to be added, probably with email-based 
>>> > > > > notifications. This is fairly straightforward stuff, you just need 
>>> > > > > to think about the elements that make up a message, convert that 
>>> > > > > list into a table structure, add some metadata for unread, etc.
>>> > > > >
>>> > > > >
>>> > > > > -Stuart
>>> > > > >
>>> > > > > --
>>> > > > > Stuart Dallas
>>> > > > > 3ft9 Ltd
>>> > > > > http://3ft9.com/
>>> > > > >
>>> > > > >
>>> > > > > > On Thu, Mar 17, 2011 at 8:16 PM, Stuart Dallas  
>>> > > > > > wrote:
>>> > > > > > > On Thursday, 17 March 2011 at 15:23, Negin Nickparsa wrote:
>>> > > > > > > i want 2 design a php web for staff members that can sign in 
>>> > > > > > > with
>>> > > > > > > > their accounts n then mail 2 each other i don't know how it 
>>> > > > > > > > really
>>> > > > > > > > works by using a mail server i'm beginner at it! but i 
>>> > > > > > > > studied alot
>>> > > > > > > > abt it.
>>> > > > > > >
>>> > > > > > > Are you talking about interfacing with email, or an internal 
>>> > > > > > > messaging system?
>>> > > > > > >
>>> > > > > > >
>>> > > > > > > -Stuart
>>> > > > > > >
>>> > > > > > > --
>>> > > > > > > Stuart Dallas
>>> > > > > > > 3ft9 Ltd
>>> > > > > > > http://3ft9.com/
>>>
>>
>>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] designing a post fix

2011-03-17 Thread Negin Nickparsa
i just got it! now! what's the meaning of charge for! lol! plz don't
help me! again! because i have no money! tnx very much till now

On Thu, Mar 17, 2011 at 9:42 PM, Negin Nickparsa  wrote:
> :( maybe it's ticketing i don't know exactly!!!:"(
> here are the things that i must do:
>
> receiving mails and return of mails
> showing emails 2 staff
> when a mail received it can be viewed in a moment(like ajax)
> drafts and upload and download from mail
> determine mails due on
> mails that replied and can be closed
> searching special mail or special person
> attachments
> forwardings
> digital signature(I know this one is very difficult! 98% I will ignore
> this part)
> management of meetings and calendar in my language!
> private messaging
> a period time for a reply of a mail (after time if it didn’t have
> reply then close it)
> settings for users
> sending sms to that user when priod time is going 2 finish
> making priority for emergency mails
>
> On Thu, Mar 17, 2011 at 9:21 PM, Negin Nickparsa  wrote:
>> ok! stuart plz let me think to exactly tell u what i want! because i
>> must make sentences more clear i know i have bad english sorry!
>> i will tell u in a moment.
>>
>
>> On Thu, Mar 17, 2011 at 9:16 PM, Stuart Dallas  wrote:
>>> On Thursday, 17 March 2011 at 17:25, Negin Nickparsa wrote:
>>> but yes i need notifications
>>>> now we use free application named osticket but it doesn't work very well
>>>> I can change my codes because i have time
>>>> what is your suggestion for me which one can better support my site?
>>>> MTA or another free app?
>>>
>>> Negin, this is starting to become a conversation I usually charge for! If 
>>> you need help spec'ing and/or building a system I may be able to help, but 
>>> at the moment I'm unclear exactly what problem you're trying to solve. If 
>>> you need an email solution I suggest you use Google Apps. If you need a 
>>> ticketing system then there are lots of good options in that area, and 
>>> personally I think it would be a waste of effort to start from scratch. If 
>>> neither of those are what you're after, then I'm lost.
>>>
>>>
>>> -Stuart
>>>
>>> --
>>> Stuart Dallas
>>> 3ft9 Ltd
>>> http://3ft9.com/
>>>
>>>
>>>> On Thu, Mar 17, 2011 at 8:43 PM, Negin Nickparsa  
>>>> wrote:
>>>> > when a user will be logged on he/she must have the messages just for
>>>> > him self yeah? then i must have a column for the mails that he
>>>> > recieved
>>>> > 4 example select mail1 from users where user=user1
>>>> >
>>>> > i got it right?
>>>> >
>>>> > On Thu, Mar 17, 2011 at 8:39 PM, Negin Nickparsa  
>>>> > wrote:
>>>> > > u mean i can have localhost mail service or not?
>>>> > >
>>>> > > On Thu, Mar 17, 2011 at 8:36 PM, Negin Nickparsa  
>>>> > > wrote:
>>>> > > > i'll give all my users user n password will they be under the same
>>>> > > > domain or not?
>>>> > > > user1 has the domain gmail n user 2 ymail
>>>> > > > or i can have all users the same thing like dpaco.net
>>>> > > > this is our site==>dpaco.net
>>>> > > > i want to build another part of it with php
>>>> > > >
>>>> > > > On Thu, Mar 17, 2011 at 8:30 PM, Stuart Dallas  
>>>> > > > wrote:
>>>> > > > > On Thursday, 17 March 2011 at 16:56, Negin Nickparsa wrote:
>>>> > > > > internal messaging system
>>>> > > > >
>>>> > > > > In that case it's simply a matter of creating a table structure to 
>>>> > > > > hold the messages and building an interface that will display them 
>>>> > > > > and allow new messages to be added, probably with email-based 
>>>> > > > > notifications. This is fairly straightforward stuff, you just need 
>>>> > > > > to think about the elements that make up a message, convert that 
>>>> > > > > list into a table structure, add some metadata for unread, etc.
>>>> > > > >
>>>> > > > >
>>>> > > > > -Stuart
>>>> > > > >
>>>> > > > > --
>>>> > > > > Stuart Dallas
>>>> > > > > 3ft9 Ltd
>>>> > > > > http://3ft9.com/
>>>> > > > >
>>>> > > > >
>>>> > > > > > On Thu, Mar 17, 2011 at 8:16 PM, Stuart Dallas  
>>>> > > > > > wrote:
>>>> > > > > > > On Thursday, 17 March 2011 at 15:23, Negin Nickparsa wrote:
>>>> > > > > > > i want 2 design a php web for staff members that can sign in 
>>>> > > > > > > with
>>>> > > > > > > > their accounts n then mail 2 each other i don't know how it 
>>>> > > > > > > > really
>>>> > > > > > > > works by using a mail server i'm beginner at it! but i 
>>>> > > > > > > > studied alot
>>>> > > > > > > > abt it.
>>>> > > > > > >
>>>> > > > > > > Are you talking about interfacing with email, or an internal 
>>>> > > > > > > messaging system?
>>>> > > > > > >
>>>> > > > > > >
>>>> > > > > > > -Stuart
>>>> > > > > > >
>>>> > > > > > > --
>>>> > > > > > > Stuart Dallas
>>>> > > > > > > 3ft9 Ltd
>>>> > > > > > > http://3ft9.com/
>>>>
>>>
>>>
>>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] designing a post fix

2011-03-18 Thread Negin Nickparsa
can u explain zimbra server 4 me?

On Thu, Mar 17, 2011 at 9:44 PM, Curtis Maurand  wrote:
>
> Zimbra Server.
>
> Negin Nickparsa wrote:
>> :( maybe it's ticketing i don't know exactly!!!:"(
>> here are the things that i must do:
>>
>> receiving mails and return of mails
>> showing emails 2 staff
>> when a mail received it can be viewed in a moment(like ajax)
>> drafts and upload and download from mail
>> determine mails due on
>> mails that replied and can be closed
>> searching special mail or special person
>> attachments
>> forwardings
>> digital signature(I know this one is very difficult! 98% I will ignore
>> this part)
>> management of meetings and calendar in my language!
>> private messaging
>> a period time for a reply of a mail (after time if it didn’t have
>> reply then close it)
>> settings for users
>> sending sms to that user when priod time is going 2 finish
>> making priority for emergency mails
>>
>> On Thu, Mar 17, 2011 at 9:21 PM, Negin Nickparsa 
>> wrote:
>>> ok! stuart plz let me think to exactly tell u what i want! because i
>>> must make sentences more clear i know i have bad english sorry!
>>> i will tell u in a moment.
>>>
>>
>>> On Thu, Mar 17, 2011 at 9:16 PM, Stuart Dallas  wrote:
>>>> On Thursday, 17 March 2011 at 17:25, Negin Nickparsa wrote:
>>>> but yes i need notifications
>>>>> now we use free application named osticket but it doesn't work very
>>>>> well
>>>>> I can change my codes because i have time
>>>>> what is your suggestion for me which one can better support my site?
>>>>> MTA or another free app?
>>>>
>>>> Negin, this is starting to become a conversation I usually charge for!
>>>> If you need help spec'ing and/or building a system I may be able to
>>>> help, but at the moment I'm unclear exactly what problem you're trying
>>>> to solve. If you need an email solution I suggest you use Google Apps.
>>>> If you need a ticketing system then there are lots of good options in
>>>> that area, and personally I think it would be a waste of effort to
>>>> start from scratch. If neither of those are what you're after, then I'm
>>>> lost.
>>>>
>>>>
>>>> -Stuart
>>>>
>>>> --
>>>> Stuart Dallas
>>>> 3ft9 Ltd
>>>> http://3ft9.com/
>>>>
>>>>
>>>>> On Thu, Mar 17, 2011 at 8:43 PM, Negin Nickparsa 
>>>>> wrote:
>>>>> > when a user will be logged on he/she must have the messages just for
>>>>> > him self yeah? then i must have a column for the mails that he
>>>>> > recieved
>>>>> > 4 example select mail1 from users where user=user1
>>>>> >
>>>>> > i got it right?
>>>>> >
>>>>> > On Thu, Mar 17, 2011 at 8:39 PM, Negin Nickparsa
>>>>>  wrote:
>>>>> > > u mean i can have localhost mail service or not?
>>>>> > >
>>>>> > > On Thu, Mar 17, 2011 at 8:36 PM, Negin Nickparsa
>>>>>  wrote:
>>>>> > > > i'll give all my users user n password will they be under the
>>>>> same
>>>>> > > > domain or not?
>>>>> > > > user1 has the domain gmail n user 2 ymail
>>>>> > > > or i can have all users the same thing like dpaco.net
>>>>> > > > this is our site==>dpaco.net
>>>>> > > > i want to build another part of it with php
>>>>> > > >
>>>>> > > > On Thu, Mar 17, 2011 at 8:30 PM, Stuart Dallas 
>>>>> wrote:
>>>>> > > > > On Thursday, 17 March 2011 at 16:56, Negin Nickparsa wrote:
>>>>> > > > > internal messaging system
>>>>> > > > >
>>>>> > > > > In that case it's simply a matter of creating a table
>>>>> structure to hold the messages and building an interface that
>>>>> will display them and allow new messages to be added, probably
>>>>> with email-based notifications. This is fairly straightforward
>>>>> stuff, you just need to think about the elements that make up
>>>>> a message, convert that list into a table structure, add some
>>>>> metadata for unread, etc.
>>>>> > > > >
>>>>> > > > >
>>>>> > > > > -Stuart
>>>>> > > > >
>>>>> > > > > --
>>>>> > > > > Stuart Dallas
>>>>> > > > > 3ft9 Ltd
>>>>> > > > > http://3ft9.com/
>>>>> > > > >
>>>>> > > > >
>>>>> > > > > > On Thu, Mar 17, 2011 at 8:16 PM, Stuart Dallas
>>>>>  wrote:
>>>>> > > > > > > On Thursday, 17 March 2011 at 15:23, Negin Nickparsa
>>>>> wrote:
>>>>> > > > > > > i want 2 design a php web for staff members that can sign
>>>>> in with
>>>>> > > > > > > > their accounts n then mail 2 each other i don't know how
>>>>> it really
>>>>> > > > > > > > works by using a mail server i'm beginner at it! but i
>>>>> studied alot
>>>>> > > > > > > > abt it.
>>>>> > > > > > >
>>>>> > > > > > > Are you talking about interfacing with email, or an
>>>>> internal messaging system?
>>>>> > > > > > >
>>>>> > > > > > >
>>>>> > > > > > > -Stuart
>>>>> > > > > > >
>>>>> > > > > > > --
>>>>> > > > > > > Stuart Dallas
>>>>> > > > > > > 3ft9 Ltd
>>>>> > > > > > > http://3ft9.com/
>>>>>
>>>>
>>>>
>>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Can´t upload files bigger than 50KB

2011-03-18 Thread Negin Nickparsa
if i'm not in mistake u can go 2 php.ini n fix it

On Fri, Mar 18, 2011 at 6:24 PM, Gotzon Astondoa  wrote:
> I could not find the solution to the problem.
> I've finally solved by using an applet that uploads the files by FTP.
> In case anyone needs it, the applet I've used is
> http://sourceforge.net/projects/zupload
> For me it was the solution!
>
> 2011/3/9 Jim Lucas 
>
>> On 3/9/2011 6:28 AM, Gotzon Astondoa wrote:
>> >  Hi all:
>> >
>> > On my website I have an Ajax form. From this form user can upload files.
>>
>> My guess would be that you have an HTML form.  Not AJAX
>>
>> > Server side is a PHP script.
>> > This form works properly on my development server.
>>
>> Is this on localhost or is it remote too?
>>
>> > But when I uploaded my application to the definitive server I discovered
>> > that I can only upload files less than 50KB (It works perfectly with 1 to
>> 20
>> > KB images).
>>
>> Silly question, how long does it take for these 1 to 20 KB files to upload?
>>
>> > These are the data from the server configuration that I believe can
>> affect:
>> >
>> >      post_max_size 8M
>> >      upload_max_filesize 2M
>> >      memory_limit 128M
>> >      safe_mode off
>> >      SELinux disabled
>> >      open_basedir none
>> >
>> > I´m now making tests with 52KB image: image.jpg
>> > I discovered that the uploaded file is uploaded to /tmp. This file name
>> is
>> > php10tfTp.
>>
>> how much space is free on the partition that contains /tmp  ?
>>
>> > But the file is not completely uploaded! So, my PHP script is not fired!
>> > The original image size is 52KB and the new file size is 35KB . I
>> download
>> > the tmp file and rename it to php10tfTp.jpg. I can see that half frame is
>> > the same as the original and the other half is gray.
>> >
>> > Any idea what is happening?
>> >
>> > Thanks in advance.
>> >
>>
>>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] is there any syntax to save a file in mysql?

2011-03-27 Thread Negin Nickparsa
in php i have a file to upload i want to save this file in a table and then
retreive it from table in another situation is it possible?


Fwd: [PHP] is there any syntax to save a file in mysql?

2011-03-27 Thread Negin Nickparsa
-- Forwarded message --
From: Negin Nickparsa 
Date: Mon, Mar 28, 2011 at 10:24 AM
Subject: Re: [PHP] is there any syntax to save a file in mysql?
To: Hans Åhlin 


tnx Hans
now i run this code
in my sql ihave this:
CREATE TABLE upload (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(30) NOT NULL,
type VARCHAR(30) NOT NULL,
size INT NOT NULL,
*content MEDIUMBLOB NOT NULL,*
PRIMARY KEY(id)
);

and in my notepad i have this:
 0*)
{
$fileName = $_FILES['userfile']['name'];
$tmpName  = $_FILES['userfile']['tmp_name'];
$fileSize = $_FILES['userfile']['size'];
$fileType = $_FILES['userfile']['type'];

$fp  = fopen($tmpName, 'r');
$content = fread($fp, filesize($tmpName));
*$content = addslashes($content);*
fclose($fp);

if(!get_magic_quotes_gpc())
{
$fileName = addslashes($fileName);
}

include 'connect.php';


$query = "INSERT INTO upload (name, size, type, content ) ".
"VALUES ('$fileName', '$fileSize', '$fileType', '$content')";

mysql_query($query) or die('Error, query failed');
include 'library/closedb.php';

echo "File $fileName uploaded";
}
?>




*
*






but in my sql when i select * it goes on a bad loop with writing line like
this-
---


Fwd: [PHP] is there any syntax to save a file in mysql?

2011-03-27 Thread Negin Nickparsa
-- Forwarded message --
From: Negin Nickparsa 
Date: Mon, Mar 28, 2011 at 10:57 AM
Subject: Re: [PHP] is there any syntax to save a file in mysql?
To: a...@ashleysheridan.co.uk


Dear Ashley,but i want every user to have his/her own files in their
account. (i used session for them) n now i want them to have their specific
files then i think i must have db that store the files n user can retrieve
his/hers not just details
if i just save the details then how they download the files that they
receive from another users?


Re: [PHP] Re: is there any syntax to save a file in mysql?

2011-03-28 Thread Negin Nickparsa
i want each user having more than one file like us in the inbox of our mails
i want to store files n then they can access each one.


Re: [PHP] session variable problem

2011-03-28 Thread Negin Nickparsa
call session_destroy(); then start the session again


Re: [PHP] Re: is there any syntax to save a file in mysql?

2011-03-28 Thread Negin Nickparsa
i got it but i didn't understand what to do exactly
uploading a file in a folder is easy for me
than what i must do in db?


Re: [PHP] Re: is there any syntax to save a file in mysql?

2011-03-28 Thread Negin Nickparsa
storing what in db?
my codes was abt to store the file when uploading what is the difference
can i give me in an example?


Re: [PHP] session_start() may take 5 seconds :(

2011-03-30 Thread Negin Nickparsa
session1.php:

session2.php:



Re: [PHP] the best 1 book for php

2011-04-07 Thread Negin Nickparsa
introduction 2 PHP and MySql,Larry ullman


[PHP] XML Smart Home

2011-04-17 Thread Negin Nickparsa
i coded a smart home it has two jframes in java netbeans
it works correctly when i run the server and then when i run client
the devices such as radio,fan,...
i turn them on/off
but i want to store the changes when i run the server for the second time
someone told me that i must add xml code
does anyone know about it?


Re: [PHP] XML Smart Home

2011-04-17 Thread Negin Nickparsa
php coders know about XML maybe u don't know but someone will reply me u'll
see


Re: [PHP] XML Smart Home

2011-04-17 Thread Negin Nickparsa
i didn't want to be smart or funny cause i'm not
i just told my Idea
and i didn't want to bother list or Daniel
pardon me Daniel,for my bad behave if u think that was bad

ok i'll go


[PHP] problem in onclick

2011-05-20 Thread Negin Nickparsa
i want to when clicking on the image then go to other page or set my
$_SESSION

i have this in php code:
echo"";
how can i correct this
or if it is completely wrong how 2 solve it?
i tried to set header in onclick too but i think it can't do because header
is function of php and i echoed the html tag


Re: [PHP] problem in onclick

2011-05-20 Thread Negin Nickparsa
I tried,You solved my problem tanx very much Rob


[PHP] i need delay time in doing array_key_exists but while(true) can't work 4 it.

2011-05-20 Thread Negin Nickparsa
===>if(array_key_exists('sub5',$_POST))
this line runs before i clicked on the submit
while(true) before this line can't work then how can i solve the time
problem?
here is the whole code:
0)
{
echo "";
for($i=0;$i<$num;$i++)
{
$row=mysql_fetch_row($result);
echo "";
for($j=0;$j<$num1;$j++)
{
echo"$row[$j]";
}
echo"";
echo"";
}
echo"";
}
}
if(array_key_exists('sub5',$_POST))
{
$_SESSION[s1]=$row[0];
header("Location: patient.php?");
}
?>


Doctor









Re: [PHP] i need delay time in doing array_key_exists but while(true) can't work 4 it.

2011-05-20 Thread Negin Nickparsa
i can't understand what u wanted to tell me.
i want to when clicking on the sub button then go to another page i wrote it
but i can't solve this problem:
php runs the code and "then" i click it
i don't know,how can i solve it

any suggestion?


Re: [PHP] i need delay time in doing array_key_exists but while(true) can't work 4 it.

2011-05-20 Thread Negin Nickparsa
the thing that is important to me is setting session
because i want the tables of the one that clicked be showed on patient.php
how can i change my wrong code?


Re: [PHP] problem in onclick

2011-05-20 Thread Negin Nickparsa
Robert could u plz exactly tell me how i can work with GET and write my
SESSION i tried your code abt session but i didn't get it right but for
another ones i tried and it was right


Re: [PHP] problem in onclick

2011-05-20 Thread Negin Nickparsa
i want to click on the image then it stores the session so i can have many
different tables in another one unique page
suppose that i have A in my column when i click on image then it showed me
the table of A in another page
but if i click on the image of B then in the next page  it will show me the
B table
and the solution is by passing session


Re: [PHP] problem in onclick

2011-05-20 Thread Negin Nickparsa
i'm using http://localhost/
i don't have server like something.com
i wrote url:'loadsession.php'
instead of http://www.yourserver.com/loadsession.php',
and i deleted src="http://www.yourserver.com/js/jquery.js";
but it doesn't work what i must write in there?


Re: [PHP] problem in onclick

2011-05-20 Thread Negin Nickparsa
it is the result!!!
Now = getdate(time()+TIMESEED*60); else $this->Now = getdate(($mode?
$dd:strtotime($dd))); $this->Now["fyday"] = ($this->Now["yday"]+287)%365;
if($this->Now["fyday"]==0) $this->Now["fyday"] = 365; } function
getFarsiDate($mode, $fa=true, $echo=true) { $varStr = ""; switch($mode) {
case 1: $varStr = $this->getDate()." ".$this->getMonth(true)."
".$this->getYear(); break; case 2: $varStr = $this->getDate($fa) ."/".
$this->getMonth(false, $fa) . "/". $this->getYear($fa); break; case 3:
$varStr = $this->getDay()." ".$this->getDate()." ".$this->getMonth(true)."
".$this->getYear(); break; case 4: $varStr =
$this->getYear(false).str_pad($this->getMonth(false, false), 2, "0",
STR_PAD_LEFT).str_pad($this->getDate(false), 2, "0", STR_PAD_LEFT); break; }
if($echo) echo $varStr; else return $varStr; } function Num2Fa($num) {
$repPat =
array("1"=>"١","2"=>"٢","3"=>"٣","4"=>"٤","5"=>"٥","6"=>"٦","7"=>"٧","8"=>"٨","9"=>"٩","0"=>"٠");
return strtr((string)$num, $repPat); } function getDay($trans=true) { return
$trans? ($this->Days[$this->Now['wday']]):($this->Now['wday']+1)%7; }
function getDate($trans=true) { $md = 31; $dd = $this->Now["fyday"];
if($dd>186) { $md = 30; $dd -= 186; } $Day = $dd%$md; if($Day==0) $Day =
$md; return $trans? $this->Num2Fa($Day):$Day; } function getMonth($tr=false,
$tr2=true) { $Month = 0; $md = 31; $dd = $this->Now["fyday"]; if($dd>186) {
$md = 30; $dd -= 186; $Month += 6; } $Month += ceil($dd/$md); return (($tr)?
$this->Months[$Month-1]:($tr2? $this->Num2Fa($Month):$Month)); } function
getYear($trans=true) { $year = $this->Now["year"] - ($this->Now["yday"]>79?
621:622); return $trans? $this->Num2Fa($year):$year; } } ?>


Re: [PHP] problem in onclick

2011-05-20 Thread Negin Nickparsa
why URL?


[PHP] simple question abt convert to integer

2011-05-24 Thread Negin Nickparsa
my code is this:
$query1="select * from patient where id=".$_POST['txt'];
it works but
i think because i have error in next line:
*Warning*: mysql_num_rows() expects parameter 1 to be resource, boolean
given

$num2=Mysql_num_rows($result1);

i echoed $ query1 and the result was this=>select * from patient where id=1
maybe  it can't convert $_POST['txt'] from String to integer and then it
can't get my $num
it is int in my mysql
how can i correct $query1?


Re: [PHP] simple question abt convert to integer

2011-05-24 Thread Negin Nickparsa
$id=(int)$_POST['txt'];
$query1="select * from patient where id=".$id."";
echo $query1;
$result1=mysql_query($query1);

echo $result1;
$num2=Mysql_num_rows($result1);
$num3=Mysql_num_fields($result1);

still it has previous error

Here is my output:select * from patient where id=1
*Warning*: mysql_num_rows() expects parameter 1 to be resource, boolean
given in

*Warning*: mysql_num_fields() expects parameter 1 to be resource, boolean
given in **


Re: [PHP] simple question abt convert to integer

2011-05-24 Thread Negin Nickparsa
Bálint Horváth,
the second post of me is using your idea
your idea is working but why i have error still?


Re: [PHP] simple question abt convert to integer

2011-05-24 Thread Negin Nickparsa
$result1=mysql_query($query1);

echo $result1;

it can't echo $result1
i don't know why?


Re: [PHP] simple question abt convert to integer

2011-05-24 Thread Negin Nickparsa
i recieve nothing not a resource id and nore false


Re: [PHP] simple question abt convert to integer

2011-05-25 Thread Negin Nickparsa
Tnx to all:D
Paul you are absolutly right:D
it was a bad mistake from me
there was no need 2 convert it
Balint helped me n with mysql_error i found that
my code hasn't any mistake
i just forgot the BIG thing!
selecting db:D
i totally forgot it because i had array keys with if statement n in there i
selected it
but in the last one of them i forgot 2 set the selection of DB
Ashley what is OP? and filtering i didn't understand
Andre why u r telling me
Note: you *didn't* execute the query by calling mysql_query on it.
if it doesn't execute the query then what's it doing?
Reply
Vitalli believe me that i tried it n i can send the string without  error i
tried it:
$query1="select * from patient where id=".$_POST['txt'];
it works! after i found my error i tried it 2 n it was right!!!


Re: [PHP] simple question abt convert to integer

2011-05-25 Thread Negin Nickparsa
i got it tnx Balint


[PHP] about getting a site

2011-05-27 Thread Negin Nickparsa
if i don't have any site can i share my php files in somewhere 4 free?
if yes, what u suggest?


Re: [PHP] about getting a site

2011-05-27 Thread Negin Nickparsa
*Joshua You are right,I **apologize**.*


Re: [PHP] about getting a site

2011-05-27 Thread Negin Nickparsa
thanks Sharl,I'll study it

Joshua,Yes,I mean host and Run


[PHP] insert to table in php scripts

2011-05-28 Thread Negin Nickparsa
I have a code that i get the $_POST's result and then insert them in tables
of Mysql
it can run without error but it'll insert in the table twice and i don't
know why.
when I click the submit then with array_key_exists I go to if statement and
insert it.
i'll show the code if someone have time helping me.
cheers


Re: [PHP] insert to table in php scripts

2011-05-28 Thread Negin Nickparsa
Consistently

here is the code:




Registration



Complete the form below:
 Name:
Last name:
Username:
Password:
 






Re: [PHP] insert to table in php scripts

2011-05-28 Thread Negin Nickparsa
I click the submit button just one time! not twice
but when i go to MySql and select * from it
it shows me happening two times


Re: [PHP] insert to table in php scripts

2011-05-28 Thread Negin Nickparsa
Hi viraj
intresting!
i changed the code to this:
$kind=$_SESSION['s3'];
$query1="insert into
user(kind,user,pass,name)values('$kind','$str','$str2','$str3')";
$result1=mysql_query($query1);
i set the session in my another page

and now it works properly:D
LOL!!


Re: [PHP] insert to table in php scripts

2011-05-28 Thread Negin Nickparsa
Yes viraj it was in both tables


Re: [PHP] insert to table in php scripts

2011-05-28 Thread Negin Nickparsa
i used your exit too,yes it's better to hide the form after registration:)


Re: [PHP] insert to table in php scripts

2011-05-28 Thread Negin Nickparsa
i'm wondering that what was the problem!
why with just a session it now works propely!!!
how!


[PHP] how to use echo checkboxes in php when i don't have access to $_POST

2011-05-28 Thread Negin Nickparsa
because I echo the checkboxes like this:

if($num>0)
{
echo "";
for($i=0;$i<$num;$i++)
{
$row=mysql_fetch_row($result);
echo "";
echo"";
echo"$row[0]";
 echo"";
}//for
echo"";
}//if

i can't use $_POST because it's not in html
how can i insert my items that are checked into table?


[PHP] Re: how to use echo checkboxes in php when i don't have access to $_POST

2011-05-28 Thread Negin Nickparsa
i mean my tables in Mysql


Re: [PHP] how to use echo checkboxes in php when i don't have access to $_POST

2011-05-28 Thread Negin Nickparsa
because when the name is in echo it can't access to $_POST
4 example $_POST['p$i']
it tells me undefined variable p$i

when in html we write it in form because it has post method it can set
$_POST but here in php i just echo it and i can't access it
maybe i am wrong but how can i correct it?


Re: [PHP] insert to table in php scripts

2011-05-28 Thread Negin Nickparsa
cause it's in another topic!!! and another problem!
this problem was solved
i had another problem
what do you mean!?


Re: [PHP] insert to table in php scripts

2011-05-28 Thread Negin Nickparsa
in this topic problem WAS this one:
insert to a table twice(that was solved)

and on that post problem is this one:
working with echo html then insert to a table (problem in $_POST)

I thought it is very different am i wrong?


Re: [PHP] how to use echo checkboxes in php when i don't have access to $_POST

2011-05-28 Thread Negin Nickparsa
I'm sorry that I disturbed you and the List,I tried hard to mind my
punctuations but my English has weaknesses you can understand from my
posts,one time I apologized..

No my problem is not with these punctuations i know  them
I said for example,I mean in general

suppose that i have this SIMPLE code:
";
echo $_POST['negin'];
?>








error is this:
Undefined index: negin in *D:\phpweb\negin2.php* on line *4*
*
*
*how can I correct this?*


Re: Re: [PHP] how to use echo checkboxes in php when i don't have access to $_POST

2011-05-28 Thread Negin Nickparsa
Yes,you are right I visited the
http://stackoverflow.com/users/218196/felix-kling
and i found my problem and solved it


Re: [PHP] insert to table in php scripts

2011-05-28 Thread Negin Nickparsa
Thanks Viraj,I'll read it.


[PHP] https help

2011-05-30 Thread Negin Nickparsa
hi all,
I want to write an application that can be logged to yahoo.com using https
protocol
Would  you please put me some suggestions and advices?

if ($_SERVER['SERVER_PORT'] != 443) {
header("Location: https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
}


Re: [PHP] https help

2011-05-30 Thread Negin Nickparsa
I need to create a login page with HTTPS to yahoo
Do I have to have a valid certificate?

I have  not trust certification centre, so before anything under HTTPS will
be shown up, the window will come with information: valid certificate: yes,
valid domain: yes, valid authority for SSL key: no.
 am I right?
https://www.yahoo.com/";;
//addy querystring, if appropriate
if(count($_GET) != 0) {
$url .= "?";
foreach($_GET as $key => $value) {
$url .= "$key=$value&";
}
}
//send permanent move redirect
header($url, true, 301);
}
?>
but it goes to http://www.yahoo.com


Re: [PHP] https help

2011-05-30 Thread Negin Nickparsa
it is the output:
http://www.yahoo.com/?s=https

can i force it to show me
https://www.yahoo.com

?


Re: [PHP] https help

2011-05-31 Thread Negin Nickparsa
Thank you


[PHP] using wget in shell for download(snort)

2011-07-10 Thread Negin Nickparsa
I want to make a batch file and then exec it in php
I have a problem in batch file
wget have been installed in Yast I want to download a RuleFile from
snort.org

I used this on shell:

$ wget
http://www.snort.org/reg-rules/snortrules-snapshot-2900.tar.gz/c0e9480af637e53c7aae823a40a131edc1343db5\-O
snortrules-snapshot-2900.tar.gz

that string is an oinkcode from the site

this commandline has error and I don't know why


Re: [PHP] Re: using wget in shell for download(snort)

2011-07-10 Thread Negin Nickparsa
I tried with single quotes,no need to qoutes cause when I enter it with
quotes it tells me:
command not found

BUT when I enter this one:

wget
http://www.snort.org/reg-rules/snortrules-snapshot-2900.tar.gz/c0e9480af637e53c7aae823a40a131edc1343db5\-O
snortrules-snapshot-2900.tar.gz

it tells me:


http://www.snort.org/reg-rules/snortrules-snapshot-2900.tar.gz/c0e9480af637e53c7aae823a40a131edc1343db5
   => `snortrules-snapshot-2900.tar.gz'
Resolving www.snort.org... 68.177.102.20
Connecting to www.snort.org|68.177.102.20|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
 ERROR 403: Forbidden.


Re: [PHP] Re: using wget in shell for download(snort)

2011-07-10 Thread Negin Nickparsa
I also tried Goeff's suggest:
wget
http://www.snort.org/reg-rules/snortrules-snapshot-2900.tar.gz/c0e9480af637e53c7aae823a40a131edc1343db5-Osnortrules-snapshot-2900.tar.gz

here is the output:

Resolving www.snort.org... 68.177.102.20
Connecting to www.snort.org|68.177.102.20|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
09:57:36 ERROR 403: Forbidden.

--09:57:36--  http://snortrules-snapshot-2900.tar.gz/
   => `index.html'
Resolving snortrules-snapshot-2900.tar.gz... failed: Name or service not
known.

FINISHED --09:57:36--
Downloaded: 0 bytes in 0 files

Why failed?


Re: [PHP] using wget in shell for download(snort)

2011-07-11 Thread Negin Nickparsa
I'm in opensuse I tried wget url for another site it is working
there(without -O)

for example I can have this:

wget http://library.linode.com/assets/695-wget-example.txt

and it is working it will be downloaded on /root

but I'm so confused about snort rules that why I can't download them
I also tried this without -o:



wget 
http://www.snort.org/reg-rules/snortrules-snapshot-2900.tar./c0e9480af637e53c7aae823a40a131edc1343db5
--11:32:01--  
http://www.snort.org/reg-rules/snortrules-snapshot-2900.tar.gz/c9480af637e53c7aae823a40a131edc1343db5
   => `c0e9480af637e53c7aae823a40a131edc1343db5'
Resolving www.snort.org... 68.177.102.20
Connecting to www.snort.org|68.177.102.20|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: 
http://s3.amazonaws.com/snort-org/www/rules/20110208/snortrules-snapot-2900.tar.gz?AWSAccessKeyId=AKIAJJSHU7YNPLE5MKOQ&Expires=1310368612&Signatur4%2FmK3rg3f%2FXFi5VhOm%2FjCW%2BcBSM%3D
[following]
--11:32:04--  
http://s3.amazonaws.com/snort-org/www/rules/20110208/snortrules-apshot-2900.tar.gz?AWSAccessKeyId=AKIAJJSHU7YNPLE5MKOQ&Expires=1310368612&Signure=4%2FmK3rg3f%2FXFi5VhOm%2FjCW%2BcBSM%3D
   => 
`snortrules-snapshot-2900.tar.gz?AWSAccessKeyId=AKIAJJSHU7YNPLE5OQ&Expires=1310368612&Signature=4%2FmK3rg3f%2FXFi5VhOm%2FjCW+cBSM='
Resolving s3.amazonaws.com... 72.21.214.143
Connecting to s3.amazonaws.com|72.21.214.143|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
11:32:10 ERROR 403: Forbidden.

again error the file is empty


Re: [PHP] using wget in shell for download(snort)

2011-07-11 Thread Negin Nickparsa
Sorry that I disssturbed you
I appologize you,ok I will solve my problem in another mailing list


my application is in php
I simplified using snort by writing an application
but in the updating part of files I wanted to automatically download the
files
which user will have nothing to do in shell just clicking on the sub button
my task:by executing in PHP (doing updates)
they have their downloaded files more easily


Re: [PHP] using wget in shell for download(snort)

2011-07-11 Thread Negin Nickparsa
I logined in there and I used my oinkcode I tried to download just one rule
I mean *.rules
It worked I can download one by one but not the group of them

maybe their files are corrupted

see here that I downloaded:

 wget http://cvs.snort.org/viewcvs.cgi/snort/rules/dos.rules
--12:09:32--  http://cvs.snort.org/viewcvs.cgi/snort/rules/dos.rules
   => `dos.rules'
Resolving cvs.snort.org... 64.214.53.20
Connecting to cvs.snort.org|64.214.53.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]

[<=>  ] 88,85819.99K/s

12:09:40 (19.98 KB/s) - `dos.rules' saved [88858]


Re: [PHP] using wget in shell for download(snort)

2011-07-11 Thread Negin Nickparsa
I mean it was my own oinkcode I was a registered user


Re: [PHP] using wget in shell for download(snort)

2011-07-11 Thread Negin Nickparsa
I appreciate your attention,thank you very much

I have some problems like interdict in my country access that I can't access
the whole sites like this one
I have VPN that I use in my home but not in another locations like here.

I'll try it in another situation

BTW thank you very much Stuart


Re: [PHP] PHP control structure

2011-07-13 Thread Negin Nickparsa
if the problem is only the assigning it's an example:
in mysql you can have this one:
create table store_list(id_markets int auto_increment,store_type int,primary
key(id_markets));

and for page this one:




Store




store type
corporate
standard

ID:




also I didn't understand your code that you have 'id_store' and 'id_markets'
it's confusing for me

if it wasn't your problem please clarify your question maybe I can help.


Re: [PHP] Members area Login with permissions!

2011-07-24 Thread Negin Nickparsa
you didn't set the $message

for example here that you mentioned:
You have successfuly been logged in. You can now access
the advanced area.

change it to $message="You have successfuly been logged in. You can now
access the advanced area";

hope it will help.


Re: [PHP] Membership site

2011-07-28 Thread Negin Nickparsa
http://www.php.net/manual/en/security.database.sql-injection.php

http://www.php.net/manual/en/security.database.storage.php


Re: [PHP] I can't execute pf commands

2011-07-28 Thread Negin Nickparsa
did you try it in shell? or just You tried it in PHP?


Re: [PHP] Re: I can't execute pf commands

2011-07-28 Thread Negin Nickparsa
If you want to execute shell commands as root theres another solution too

try this:

shell_exec('sudo -u root ls -l /var/tmp')

but the solution Of shawn is better then it will not needed to set it again
in another commands


Re: [PHP] Re: I can't execute pf commands

2011-07-28 Thread Negin Nickparsa
also by gcc you can use code it and run the gcc in shell

I like this one:

setfacl -m u:wwwrun:rw the path that you would like


for permissions you can set it for the folders you have then run this
compiler it will make an executable file you can give a name to them by -o
'r' and 'w' are for read and write also you can have 'x' for execute
permission

now you can use this executable file on any new computer just run it and it
will make
permissions

I don't know in your Os you have wwwrun or not I have it in Suse

*wwwrun is used for doing things permission-wise but Apache doesn't need
to "login" with it. Again, this keeps it safe from attackers.*
*
*
*
*


Re: [PHP] I can't execute pf commands

2011-07-28 Thread Negin Nickparsa
Arthur would you please explain it in more details?


Re: [PHP] I can't execute pf commands

2011-07-28 Thread Negin Nickparsa
Bulint clear private data or cookies maybe your browser stores something and
can't act for this clear them and then try and tell us the result

2011/7/28 Bulent Malik 

> **
>
>
>
>   >> did you try it in shell? or just You tried it in PHP?
>
> Yeah, I tried it on shell and it works on it. Also if I execute it as
> command line, it works  ;
>
> php test.php
>
> But when I try it on www ( internet explorer, firefox, chrome ..)  it
> doesn't work.
>
>
>


Re: [PHP] I can't execute pf commands

2011-07-28 Thread Negin Nickparsa
another point: I think you tried it in shell as a root but in browser it
can't execute it as a root again I agree with Shawn it is from permission

try the command  that I told you I mean edit the command and then run it in
browser


Re: [PHP] PHP runs but apache says its a faulting module every so often

2011-07-31 Thread Negin Nickparsa
did you run phpinfo()?


Re: [PHP] Sending a message

2011-08-04 Thread Negin Nickparsa
in previous pages you must have a login page and in login page you must
store the username and then in next steps you have username in
$_SESSION['user']
now if it is not your problem then what is the problem?


Re: [PHP] Sending a message

2011-08-04 Thread Negin Nickparsa
you must check setting your session with this one:

if(isset($_SESSION['user']))
{


// Identifying the user
$user = $_SESSION['user'];

// Information for the user.
}
tell me what you have done in login page?


Re: [PHP] Sending a message

2011-08-04 Thread Negin Nickparsa
did you set the 
?


Re: [PHP] Sending a message

2011-08-04 Thread Negin Nickparsa
in this line password='$_POST[pass]'";

you have error change it to password='$_POST['pass']'";


  1   2   >