Jul 24, 2008

A Few Things - phpbb question as well as .zip question

Free Web Hosting, No Ads > General > Hosted Members Area

free web hosting

A Few Things - phpbb question as well as .zip question

AlternativeNick
First of all, I was wondering how i could go about creating a log-in section, and using the phpbb logins (forum names and passwords) and making it protect a certain area of my site, as i would hate to have 2 different logins for the forum and the site... basically, im looking for something that allows you to log into the forum without going to the forum, and when ur logged in on the forum, it also allows you to go to a different area, outside of the forum.


Secondly, is it possible to create a .zip file with php directly on the hosting server?

Reply

Plenoptic
http://deceptive-logic.com/index.php?id=tu...&tutorial=login

Ok well first of all you can use this tutorial to help you log into a page that is protected. After you copy and paste the code look for this part.

QUOTE
echo "You are now logged in as ".$_SESSION['username']."<br>
<a href=/index.php?".$s_name."=".$s_id.">Return Home</a>.";
?>


After you find that just change that link in there to the protected page you would like to take them to.

As for zipping files on a hosted server I don't know how you would do that. I am not sure if it is possible. You can download them all onto a folder in your computer and then zip them and upload again but that would be time consuming.

Reply

kylelnsn
cheers im going to have a read of this and see if ic an integrate my site into this sum how maybe in one way or another!!!, any ways thanks for the link and im nowing goignt o read it and see if i can incorperate this into my site, if i get time i will post back here with a link to my site with a working version and then you can all have a look at it, thats if iu ahve time and if i can get it to work, although once again thanks for the link adn i hope that this will be of help to others and plenotonic not just me,lol yeah so wish me luck im goign to go and give it a little whizz now and see where we cna go from there!!!, HOPE this works cus this could be very very veyr useful to me!!! thanks and im goign to say it agian thansk for the link and i hope it works!!!!!!!!!!!!!!!!!!!!!!!

Reply

Plenoptic
lol Anytime. If you ever need help with php and what not there are tons of tutorials at http://pixel2life.com This is a place where you can learn about many programs for the computer and web coding so check that out. That is where I found the tutorial. Good luck and I hope it works.

Reply

electriic ink
After searching google, I found this code] creates a zip file and prepares it for download. It you tweak it a bit I'm sure you can make it so that it stores the file and doesn't prepare it for download:

CODE
<?php

/**
* Class to dynamically create a zip file (archive)
*
* @author Rochak Chauhan
*/

class createZip {

public $compressedData = array();
public $centralDirectory = array(); // central directory
public $endOfCentralDirectory = "\x50\x4b\x05\x06\x00\x00\x00\x00"; //end of Central directory record
public $oldOffset = 0;

/**
* Function to create the directory where the file(s) will be unzipped
*
* @param $directoryName string
*
*/

public function addDirectory($directoryName) {
$directoryName = str_replace("\\", "/", $directoryName);

$feedArrayRow = "\x50\x4b\x03\x04";
$feedArrayRow .= "\x0a\x00";
$feedArrayRow .= "\x00\x00";
$feedArrayRow .= "\x00\x00";
$feedArrayRow .= "\x00\x00\x00\x00";

$feedArrayRow .= pack("V",0);
$feedArrayRow .= pack("V",0);
$feedArrayRow .= pack("V",0);
$feedArrayRow .= pack("v", strlen($directoryName) );
$feedArrayRow .= pack("v", 0 );
$feedArrayRow .= $directoryName;

$feedArrayRow .= pack("V",0);
$feedArrayRow .= pack("V",0);
$feedArrayRow .= pack("V",0);

$this -> compressedData[] = $feedArrayRow;

$newOffset = strlen(implode("", $this->compressedData));

$addCentralRecord = "\x50\x4b\x01\x02";
$addCentralRecord .="\x00\x00";
$addCentralRecord .="\x0a\x00";
$addCentralRecord .="\x00\x00";
$addCentralRecord .="\x00\x00";
$addCentralRecord .="\x00\x00\x00\x00";
$addCentralRecord .= pack("V",0);
$addCentralRecord .= pack("V",0);
$addCentralRecord .= pack("V",0);
$addCentralRecord .= pack("v", strlen($directoryName) );
$addCentralRecord .= pack("v", 0 );
$addCentralRecord .= pack("v", 0 );
$addCentralRecord .= pack("v", 0 );
$addCentralRecord .= pack("v", 0 );
$ext = "\x00\x00\x10\x00";
$ext = "\xff\xff\xff\xff";
$addCentralRecord .= pack("V", 16 );

$addCentralRecord .= pack("V", $this -> oldOffset );
$this -> oldOffset = $newOffset;

$addCentralRecord .= $directoryName;

$this -> centralDirectory[] = $addCentralRecord;
}

/**
* Function to add file(s) to the specified directory in the archive
*
* @param $directoryName string
*
*/

public function addFile($data, $directoryName) {

$directoryName = str_replace("\\", "/", $directoryName);

$feedArrayRow = "\x50\x4b\x03\x04";
$feedArrayRow .= "\x14\x00";
$feedArrayRow .= "\x00\x00";
$feedArrayRow .= "\x08\x00";
$feedArrayRow .= "\x00\x00\x00\x00";

$uncompressedLength = strlen($data);
$compression = crc32($data);
$gzCompressedData = gzcompress($data);
$gzCompressedData = substr( substr($gzCompressedData, 0, strlen($gzCompressedData) - 4), 2);
$compressedLength = strlen($gzCompressedData);
$feedArrayRow .= pack("V",$compression);
$feedArrayRow .= pack("V",$compressedLength);
$feedArrayRow .= pack("V",$uncompressedLength);
$feedArrayRow .= pack("v", strlen($directoryName) );
$feedArrayRow .= pack("v", 0 );
$feedArrayRow .= $directoryName;

$feedArrayRow .= $gzCompressedData;

$feedArrayRow .= pack("V",$compression);
$feedArrayRow .= pack("V",$compressedLength);
$feedArrayRow .= pack("V",$uncompressedLength);

$this -> compressedData[] = $feedArrayRow;

$newOffset = strlen(implode("", $this->compressedData));

$addCentralRecord = "\x50\x4b\x01\x02";
$addCentralRecord .="\x00\x00";
$addCentralRecord .="\x14\x00";
$addCentralRecord .="\x00\x00";
$addCentralRecord .="\x08\x00";
$addCentralRecord .="\x00\x00\x00\x00";
$addCentralRecord .= pack("V",$compression);
$addCentralRecord .= pack("V",$compressedLength);
$addCentralRecord .= pack("V",$uncompressedLength);
$addCentralRecord .= pack("v", strlen($directoryName) );
$addCentralRecord .= pack("v", 0 );
$addCentralRecord .= pack("v", 0 );
$addCentralRecord .= pack("v", 0 );
$addCentralRecord .= pack("v", 0 );
$addCentralRecord .= pack("V", 32 );

$addCentralRecord .= pack("V", $this -> oldOffset );
$this -> oldOffset = $newOffset;

$addCentralRecord .= $directoryName;

$this -> centralDirectory[] = $addCentralRecord;
}

/**
* Fucntion to return the zip file
*
* @return zipfile (archive)
*/

public function getZippedfile() {

$data = implode("", $this -> compressedData);
$controlDirectory = implode("", $this -> centralDirectory);

return
$data.
$controlDirectory.
$this -> endOfCentralDirectory.
pack("v", sizeof($this -> centralDirectory)).
pack("v", sizeof($this -> centralDirectory)).
pack("V", strlen($controlDirectory)).
pack("V", strlen($data)).
"\x00\x00";
}

/**
*
* Function to force the download of the archive as soon as it is created
*
* @param archiveName string - name of the created archive file
*/

public function forceDownload($archiveName) {
$headerInfo = '';

if(ini_get('zlib.output_compression')) {
ini_set('zlib.output_compression', 'Off');
}

// Security checks
if( $archiveName == "" ) {
echo "<html><title>Public Photo Directory - Download </title><body><BR><B>ERROR:</B> The download file was NOT SPECIFIED.</body></html>";
exit;
}
elseif ( ! file_exists( $archiveName ) ) {
echo "<html><title>Public Photo Directory - Download </title><body><BR><B>ERROR:</B> File not found.</body></html>";
exit;
}

header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false);
header("Content-Type: application/zip");
header("Content-Disposition: attachment; filename=".basename($archiveName).";" );
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($archiveName));
readfile("$archiveName");

}

}
?>

 

 

 


Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : things, phpbb, zip

  1. Can't Access My Site An Cpanel
    already did some sugested things (4)
  2. Phpbb Mods That You Should Get For Your Phpbb3 Forum
    only for phpBB3.0.x though... (9)
    For those of you who are hosted on Trap17 and using phpBB3.0.x you might want to consider adding
    some mods... Some mods which I extremely highly recommend to get is: #1 "Anti-Bot Question" mod,
    which adds a question like "can you see through glass?" (not actual example, result may vary),
    according to many people who have tried the mod, it is REALLY useful at keeping low-medium level
    advanced bots at bay, although some extremely complex advanced bots may still get through... I
    personally don't have this mod, but I would install it if I have the time to... #2 "Evi....
  3. Got A Great Phpbb File With Mods Already Installed?
    If you do put it here. (3)
    As the name implies, I think it would be a good idea to giving those who aren't really "mod
    savvy" a chance to look at what phpBB's could look like with some regular mods installed. If
    this thread is innappropriate I'll be glad to delete it away or rather, I give permission to
    have it deleted if it isn't appropriate.....
  4. The State Of Trap17
    Some Things Are Getting Pretty Annoying Here (24)
    I, the founder of trap17, declare that this is one of the most hilarious topics ever made. Members
    please take your time to read this and do enjoy it. My special thanks to Buff and Velma. I
    personally ditest trap17 because of it's clutter, it's impossibility to navigate, and the
    fact that admins like buffalohelp haven't been banned yet, as he abuses his power to the point
    of threatening free speech. Trap17 is way to orienated on its appeal, and not it's content,
    which is what's really important. If you make something flashy but pointless, all your....
  5. I Need Some Things
    for my sight (0)
    Ok i tried searching the web and hot scripts but i can't just find what i want free /sad.gif"
    style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> What i need is: 1- A login
    script along with a register option. The script must also be able to update and edit database. 2-A
    data base for acounts which can hold unit status and traits. 3-A battle engine script that can be
    edited. 4-A cool template with dark colors (black,brown,night....) Also can you tell me how to
    integrate them into my sight? do i just upload them to the data base or something? Th....
  6. Can't Install Phpbb!
    Help! (21)
    I am getting very frustrated as I cannot for the life of me figure out how to install phpbb
    completely. I've uploaded all the files using FTPSmart. I think clicked on the install.php
    fine, and was taken to the screen where I fill everything out. It says I successfully did all that:
    Your admin username has been created. At this point your basic installation is complete. You will
    now be taken to a screen which will allow you to administer your new installation. Please be sure to
    check the General Configuration details and make any required changes. Thank you for ch....
  7. Installing Phpbb Forum On My Site?
    (5)
    Hello! I was just wondering how I go about installing the phpbb forum on my site. I assume I
    go somewhere from the CPanel? I think someone told me that the CPanel has something that installs
    it for me automatically. Thank you!....
  8. Installing Phpbb
    database problem (0)
    Hey guy's, ive done as you said and tried to install my phpbb without fantastico. I have got to
    the the install page then i get a mysql error QUOTE Warning: mysql_error(): supplied argument
    is not a valid MySQL-Link resource in /home/tdm/public_html/forum/phpBB2/db/mysql4.php on line 330
    Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in
    /home/tdm/public_html/forum/phpBB2/db/mysql4.php on line 331 phpBB : Critical Error Could not
    connect to the database Im not sure why this has happened as i have never really used mysql for
    ....
  9. Help Installing Phpbb On My Site [resolved]
    (6)
    Ok, i am hosted here and i am trying to get the phpBB2 forums installed on my site. I have made a
    database, i have uploaded all of the folders to the FTP. Now everytime i try to start the install,
    it either says that there is a critical error, and that i have configured something wrong. Does
    anybody know the Database Type i need to use? And any other help that you could tell me would be
    appreciated. Thanks.....
  10. Subforums In Phpbb
    (8)
    I want to create Subforums in PhpBB forum just like in IPB forums, but I didnt find any options
    please help me do that.....
  11. Phpbb Forum Problem
    (3)
    ok, well when i went to my forums here it says phpBB : Critical Error Could not connect to the
    database whats happened? it was working great last night. thanks....
  12. Cpanel + Website + Ftp + Xisto Network Ban.
    I got a ban from doing normal things. (4)
    Oke here's what hapend, a frend of mine created a new game and I wanted him to configure it for
    me so. I created a ftp account for him. And tried if it workd, it dident tried to login couple
    times. I thaught hmm maybe me? Gave it to him same thing, then I was on cpanel he tried my main ftp
    login, that workd but then when he wanted to upload the files he coundt. ( ps its a dutch criminal
    site ) Also the name of it, dunno if the server has a block or anything for it. Since then am
    denied all acces to the xisto network of trap17, I am blockd from my own website cpanel....
  13. Phpbb Plus, How To Setup Mailing
    I badly need help configurating it. (1)
    Hello, I woud like some support and advise how I need to configure the phpbb plus forum. I installd
    it and well basic mail function dusent work. And I saw you people give away stmp mail accounts. Now
    coud I use 1 of those adresses in the forum? Use SMTP Server for email Say yes if you want or have
    to send email via a named server instead of the local mail function Yes No SMTP Server Address
    SMTP Username Only enter a username if your SMTP server requires it SMTP Password Only enter a
    password if your SMTP server requires it Plz woud some 1 advise me on t....
  14. Important Things To Be Followed By Everyone!
    (12)
    Well, I am sorry to say this but I've noticed that the quality of the posts is degrading day by
    day and because of that only, I am writing this post and I am trying to bring out certain things
    which each and every member has to keep in mind while starting a new post. I know that all these
    things are mentioned thousand or may be endless times in the forum however still if we've to
    repeat ourselves then I think there is something wrong even if all the moderators try their level
    best to keep the things neat and clean. When you are about to start a new topic. The....
  15. Unable To Change Style In Phpbb Forum
    help me (6)
    I uploaded a new style for my PhpBB forum through FTP. Then I installed the style in the PhpBB
    Admin. Panel. But in the Style Management section I am not able to change the style. I can see both
    the syles listed there, but I cannot change the styles. Please help me.....
  16. Trap17.com Description Of The Services We Get Vs What We Get
    two different things (4)
    Ok, well on http://trap17.com the main page, it says QUOTE :: FREE WEB Hosting Features
    :: 1. Sub-Domain or Domain Hosting 2. Cpanel (latest release updated automatically) 3.
    Fantastico 2 4. 50 - 250 mb space 5. 500 - 20,000 mb Bandwidth 6. Ip Address 7.
    Unlimited Sub-Domains 8. Unlimited Parked-Domains 9. Unlimited Addon-Domains 10. Unlimited
    MySQL Databases 11. Unlimited Email Accounts 12. Unlimited Email Forwarders 13. Unlimited
    Mailing Lists 14. Unlimited Email filters 15. Unlimited Ftp Accounts 16. PERL versi....
  17. Phpbb Forum Installation Problem
    Update Database Error (4)
    Guys i was trying to install a phpbb modded forum, i followed this tutorial i had, and was about to
    install it fully when i got this error message An error occurred trying to update the database
    Table 'phpbb_admin_nav_module' already exists If anyone could tell me how to fix this it
    would be greatly appreciated. EDIT: I talked to a friend about the subject and he said i had to
    enter something after phpbb_ in the prefix for data tables or something, so then it came up with a
    file i had to download and ftp to the forum. So once i did that, i tried the forum ....
  18. Adding Smilies To Phpbb Plus
    (1)
    I have Phpbb plus forums , they have some default smilies..I want to add other smilies packs..Can
    some one tell me , if i can add MSN emoticons in my phpbb plus forums ?? If yes, how i can put ?? If
    possible please give me the link of those emoticons/ smilies packs url ......
  19. Installing Shoutbox,poll And Recent Written Topics In Phpbb
    (1)
    I just installed the FI theme for phpbb..on my forums... I want to install Poll , Recent written
    topics and a shoutbox in my forum's front page....I tried to install some shoutbox script but
    something goes wrong..even i m following the instructions very carefully.Could anyone help me
    regarding to this ??? thanks....
  20. Phpbb Forum Doesnt Ask To Sign-in For Posting
    (4)
    I installed Phpbb forum on trap17 hosting with the help of Fantasico thing.Its very great but the
    problem is that , anyone can post there , i mean even Not registered members can post there and the
    forum doest even tell him/her that you need to sign in before you post , i want to remove this thing
    , i want that they should be a registered member and signed in , in order to post any reply or any
    new topic.I tried to find the option in admin area but i couldnt , can any one tell me how to enable
    that function.Thanks....
  21. Fast Reply Option In Phpbb
    any way to turn it on? (9)
    Well i Got my forums working again however. I was wondering if there is any way to have a fast
    reply option with these pbpbb forums. I know I have seen it in other forums but i think they were
    ipb. Not sure though. Thanks in advance. Zach Topic title and description are VERY important.
    Edited. ....
  22. Help With Phpbb Component Mambo1
    (0)
    I posted this in this thread: http://www.trap17.com/forums/upload-compon...led-t30338.html But
    nobody answers! /mad.gif' border='0' style='vertical-align:middle' alt='mad.gif' /> And
    then I draw it again: I cant login to the phpbb admin panel on my site (The Admin mambo panel
    works). I am a Super Administrator on the site, but not an admin on my phpbb installation (As you
    nŽknow they use the same database). Please Help! /ohmy.gif' border='0'
    style='vertical-align:middle' alt='ohmy.gif' /> ....
  23. How Do I Install Phpbb Forum?
    Please list out... (6)
    Hey, guys. Well recently the website that had previously hosted my phpBB forum went down and I
    decided to look for alternatives for my forum hosting. I realized that both www.Trap17.com had it
    and the host that my friend has. I have searched through the many topics and posts on this forum
    and I still do not entirely understand the installation process of a phpBB forum. Both the
    Trap17.com account and my friend's account have Fantastico, Script Libraries and phpBB Bulletin
    buttons in the CPanel. I have attempted several times to go directly to one of these and tr....
  24. Phpbb File Size
    How much is too much? (4)
    I have a phpbb running under the fantastico in my cpanel. The mySQL file is 5+megs. What size is
    considered typical? Do I have to worry about the size at all? Will the application run any faster
    if the forum is 'pruned'? Backups are performed weekly so I am not concerned about loss of
    data. I was just wondering about how efficient the phpbb code is. Will the forum run as quickly if
    the database is allowed to enlarge to twice the size? Or should I consider the auto-prune as an
    option. Also, is there a way to select which topics get pruned and which ones don'....
  25. Enabling Html At A Phpbb
    Can't get it going ... (7)
    I think I' ve done everything by the book. It was allowed on the forum ACP, it is allowed by
    user, it seems to be allowed on the posting form, the tag list has been added at the ACP, the
    preview accepts it , but the posts show the raw tags as part of the post. Is there anything else I
    need to do? Does the Admin have to allow it? Is it dis-allowed for the trap17 free hosted accounts?
    Your help is appreciated.....
  26. Phpbb Forums
    it wont work... (4)
    /sad.gif' border='0' style='vertical-align:middle' alt='sad.gif' /> I made new forums on phpbb
    and i tried to log into it and it wont work. I cant even do anything on it.....
  27. Phpbb Directorie Problem
    (9)
    Please ensure both the install/ and contrib/ directories are deleted which directorie are they
    in and were r they....
  28. Phpbb Installation Problem In Fantastico
    (5)
    Install phpBB2(2/3) The installation can not be completed: - You cannot install more than one
    script in the root directory of a domain. Click on the browser's Back button to fix reported
    errors. how do i fix this....
  29. Is It Possible To Add Code To Phpbb
    Adding HTML & What Not (3)
    I wanted to know if it is possible to add code to phpbb if so how. By adding code I mean adding html
    so I could add stuff like affialiates and stuff like that. Thanks for your help. I also wanted to
    know if that is allowed before anyone posts an answer, I figured it is if you leave the copyright
    because it is open source.....
  30. Adding Moderators In Phpbb Forum
    (3)
    Ok i currently installed phpBB and i learned how to add a Site admin, but how do i add moderaters?....

    1. Looking for things, phpbb, zip

Searching Video's for things, phpbb, zip
advertisement



A Few Things - phpbb question as well as .zip question



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE