Jump to content

Darklink

Members
  • Posts

    126
  • Joined

  • Last visited

    Never

Everything posted by Darklink

  1. ProjectFear's code should work fine. There's no need for any more code samshel.
  2. No I mean in PHP. ftp_site() is a PHP function. I've seen no support for changing permissions for Windows files and directories in PHP.
  3. I know Windows does not support CHMOD. I've looked around to find out if there is an ftp_site command or something that can still edit the permissions for a Windows file and/or directory. Does anyone know of any commands or methods that can change the permission attributes?
  4. You do not have the cURL extension installed. Although you should have the extension in your PHP package. Go into your PHP ini file and locate the following: ;extension=php_curl.dll and replace with: extension=php_curl.dll Then restart your http server. Test it then and see what happens. You are unable to do this if you do not own your own server however.
  5. Okay, that's given me a more clearer view. I see that the VirtualHost containers are put into the httpd.conf file. Can any of the information in this file be altered and overwritten using .htaccess. If that's the case, I think I know what I can do from here on in. I can just add more VirtualHost containers in the .htaccess automatically using PHP (remembering to set permissions safely and putting extra security measures in obviously). I don't think there would be anything else. I would have to make sure that .htaccess overwrites any configuration settings which I think you can set somewhere. Please correct me if I'm wrong, although I believe I will speak to you soon on MSN. Thanks for your help.
  6. I thought you would notice when it's being restarted. I take it the virtualization in web hosting sorts the restarting between different users?
  7. Restart the server!? How come cPanel is able to acomplish this without having to restart the server (or am I deeply mistakened)? I just want to put addon domains for different users automatically via PHP as they submit them and change their nameservers. I'm guessing I would have to create a desktop application and then use exec() to call it to do the job? I'm not looking for any quick tricks in PHP to do this as I know it will mean work and I am willing to spend time into researching and doing this properly along with the rest of the project I am doing.
  8. Does anyone know of any exec() commands or other methods that allows PHP to create and/or manage domains on the http server, mainly Apache? If there isn't, then I will have to create an application via C# or something that will do the job and use exec() from there.
  9. Although it's not a web format, I would like to learn more in C# so I selected C or C++ even though it's not the same. I will continue to program in PHP as it's my primary language.
  10. You will need a web host. They will host Apache, PHP and MySQL for you (if you get a decent enough host). Apache is just a web service. It will be allow you to run the likes of PHP and MySQL software.
  11. Yeah, you will lose out on a lot of things building an Ajax-based website. It should be used as a small tool instead. You could however make it so that the site can run using Ajax (if javascript is enabled) and as a normal site (if disabled). Or give the option for the user!?
  12. They are invisible to the user unless they view the source. I know that.
  13. Well thats nice for you. But remember, not everyone is as clever or have the patience to actually read the code and find out what it does themselves. If you see any decent script out there, it will be covered with comments like those. Scripts without, I find are very messy and have a very unfortunate programmer on it's head. Seriously, try to read the code: if($show) { echo $string } (if show, echo string) How can any programmer not understand what that does? It's completely redundant. It's just an example. Of course there will be more to it. I don't comment every silly little line that. I thought that message would get across quite easily!!! Maybe I should make myself a little more clear in the future?
  14. Well that's all fantastic for the user. What will they achieve exactly? You could only use such thing for statistics or changing HTML output anyway. If they spoof it, all they are going to get is an problem themselves.
  15. What is the code in the function goBack(). The code you provided us doesn't show us much at all.
  16. Well sites I make normally require a user to have JavaScript enabled (otherwise they are outdated and annoying). I would advise using the meta redirection.
  17. You haven't made any of the changes I have told you throughout this entire thread.
  18. Glad I could help. Personally I hardly ever use header() to relocate but I suppose it has it's purposes in some areas. For redirection I use javascript with a nice redirection page. It can let the user know where they are going too.
  19. JavaScript is great. There is a lot you can do with it if you understand how to use it.
  20. Yeah I noticed that whilst writing it. I have my own framework for MySQL functions. So I hardly ever look at the functions themselves anymore. The only time I do is when I update it.
  21. Try doing: $query = mysql_query("SELECT SUM(price) as total FROM products") or die (mysql_error()); $result = mysql_fetch_assoc($query); echo "Total product value: " . $result['total']; Bare in mind, I actually don't know if this will work. I'm not used to using the mysql functions straight, but it looks right.
  22. You never added in an onreadystatechange value, which is what calls the handler function after PHP sends the data back. I've cleaned up your code a little bit to help myself (tabs are your best friend). I've also uncommented the alert() function. See what happens and what you get from this code. function createRequestObject() { var request_o; //declare the variable to hold the object. var browser = navigator.appName; //find the browser name if(browser == "Microsoft Internet Explorer") { /* Create the object using MSIE's method */ request_o = new ActiveXObject("Microsoft.XMLHTTP"); } else { /* Create the object using other browser's method */ request_o = new XMLHttpRequest(); } return request_o; //return the object } /* Function called to handle the list that was returned from the internal_request.php file.. */ function handleThoughts() { /* Make sure that the transaction has finished. The XMLHttpRequest object has a property called readyState with several states: 0: Uninitialized 1: Loading 2: Loaded 3: Interactive 4: Finished */ try { //Finished loading the response if(http.readyState == 4) { /* We have got the response from the server-side script, let's see just what it was. using the responseText property of the XMLHttpRequest object. */ var response = http.responseText; alert(response); if ( response!="ok" ) { alert('Please select another username!'); } } } catch(Exception) { } } function update_database(el) { var height; var width; var top; var left; var Div_name; var Border; var Position; var Background; var Cursor; height = el.style.height; if(height == '') { height = '100px'; } width = el.style.width; if(width == '') { width = '100px'; } top = el.style.top; if(top == '') { top = '0px'; } left = el.style.left; if(left == '') { left = '0px'; } Div_name = el.id; Border = el.style.border; Position = el.style.position; Background = el.style.background-color; Cursor = el.style.cursor; var http = createRequestObject(); http.open('get', 'update.php?height=' + height + '&width='+width + '&top='+top + '&left='+left + '&Div_name='+Div_name + '&Border='+Border + '&Position='+Position + '&Background='+Background + '&Cursor='+Cursor, false); http.onreadystatechange = handleThoughts; http.send(null); }
  23. Hmm. Try using another method of redirection? Header may not be the best choice because the script before it may include some output values (cookies, etc). Try to make a template or page which redirects using a meta redirection or javascript.
  24. Let's see your full code for your Ajax calls and returns.
  25. Use INT or DOUBLE.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.