Zubrag.com
July 22, 2018, 12:25:50 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Another post regarding cPanel FTP Account Creator 1.0  (Read 10003 times)
jbird123
Newbie
*
Posts: 12


« on: October 26, 2010, 05:53:34 PM »

Hi,

Still have the previous issue but thought I would start a new thread for this as it is seperate. I would like to know if its possible to add the FTP user then redirect to another page. Once the FTP accounts was created I want users to be taken to my own 'success' page instead of the cpanel success page because the images wont load on that page, and I cannot edit it in any way

Cheers!

JackLloyd.

Logged
zubrag
Administrator
Hero Member
*****
Posts: 787


WWW
« Reply #1 on: October 27, 2010, 07:27:31 AM »

I think following will work

instead of
echo $result;

add this
header('Location: http://www.mysite.com/my-succes-page.html');
Logged
jbird123
Newbie
*
Posts: 12


« Reply #2 on: October 29, 2010, 11:30:10 AM »

Hi, thanks for your help that worked just as required.

The only problem is now, on its own, cpanel-add-ftp.php loads and works fine, but when I use <?php include "cpanel-add-ftp.php" ?> anything after that is not loaded.

For example I have index.php which is the templte file, this uses php include to load header.php main.php (i.e. cpanel-add-ftp.php), side.php and footer.php. Normally everything loads fine, but if i include cpanel-add-ftp.php it only loads header and cpanel-load-ftp.php.. it fails to load anything after cpanel-add-ftp.php. I cannot find wht part of cpnel-add-ftp.php that is stopping it from loading the rest of the page?
Logged
zubrag
Administrator
Hero Member
*****
Posts: 787


WWW
« Reply #3 on: November 01, 2010, 03:39:52 AM »

i could look into this if you send me current cpanel-add-ftp.php to zubr-ag@gmail.com  (remove dash)
Logged
jbird123
Newbie
*
Posts: 12


« Reply #4 on: November 01, 2010, 04:28:52 PM »

Hi,

Thanks for your help. I have decided to take another route now so the above problem should matter. I have one more question though.. how can I pass $fuser to the success page? I tried
Code:
header('Location: http://www.mydomain.com/success.php?user=$fuser');
but this passes the string $fuser to success.php instead of the variable. I presume this has to do with
Code:
EOD;
die($frm);
or something.

Thanks very much

JackLloyd.
Logged
jbird123
Newbie
*
Posts: 12


« Reply #5 on: November 01, 2010, 06:27:23 PM »

Sorry, unable to edit..

Didn't think it would work but a lot of things in scripting are trial and error so tried the following change -

header('Location: http://www.mydomain.com/success.php?user=$fuser');
to
header("Location: http://www.mydomain.com/success.php?user=$fuser");

(double quotations instead of single i.e. " instead of ' around location) Did the trick Cheesy

Thank you very much for this script. Without it my whole model wouldn't work. Still a lot of implamentation to go but I think I have modified it enough to do what I need.

If I make any money from this project I'm working on donations will be made I promise Smiley

EDIT: Already added username character validation and password verification. Just need to add some sort of validation check to make sure no duplicate usernames are submitted. Will post modifications and brief documentation when everything is done, with a link to my site if thats allowed. Never know who it might help some day in the future.
Logged
jbird123
Newbie
*
Posts: 12


« Reply #6 on: November 03, 2010, 07:14:06 PM »

I have the page ?page=cpanel-add-ftp&fquota=1000
which prompts user for input, and I ammended the bottom line to read
header("Location: ?page=complete&user=$fuser&quota=$fquota");

I am getting the following error:

Warning: Cannot modify header information - headers already sent by (output started at /home/domain/public_html/index.php:18) in /home/domain/public_html/cpanel-add-ftp.php on line 87

If I run the script from /cpanel-add-ftp.php?fquota=1000 that works fine, but when I use the above URL then it fails. Any idea why?
Logged
compusolver
Newbie
*
Posts: 1


« Reply #7 on: December 01, 2010, 10:27:34 AM »

(reply to above post)

Try adding this to the very first line of your php script -

  ob_start();

This must be the first thing (other than a space or linefeed) after <?php
Logged
jbird123
Newbie
*
Posts: 12


« Reply #8 on: December 10, 2010, 05:50:40 AM »

Will try that thanks. Script is kind of useless to me though until I can think of a way of restricting two people creating FTP accounts with the same name (creating an SQL database seems a bit over kill for that as I've never created one before, just modified)
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC