Forum: PHP Aug 12th, 2009 |
| Replies: 7 Views: 343 I think the safe bet is to say there's always going to be someone who figures out a way around any security setting. Then the question is how often does your hosting company update it's PHP server?... |
Forum: PHP Aug 7th, 2009 |
| Replies: 5 Views: 428 Your absolutely right omniuni, I would use utf-8 instead. $headers.= 'Content-Type: text/html; charset=UTF-8' .' "\r\n"; Since my site is completely in English, it hasn't made a difference (to me). ... |
Forum: PHP Aug 7th, 2009 |
| Replies: 5 Views: 428 You only need the first 2 lines of the headers below, but there's some additional headers in case you wanted to see how to add those as well. Also, make sure to "\r\n" in double quotes, not single... |
Forum: PHP Aug 7th, 2009 |
| Replies: 7 Views: 347 also just to optimize the php code you have, I would switch to a switch statement instead of going through a ton of if statements.
Also, the code you entered didn't parse correctly, did it? I... |
Forum: PHP Aug 7th, 2009 |
| Replies: 7 Views: 347 try adding readfile at the end
.....
header('Content-Disposition: attachment; filename="'.$name.'.'.$ext.'"');
readfile($file);
?> |
Forum: PHP Jul 20th, 2009 |
| Replies: 9 Views: 356 This sounds like a homework problem to me, maybe you should to a little more studying. Why else would you include the "answer." |
Forum: PHP Jul 11th, 2009 |
| Replies: 32 Views: 1,517 Oops, the
$grade = 5;
is supposed to
$grade = $grade + 5; |
Forum: PHP Jul 11th, 2009 |
| Replies: 32 Views: 1,517 It looks like you're calculating them to have full credit if they haven't taken the exam, if that's the case...
if ($_POST['Quiz1'] >= 0 && $_POST['Quiz1'] <= 100)
$grade = $grade +... |
Forum: PHP Jul 11th, 2009 |
| Replies: 32 Views: 1,517 Something simple and straightfowrd...
$grade = 0;
if ($_POST['QUIZ1'] >= 0 && $_POST['QUIZ1'] <= 100)
$grade = $grade + $_POST['QUIZ1'] * 0.05;
if ($_POST['Mid-Term'] >= 0 &&... |
Forum: PHP Jul 10th, 2009 |
| Replies: 5 Views: 518 You would need a SELECT statement in SQL to do this, the same way you inserted all of your friends to the database just ...SELECT id,firstName,lastName FROM Profiles WHERE isVisible='1'of course you... |
Forum: PHP Mar 6th, 2007 |
| Replies: 2 Views: 2,741 you can use commands such as fopen to open files on the internet$handle = fopen("http://www.example.com/", "r");then if you need more data use regular expressions to parse through whatever data you... |
Forum: PHP Jan 13th, 2007 |
| Replies: 5 Views: 5,153 why not just use exec( 'php /home/username/routine_task.php > /home/username/routine_task.log &' );
using php allows you the ability to keep the code away from website so the code is not public... |
Forum: PHP Jan 11th, 2007 |
| Replies: 5 Views: 5,153 a cron job would be the ideal case, check with your host to see if they allow them. |
Forum: PHP Jan 8th, 2007 |
| Replies: 11 Views: 3,705 actually i believe the max execution time of a script wouldn't matter in this case, because uploading a file as far as php cares is not part of the script execution time. |
Forum: PHP Dec 29th, 2006 |
| Replies: 4 Views: 11,310 that looks good, except that only letters, numbers, and hypens are allowed in a domain name (underscores are not allowed), and due to ICANN limitation domain names are limited to 64 characters. This... |
Forum: PHP Dec 27th, 2006 |
| Replies: 11 Views: 3,705 to see your PHP upload size limit, make a file called phpinfo.php
and inside of it, place the following php code:
<? phpinfo() ?>then access that page from your browser and press Ctrl+F to... |
Forum: PHP Dec 20th, 2006 |
| Replies: 8 Views: 5,224 if you have a youtube script, just copy and paste the code as they gave it to you from there website, you do not need to do anything else to it to get it running. Paste it as HTML and not PHP |
Forum: PHP Dec 18th, 2006 |
| Replies: 4 Views: 5,555 well if you are always going to be using the same html code for a given page, then what you could do is, put it in a different page and then just include it wherever needed, for example...
<?
//a... |
Forum: PHP Dec 11th, 2006 |
| Replies: 2 Views: 1,198 it should see them just like Puckdropper said, unless they are specifically blocked by a robots.txt (http://en.wikipedia.org/wiki/Robots.txt) file, or you have a nofollow... |
Forum: PHP Nov 30th, 2006 |
| Replies: 1 Views: 1,353 can you please post the code so we can see what is wrong, but it sounds like you are using an index in an array that you have not previously defined, but we would need to look at the code to confirm... |
Forum: PHP Nov 30th, 2006 |
| Replies: 5 Views: 4,216 what you could do to fix the problem is put this in the meta tag of the html:
<meta http-equiv="Refresh" content="4;url=http://www.domain.com/link.html">
you would need to replace the url with... |
Forum: PHP Nov 30th, 2006 |
| Replies: 5 Views: 4,216 if you are going to use a header tag YOU CANNOT output any text/html to the user, which means you need to get rid of all the echo.
when you see this error: Warning: Cannot modify header... |
Forum: PHP Nov 17th, 2006 |
| Replies: 1 Views: 1,283 I am kind of confused if you meant without logging into the database server, or checking for the existence of a certain database within that db server.
you cannot check/search anything contained... |
Forum: PHP Nov 2nd, 2006 |
| Replies: 4 Views: 4,694 you need to set up a cron job (or crontab), make sure your webserver allows you to run a cron job, if so look in your control panel for how to set it up, if it's not in there then log in via SSH and... |
Forum: PHP Aug 7th, 2006 |
| Replies: 10 Views: 3,023 yes this is very possible with PHP, ASP, JSP
the only thing here is that not all web hosting companies will let you "access" files from another host (this is in case someone manages to hack your... |
Forum: PHP Jun 1st, 2006 |
| Replies: 4 Views: 2,086 I doubt it, what it probably is, is that they use the same advertising companies (ie: advertising.com, etc...) and they advertiser sets the cookie but who knows |
Forum: PHP May 25th, 2006 |
| Replies: 4 Views: 2,086 i agree, I have some cookies on my computer that are set to expire on Tuesday, June 02, 2037 1:02:03 PM
that one in particular was set by yahoo, I have another one by google that is set to expire... |
Forum: PHP May 11th, 2006 |
| Replies: 3 Views: 1,472 your going to have to explain your extension in a lot more detail before we can really get anything going here |
Forum: PHP May 4th, 2006 |
| Replies: 11 Views: 18,539 if you know the service provider you can just email it to there cell number, since that is how most sms messages are sent.
for instance if your cell number was 800-555-1212 and your company is... |
Forum: PHP May 4th, 2006 |
| Replies: 3 Views: 3,471 another option is to use a meta-redirect tag, it's not really php but it does the job.
<meta http-equiv="Refresh" content="4;url=http://www.domain.com/link.html">
that code will wait 4 seconds... |
Forum: PHP Apr 18th, 2006 |
| Replies: 4 Views: 1,356 what part do you need to know? how to upload the file, parse the file to only those who are logged in? |
Forum: PHP Apr 18th, 2006 |
| Replies: 3 Views: 1,128 how are you keeping track of the statistics?
MySQL? (on a different host? maybe to complicated a query?)
or are you physically accessing a file and updating it (does it belong to apache, you?... |
Forum: PHP Apr 18th, 2006 |
| Replies: 7 Views: 9,453 another option, using the meta tag:
replace
<meta http-equiv=refresh content=\"0;URL=\"....
with (assuming the page you want to reload is index.php)
if (!isset($_GET['reload'])) {
echo... |
Forum: PHP Apr 18th, 2006 |
| Replies: 7 Views: 9,453 if you just want to make sure it automatically loads the newest copy of the page, eg do a auto-refresh you don't need to use a meta tag, try using a header function instead...
... |
Forum: PHP Apr 14th, 2006 |
| Replies: 7 Views: 1,542 try doing this:
$headers = "From: www.puddinpatchdatematch.com Webmaster <admin@mydomain.com>\n
X-Mailer: PHP/" . phpversion();
if (mail($email_address, $subject, $message,$headers)) {
echo... |
Forum: PHP Mar 31st, 2006 |
| Replies: 3 Views: 1,474 well just looking at the third line $str = <<<EOD I can see it right there, Don't even get me started on all the other lines that are missing quotes |
Forum: PHP Mar 24th, 2006 |
| Replies: 3 Views: 2,276 you could always use phpnuke, not nearly as clean, but I'm sure you could just download a new theme/skin and change it
http://phpnuke.org/ |
Forum: PHP Mar 14th, 2006 |
| Replies: 27 Views: 6,678 yes they will, but realisticly speaking it will do them no good, exe files are generally compiled for windows, not linux users (unless they use wine).
You would have to take that program and... |
Forum: PHP Mar 12th, 2006 |
| Replies: 4 Views: 1,456 tomcat is typically used with Java Servlets not PHP, besides opening the file in a browser how else are you supposed to test it?
I don't know, you'll have to explain your situation a little more
... |
Forum: PHP Mar 12th, 2006 |
| Replies: 2 Views: 1,542 it's possible to do this in HTML, no need to do this in html, when you make the link simple add a target="_blank" in the anchor text
here is an example:
open link in a <a... |