Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. The HTTP_REFERER server variable should do the job IN PHP it is $_SERVER['HTTP_REFERER'] Keep in mind that not all web browsers send the referring url. This is optional. It can also be spoofed too. SO be aware of this. Another way is to look in your servers access log you should see log entries to every file that has being requested from your site. However it only lists the IP address and not the referring url, but I think that can be changed in the httpd.conf To be honest there is no defacto way of "tracking" where x file is being hot linked to. What stops people from downloading the file to their site and not hot linking from your site?
  2. You don't have to be online to use Apache. Also the email address is used for nothing. You can use a duf one if you wanted, eg me@localhost Apache only uses the email address to be shown in the servers signature when you view a directory index or when you get a 500 Internal Server Error. The only time you need to to be connected to the internet is if you want access your web server on your computer over the internet. http://localhost/ is not connected through the internet.
  3. Did you configure Apache to send php files to PHP preprocessor? Adding the following three lines to the httpd.conf should do it: LoadModule php5_module "C:/php/php5apache2.dll" PHPIniDir "C:/WINDOWS" AddType application/x-httpd-php .php Note: if you use Apache2.2.x then change php5apache2.dll to php5apache2_2.dll Also change C:/php to the correct path to PHPs folder. save the httpd.conf and restart Apache. Next step is to copy the following files from the php folder: php5ts.dll php.ini-recommended to C:\WINDOWS (or C:\WINNT, depending on which exists). rename php.ini-recommended to just php.ini Restart Apache and test again. This setup works for me everytime.
  4. What happens if you select All from the menu?
  5. I was learning how to use simpletest, just intrested in what it did and that. But that was going back 3 or 4 months ago. I forgotten what I have learnt about it now.
  6. just use mail A simple 1 liner. No need for fully fledge mail script/class
  7. link corrected
  8. As a side note if you to add more file extension that you don't want to people to go to just a pipe character and then the extension, for example you don't want people to see .xyz extension. <FilesMatch "\.(asp|cgi|xyz)$"> That will now block asp, cgi and xyz files from being requested
  9. this what you mean? It uses a framework called SimpleTest
  10. You will have to turn auto_increment off on that column and change the data type for that column to VARCHAR, as you are now dealing with a string and not an integer integers cannot have letters/symbols only numbers. 0 through to 9 If keep it as INT mysql will strip any non numerical character out and only store the numbers.
  11. Look into the <filesmatch> directive. Example: <FilesMatch "\.(asp|cgi)$"> Order allow,deny Deny from all </FilesMatch> If an request is made to an asp or cgi file the server will respond with a 403 Forbidden Error.
  12. What I mean by WAMP was WAMP Server - I sure you have heard of it before. If you have a website then more than likely your webshot has this already setup. Look in the control panel your webshots provides. Look for a section called or similar to logs, site logs etc. So you mean it is not necessary to turn on the "display_error" option, you mean it is 100% possible to develop the codes without turning it on? You can have it off it want by you'll only get a bank page if errors do occur especially if your script gets fatal errors/warnings.
  13. it selects a character from the 39 characters in the $chars variable also % is the modulos operator. it returns the remainder from a division sum.
  14. Its would be better if you used joins for your query. That way you will have 1 query and 1 while loop. Overtime if you continue with that code your will cause stress on on the MySQL server. Look in to SQL Optimization.
  15. use the s pattern modifier instead. preg_match('{(.+?)\-(.+)}s', $s, $match); pattern modifiers go after the ending delimiter for the pattern.
  16. auto_increment only works with integers and not string If you want to use strings then you will have workout the auto_increment value yourself with the processing script that enters the data into the database.
  17. You only install WAMP if you want to develop offline rather than online. WAMP is free it has no spyware/malware or whatever. Ignore the certificate thing. That's IE and SP2 freaking out. All WAMP does is install Apache, PHP and MySQL for you. It does nothing else. It also allows you to easily mange Apache PHP and MySQL via the WAMP taskbar icon (small white semi-circle). Also I don't know why people are offering other packages/OS's when the guy just wants to get up and running as quickly as possible. WAMP will do. XAMPP is too bulky. Offering a LAMP package when the guy hasn't got Linux! WHy use Perl when you got PHP? You don't have to install WAMP if you don't want to. Having WAMP installed allows you to develop and test/debug your site offline. Its saves you the hasle of having to upload/download your php files every time you make changes to them and having to connect to the net to test them. Also I would not recommend using dreamweaver for PHP/MySQL scripting. Use it for HTML/CSS yes, but not PHP. You'd be better of going for a PHP IDE. I use a simple to use IDE called Rapid PHP 2006. There are free IDE's about. A good one is Eclipse with the PHP plugin. For books look into the O'Reily collection. The most important book you will need is the PHP Manual. There is a free online book called hudzilla too, I advise to check it out. Its pretty much the manual but more indepth.
  18. Its phpBB's template engine. Creating a Template engine can be quite hard to do if you are stating out. If you want to do what phpBB does then look into Smarty Smarty is an advance template engine you can integrate into your site. Its does exactly what phpBB template engine does but better.
  19. You cannot put PHP inside PHP. If you have this: <?php $string = '<?php echo "test"; ?>'; echo $string; ?> Then look at Glyde's post. You have to use eval. eval parses PHP code in a string. However if all you want to do is echo the date after a string then do this: echo 'The date to day is: ' . date("D jS F Y"); You use the concatenation (concat for short) operater (.). To tie the string to a function that returns a string.
  20. error_reporting does not override display_errors don't know why people always recommend this. // had my moan On to the reply You should only turn display_errors on if you are in development stages of your script. If you are developing then you shouldn't really be in a live environment, IMO. You should do all development offline. You can install a package called WAMP to develop offline if you wish. This helps streamline development by by-passing uploading/downloading of files when you make changes and having to connect to net to test the changes. Installing wamp bypasses this as it is on your computer not the net. If have finished developing/testing and you are moving to a live environment then display_errors should be turned off and you should turn on a setting called log_errors instead. That way any errors that do occur are not shown (for security reasons) and you can see you errors by opening the log file you have setup. Most hosting companies do this.
  21. This does not require PHP in way shape or form This is purely javascript. Look into the on onfocus and onblur attributes for the input tag. ALso look for similar scripts over at dynamicdrive.com - they are bound to have some form of script.
  22. Urgent requests will not get you anywhere fast. People put their own freee time into this community, they do not get paid so don't expect a radical response. Although our response is usually fast, a reply within the first couple of minutes. However this varies depending on the thread and who's online at the time. Please wait at least 8 - 12 hours before bumping the thread. If you get no replies then more likely no one knows how to answer your question.
  23. If its a custom extensions then I think it would be best to get in contact with the author. Also is that extension built for PHP5.2.1? I just noticed the zip you attached to your post I download and tested to see if I could get to load. I couldn't get it load either. No matter where I put input32.dll (I noticed it was called inpout32.dll by the read me said input32.dll) it failed to load. I look in the file called @Readme-CodeS-SourceS-FR.txt and noticed a web address I went to that size and read the Description for it and found this: The important bit is in red. This extension was compiled for PHP5.0 to PHP5.1.2 and not PHP5.2.x. This is why the extension fails to load. You need to use extension with the same build as the version of PHP you have installed. If you need to use the extension downgrade PHP to PHP5.1.2 however I would see if you can get an up to date build of this extension to be used with PHP5.2.x
  24. Looks like you have a bug in your code for file download. Uploaded a text file that was 7bytes in size downloaded the file got a 326bytes back! Opened the file and got this: I get the same result when I open the icon file into notepad too.
×
×
  • 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.