php-general Digest 18 Feb 2008 16:04:53 -0000 Issue 5300
Topics (messages 269465 through 269481):
Re: Session destruction problem
269465 by: Shawn McKenzie
Re: Protected ZIP file with password
269466 by: Petrus Bastos
269480 by: Bastien Koert
269481 by: Petrus Bastos
open a secondary window/tab in the browser from php
269467 by: julian
269468 by: Børge Holen
269469 by: Zoltán Németh
269471 by: julian
269472 by: Neo [GC]
269474 by: Jay Blanchard
269478 by: Daniel Brown
Converting tab delimited file to CSV
269470 by: Graham Cossey
269473 by: Hiep Nguyen
269475 by: Edward Kay
269476 by: Graham Cossey
269479 by: Andrew Ballard
Re: Question about cURL, and iFrames...
269477 by: Dan Joseph
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Adil Drissi wrote:
> Well, i'm doing all that. Maybe something is wrong in
> my code. I'll arrange my code in a way that it will be
> easy to run and i'll post it. I think like that,
> you'll see by yourself and you gonna help to fix that
> for sure.
>
> Thank you
> --- Shawn McKenzie <[EMAIL PROTECTED]> wrote:
>
>> Adil Drissi wrote:
>>> Hi everybody,
>>>
>>> I need help with sessions.
>>> I have a simple authentification relying only on
>>> sessions (i don't use cookies). After the user
>> submits
>>> his username and password, the script checks if
>> that
>>> corresponds to a record in a mysql table. If this
>> is
>>> the case "$_SESSION['sessioname'] =
>> $_POST['login'];".
>>> the $_SESSION['sessioname'] is checked in
>> subsequent
>>> pages to see if the user is connected or not.
>>> The problem is after the user logs out, and after
>> that
>>> uses the previous button of the browser he becomes
>>> connected. How can i prevent this please.
>>>
>>> Here is my logout.php:
>>>
>>> <?php
>>> session_start();
>>> unset($_SESSION["sessioname"]);
>>> session_destroy();
>>> header("location: index.php");
>>> ?>
>>>
>>> Thank you for advance
>>>
>>>
>>>
> ____________________________________________________________________________________
>>> Looking for last minute shopping deals?
>>> Find them fast with Yahoo! Search.
> http://tools.search.yahoo.com/newsearch/category.php?category=shopping
>> I don't think they are "reconnected". What happens
>> if they logout, then
>> hit back, then hit refresh? Are they loggedin?
>> Probably not. It may
>> just appear that way because the back bottom brings
>> up a cache of the
>> previous page. But once the user tries to do
>> anything that requires
>> that they be loggedin, I doubt they can.
>>
>> -Shawn
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
>
>
> ____________________________________________________________________________________
> Never miss a thing. Make Yahoo your home page.
> http://www.yahoo.com/r/hs
>From the code you've shown it should work fine, but you might do
unset($_SESSION); or $_SESSION = array(); instead of
unset($_SESSION["sessioname"]);. Regardless, the fact is that the page
you see is cached and I can't believe that after logout you can go back
and then click a link to another page and still be loggedin.
-Shawn
--- End Message ---
--- Begin Message ---
Nick,
Thanks again for your worry. So, let's go, here goes my situation. I'm
exporting data to another system. That system have an option to be feed by a
password protected zip file. The export activity will be occur in this way:
the user will generate the file on my application and will put this file
into that another system. So, I need generate that file. Maybe one solution
is to generate the file unzipped and determine that user should zip the file
with password on his Windows or Linux operating system. But, I can't let
that responsibility on user hands. So, because that I need to generate the
file already protected.
PS: Sorry my bad english. I'm Brazilian and I'm not fluent english.
Thanks one more time,
Petrus Bastos.
On Feb 18, 2008 12:26 AM, Nick Stinemates <[EMAIL PROTECTED]> wrote:
> Petrus Bastos wrote:
> > Chris,
> >
> > Thanks for your help, but I think that package can't make what I
> want.
> > But , I appreciate your help anyway and if you have any other ideas,
> please
> > let me know! :)
> >
> > Thanks,
> > Petrus Bastos.
> >
> > On Feb 17, 2008 10:38 PM, Chris <[EMAIL PROTECTED]> wrote:
> >
> >
> >> Petrus Bastos wrote:
> >>
> >>> Unfortunately I don't have access to this family of methods because
> >>>
> >> security
> >>
> >>> policy. Lefting this way out, I didn't find anyway on how to do that.
> If
> >>>
> >> you
> >>
> >>> have any idea or know any module can do that, I'll appreciate to know
> >>>
> >> too!
> >>
> >> See if the pear package does what you want:
> >>
> >> http://pear.php.net/package/File_Archive
> >>
> >> --
> >> Postgresql & php tutorials
> >> http://www.designmagick.com/
> >>
> >>
> >
> >
> I'm sure you know what you're doing, but maybe you'd be better off
> letting us know the task / process to better understand what you'd like
> to accomplish. From there, since it's obvious that PHP does not have
> built in password functions, and that exec() is out of the question;
> maybe we can figure out how to move onward.
>
> --
> ==================
> Nick Stinemates ([EMAIL PROTECTED])
> http://nick.stinemates.org
>
> AIM: Nick Stinemates
> MSN: [EMAIL PROTECTED]
> Yahoo: [EMAIL PROTECTED]
> ==================
>
>
>
--- End Message ---
--- Begin Message ---
Hey, what about placing the unzipped folder into a dir that has a process
watching it that will pick up the file, zip and protect it and then ftp (or
another delivery mechanism) to the destination?
Bastien
> Date: Mon, 18 Feb 2008 08:59:02 -0300> From: [EMAIL PROTECTED]> To: [EMAIL
> PROTECTED]> CC: [EMAIL PROTECTED]; [EMAIL PROTECTED]> Subject: Re: [PHP]
> Protected ZIP file with password> > Nick,> > Thanks again for your worry. So,
> let's go, here goes my situation. I'm> exporting data to another system. That
> system have an option to be feed by a> password protected zip file. The
> export activity will be occur in this way:> the user will generate the file
> on my application and will put this file> into that another system. So, I
> need generate that file. Maybe one solution> is to generate the file unzipped
> and determine that user should zip the file> with password on his Windows or
> Linux operating system. But, I can't let> that responsibility on user hands.
> So, because that I need to generate the> file already protected.> > PS: Sorry
> my bad english. I'm Brazilian and I'm not fluent english.> > Thanks one more
> time,> Petrus Bastos.> > On Feb 18, 2008 12:26 AM, Nick Stinemates <[EMAIL
> PROTECTED]> wrote:> > > Petrus Bastos wrote:> > > Chris,> > >> > > Thanks for
> your help, but I think that package can't make what I> > want.> > > But , I
> appreciate your help anyway and if you have any other ideas,> > please> > >
> let me know! :)> > >> > > Thanks,> > > Petrus Bastos.> > >> > > On Feb 17,
> 2008 10:38 PM, Chris <[EMAIL PROTECTED]> wrote:> > >> > >> > >> Petrus Bastos
> wrote:> > >>> > >>> Unfortunately I don't have access to this family of
> methods because> > >>>> > >> security> > >>> > >>> policy. Lefting this way
> out, I didn't find anyway on how to do that.> > If> > >>>> > >> you> > >>> >
> >>> have any idea or know any module can do that, I'll appreciate to know> >
> >>>> > >> too!> > >>> > >> See if the pear package does what you want:> > >>>
> > >> http://pear.php.net/package/File_Archive> > >>> > >> --> > >> Postgresql
> & php tutorials> > >> http://www.designmagick.com/> > >>> > >>> > >> > >> >
> I'm sure you know what you're doing, but maybe you'd be better off> > letting
> us know the task / process to better understand what you'd like> > to
> accomplish. From there, since it's obvious that PHP does not have> > built in
> password functions, and that exec() is out of the question;> > maybe we can
> figure out how to move onward.> >> > --> > ==================> > Nick
> Stinemates ([EMAIL PROTECTED])> > http://nick.stinemates.org> >> > AIM: Nick
> Stinemates> > MSN: [EMAIL PROTECTED]> > Yahoo: [EMAIL PROTECTED]> >
> ==================> >> >> >
_________________________________________________________________
--- End Message ---
--- Begin Message ---
Bastien,
I thank your help, but I think that your idea doesn't resolve my problem
because I need generate that file online when user clicks on a link.The file
must be obtained at the time he clicks.
Thanks anyway,
Petrus Bastos.
On Feb 18, 2008 12:18 PM, Bastien Koert <[EMAIL PROTECTED]> wrote:
>
> Hey, what about placing the unzipped folder into a dir that has a process
> watching it that will pick up the file, zip and protect it and then ftp (or
> another delivery mechanism) to the destination?
>
> Bastien
> > Date: Mon, 18 Feb 2008 08:59:02 -0300> From: [EMAIL PROTECTED]> To:
> [EMAIL PROTECTED]> CC: [EMAIL PROTECTED]; [EMAIL PROTECTED]>
> Subject: Re: [PHP] Protected ZIP file with password> > Nick,> > Thanks again
> for your worry. So, let's go, here goes my situation. I'm> exporting data to
> another system. That system have an option to be feed by a> password
> protected zip file. The export activity will be occur in this way:> the user
> will generate the file on my application and will put this file> into that
> another system. So, I need generate that file. Maybe one solution> is to
> generate the file unzipped and determine that user should zip the file> with
> password on his Windows or Linux operating system. But, I can't let> that
> responsibility on user hands. So, because that I need to generate the> file
> already protected.> > PS: Sorry my bad english. I'm Brazilian and I'm not
> fluent english.> > Thanks one more time,> Petrus Bastos.> > On Feb 18, 2008
> 12:26 AM, Nick Stinemates <[EMAIL PROTECTED]> wrote:> > > Petrus Bastos
> wrote:> > > Chris,> > >> > > Thanks for your help, but I think that package
> can't make what I> > want.> > > But , I appreciate your help anyway and if
> you have any other ideas,> > please> > > let me know! :)> > >> > > Thanks,>
> > > Petrus Bastos.> > >> > > On Feb 17, 2008 10:38 PM, Chris <
> [EMAIL PROTECTED]> wrote:> > >> > >> > >> Petrus Bastos wrote:> > >>> >
> >>> Unfortunately I don't have access to this family of methods because> >
> >>>> > >> security> > >>> > >>> policy. Lefting this way out, I didn't find
> anyway on how to do that.> > If> > >>>> > >> you> > >>> > >>> have any idea
> or know any module can do that, I'll appreciate to know> > >>>> > >> too!> >
> >>> > >> See if the pear package does what you want:> > >>> > >>
> http://pear.php.net/package/File_Archive> > >>> > >> --> > >> Postgresql &
> php tutorials> > >> http://www.designmagick.com/> > >>> > >>> > >> > >> >
> I'm sure you know what you're doing, but maybe you'd be better off> >
> letting us know the task / process to better understand what you'd like> >
> to accomplish. From there, since it's obvious that PHP does not have> >
> built in password functions, and that exec() is out of the question;> >
> maybe we can figure out how to move onward.> >> > --> > ==================>
> > Nick Stinemates ([EMAIL PROTECTED])> > http://nick.stinemates.org> >>
> > AIM: Nick Stinemates> > MSN: [EMAIL PROTECTED]> > Yahoo:
> [EMAIL PROTECTED]> > ==================> >> >> >
> _________________________________________________________________
>
>
--- End Message ---
--- Begin Message ---
Hi,
I have an application that along filling in some forms, it produces a
pdf file, as confirmation of all entered data.
I want to send this pdf file to a different window/tab of the browser,
so it is displayed and can latter be printed.
In the mean time, the original window contains a confirmation message,
to continue with the work flow.
I would like to do this without use of JavaScript....
Any combination of headers ??
Any hints appreciated.
JCG
--- End Message ---
--- Begin Message ---
On Monday 18 February 2008 13:59:11 julian wrote:
> Hi,
>
> I have an application that along filling in some forms, it produces a
> pdf file, as confirmation of all entered data.
>
> I want to send this pdf file to a different window/tab of the browser,
> so it is displayed and can latter be printed.
html target?
>
> In the mean time, the original window contains a confirmation message,
> to continue with the work flow.
>
> I would like to do this without use of JavaScript....
>
> Any combination of headers ??
>
> Any hints appreciated.
>
> JCG
--
---
Børge Holen
http://www.arivene.net
--- End Message ---
--- Begin Message ---
2008. 02. 18, hétfő keltezéssel 13.59-kor julian ezt írta:
>
> Hi,
>
> I have an application that along filling in some forms, it produces a
> pdf file, as confirmation of all entered data.
>
> I want to send this pdf file to a different window/tab of the browser,
> so it is displayed and can latter be printed.
>
> In the mean time, the original window contains a confirmation message,
> to continue with the work flow.
>
> I would like to do this without use of JavaScript....
I don't think you can do that...
greets
Zoltán Németh
>
> Any combination of headers ??
>
> Any hints appreciated.
>
> JCG
>
--- End Message ---
--- Begin Message ---
not html target, pdf window.... so it can be saved and printed
separately form the application.
Børge Holen wrote:
On Monday 18 February 2008 13:59:11 julian wrote:
Hi,
I have an application that along filling in some forms, it produces a
pdf file, as confirmation of all entered data.
I want to send this pdf file to a different window/tab of the browser,
so it is displayed and can latter be printed.
html target?
In the mean time, the original window contains a confirmation message,
to continue with the work flow.
I would like to do this without use of JavaScript....
Any combination of headers ??
Any hints appreciated.
JCG
--- End Message ---
--- Begin Message ---
No, this is not possible.
You have to do at least two requests, one to get the PDF, one to get the
html confirmation message.
Normally you would onle open the pdf in a new window using
target="_blank" for the link. Workflow isn't broken, but you have no
confirmation message.
There are several ways to do what you want with javascript, but without
there is none.
julian schrieb:
Hi,
I have an application that along filling in some forms, it produces a
pdf file, as confirmation of all entered data.
I want to send this pdf file to a different window/tab of the browser,
so it is displayed and can latter be printed.
In the mean time, the original window contains a confirmation message,
to continue with the work flow.
I would like to do this without use of JavaScript....
Any combination of headers ??
Any hints appreciated.
JCG
--- End Message ---
--- Begin Message ---
[snip]
not html target, pdf window.... so it can be saved and printed
separately form the application.
[/snip]
You have to use an anchor tag's target attribute to open the new tab or
window (PHP is server-side and cannot do this);
<a href="/path/to/my.pdf" target="_blank">
--- End Message ---
--- Begin Message ---
On Feb 18, 2008 8:55 AM, Jay Blanchard <[EMAIL PROTECTED]> wrote:
> [snip]
> not html target, pdf window.... so it can be saved and printed
> separately form the application.
> [/snip]
>
> You have to use an anchor tag's target attribute to open the new tab or
> window (PHP is server-side and cannot do this);
>
> <a href="/path/to/my.pdf" target="_blank">
You can also do what sites like H&R Block do - create an IFRAME
with the PDF displayed therein. As long as the user has the Adobe
Acrobat plugin, the PDF will display inline, complete with all
toolbars and scrollbars, allowing them to save and print fine.
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
--- End Message ---
--- Begin Message ---
I was wondering if someone could offer some advice please.
I'm being sent data in tab delimited files which I'm trying to split
into smaller files and convert to comma delimited using PHP.
Now, I can replace the tabs with commas and opening the resulting
files in a basic text editor all looks fine. However when I open the
files in M$ Excel they're still being treated as tab delimited and all
values are being shoved into a single column.
What can I do in the PHP code to specifically make the file CSV and be
treated as such by M$ Excel?
I'm currently just using fopen for old and new files and fwrite.
--
Graham
--- End Message ---
--- Begin Message ---
On Mon, 18 Feb 2008, Graham Cossey wrote:
I was wondering if someone could offer some advice please.
I'm being sent data in tab delimited files which I'm trying to split
into smaller files and convert to comma delimited using PHP.
Now, I can replace the tabs with commas and opening the resulting
files in a basic text editor all looks fine. However when I open the
files in M$ Excel they're still being treated as tab delimited and all
values are being shoved into a single column.
What can I do in the PHP code to specifically make the file CSV and be
treated as such by M$ Excel?
I'm currently just using fopen for old and new files and fwrite.
--
Graham
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
don't double-click on file_name.csv, instead open MS Excel, then click on
file open and locate your file, then you'll know what to do from there.
t. hiep
--- End Message ---
--- Begin Message ---
> Now, I can replace the tabs with commas and opening the resulting
> files in a basic text editor all looks fine.
When you do this, ensure you escape any commas that may exist in the data.
IIRC, Excel handles this be enclosing the whole field in "double quotes".
Can remember how it handles escaping these though...
Edward
--- End Message ---
--- Begin Message ---
On Feb 18, 2008 1:58 PM, Edward Kay <[EMAIL PROTECTED]> wrote:
>
> > Now, I can replace the tabs with commas and opening the resulting
> > files in a basic text editor all looks fine.
>
> When you do this, ensure you escape any commas that may exist in the data.
>
> IIRC, Excel handles this be enclosing the whole field in "double quotes".
> Can remember how it handles escaping these though...
>
> Edward
>
>
I know I can Open in Excel and then go through an "import" process
specifying the delimiter and string enclosure etc, however the files I
used to get were "true" CSV files and opened fine, I'm wondering if
there's some kind a file header or the like that specifies the kind of
data contained in the file.
I don't have an issue with commas within the data, but thanks for highlighting.
Probably just excel trying to be "helpful" again and totally scr3wing
things up :-/
--
Graham
--- End Message ---
--- Begin Message ---
On Feb 18, 2008 8:58 AM, Edward Kay <[EMAIL PROTECTED]> wrote:
>
> > Now, I can replace the tabs with commas and opening the resulting
> > files in a basic text editor all looks fine.
>
> When you do this, ensure you escape any commas that may exist in the data.
>
> IIRC, Excel handles this be enclosing the whole field in "double quotes".
> Can remember how it handles escaping these though...
>
> Edward
>
>
If there are double quotes inside a quoted string, they are doubled. eg.
"This string contains ""quoted content"" in a CSV format that M$ products
can understand."
Andrew
--- End Message ---
--- Begin Message ---
On Feb 15, 2008 9:43 AM, Jason Pruim <[EMAIL PROTECTED]> wrote:
> I am trying to think through something, I am writing a simple proxy
> script for my own knowledge and to simplify my life :)
>
> What I want to do is bring in multiple website by going to 1 webpage
> (Think RSS for the entire website) have all the links work properly,
> login to the pages etc. etc. etc. I think I can do this with cURL
> which can pull the page in and display it properly, but I'm wondering
> if I should be displaying in an iFrame to keep my navigation links at
> the top to go around my site?
>
Well, I think the short answer to that is Yes, curl can do what you want.
You could pull in the page with curl, then go thru it and populate form
fields, then display it. You wouldn't need an iframe, you'd just pull it in
with curl, run thru and populate the fields, then display the finished
product on the screen. One thing you may also want to keep in mind is that
I think you'd have to go through and fix the image links and url links if
they don't have the full url path in the html.
--
-Dan Joseph
"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."
--- End Message ---