Search Results

Showing results 1 to 40 of 126
Search took 0.01 seconds.
Search: Posts Made By: Gary King ; Forum: PHP and child forums
Forum: PHP Feb 9th, 2007
Replies: 3
Views: 2,901
Posted By Gary King
Use www.php.net/preg_match to match the particular contents that you want from the page.
Forum: PHP Feb 7th, 2007
Replies: 3
Views: 2,901
Posted By Gary King
There isn't much that you need besides www.php.net/file and www.php.net/file_get_contents

Those should get you started.
Forum: PHP Feb 7th, 2007
Replies: 3
Views: 3,553
Posted By Gary King
<?php

if ($_GET['dlurl'])
{
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="downloaded.pdf"');
readfile('original.pdf');
}

?> as an example.
Forum: PHP Feb 7th, 2007
Replies: 1
Views: 944
Posted By Gary King
Which version of PHP do you have? I would have thought MediaWiki supports all the way to PHP 4.
Forum: PHP Jan 5th, 2007
Replies: 2
Views: 2,878
Posted By Gary King
So $message = "The following was submitted:\n\n";
foreach($fields as $f => $v)
{
if ($v)
$message .= sprintf("%20s: %s\n",$v,$_REQUEST[$f]);
}?
Forum: PHP Jul 23rd, 2006
Replies: 2
Views: 9,595
Posted By Gary King
Use <input type="checkbox" name="checkbox[]" value="your value" />
Keep using that for your checkboxes, but just change value="". It will put all your checkbox values into the $_REQUEST[checkbox][]...
Forum: PHP Dec 9th, 2005
Replies: 4
Views: 1,655
Posted By Gary King
Yeah, a Java applet is better, or a Flash file, than PHP for video chat.
Forum: PHP Dec 9th, 2005
Replies: 3
Views: 1,520
Posted By Gary King
I'm sure you can, although I don't know the specifics.
Forum: PHP Nov 13th, 2005
Replies: 2
Solved: Php With Time
Views: 1,913
Posted By Gary King
You don't have to get really advanced to get the time :) There is already a built-in function for that that can do all of that in one line.


if (date('A') == 'AM')
{
// it is AM
}
else
{
...
Forum: PHP Nov 13th, 2005
Replies: 2
Views: 3,222
Posted By Gary King
http://ca3.php.net/manual/en/function.asort.php
Forum: PHP Nov 6th, 2005
Replies: 15
Views: 4,978
Posted By Gary King
Just download WAMP for Windows or LAMP for Linux. I'm unsure if those complete packages still exist, but give it a try. It downloads the entire set for you and you can install it as a bundle... I...
Forum: PHP Nov 6th, 2005
Replies: 2
Views: 1,834
Posted By Gary King
You'll need to explain your problem more clearly. I have a hard time understanding what you are trying to accomplish.
Forum: PHP Sep 15th, 2005
Replies: 29
Views: 64,323
Posted By Gary King
I use this to make executable files from PHP files. I mean, you run the code in something such as DOS, but at least it works. I use it when I don't have a PHP server in hand.
Forum: PHP Sep 15th, 2005
Replies: 3
Views: 12,739
Posted By Gary King
You can try changing the MIME type, which I believe you can do in PHP. Something like: header("Content-Type: {$mime}");

Info: http://ca3.php.net/manual/en/function.header.php

Only works if...
Forum: PHP Jul 21st, 2005
Replies: 3
Views: 1,658
Posted By Gary King
I doubt the errors are random. It is caused by something, usually human error, 99.9% of the time ;)

I'm not too sure with your code, but be assured that the error is trying to make as much sense...
Forum: PHP Jul 8th, 2005
Replies: 4
Views: 3,503
Posted By Gary King
If you run a site monitor script on your website to monitor the website, then when the website is down, you won't know, and neither will the script - since the script goes down when the website does!...
Forum: PHP Jul 1st, 2005
Replies: 4
Views: 1,400
Posted By Gary King
Asking at www.vbulletin.org is your best shot.

But some psuedo code:// connect to forum database first (use mysql_connect(), mysql_select_db())

// Then simply do something like:

$members =...
Forum: PHP Jul 1st, 2005
Replies: 2
Views: 3,696
Posted By Gary King
If you need to use preg_match() then use it. If strpos() can do the job, then use that. Does that answer your question? Your question wasn't really clear in your post.
Forum: PHP Jul 1st, 2005
Replies: 4
Views: 3,503
Posted By Gary King
There are some services to check and email you if your website goes down. A partial list: http://www.webhostingtalk.com/showthread.php?s=&threadid=400382

Also, your PHP code looks right. Have you...
Forum: PHP May 6th, 2005
Replies: 16
Views: 14,245
Posted By Gary King
Can I see it online?
Forum: PHP May 6th, 2005
Replies: 16
Views: 14,245
Posted By Gary King
I mean, do you have a URL to the website that has the script?
Forum: PHP May 6th, 2005
Replies: 16
Views: 14,245
Posted By Gary King
Do you have a link to the live script?
Forum: PHP May 6th, 2005
Replies: 16
Views: 14,245
Posted By Gary King
Well for $currentdir = '../mp3'; it used to be $currentdir = '../mp3;
Forum: PHP May 6th, 2005
Replies: 5
Views: 2,485
Posted By Gary King
So how about using 'elseif'?

Such as :

if ($choice=="staff publications"){

$query="SELECT * FROM staffpub WHERE match (authors, title, source, keywords, mesh, year, notes) against ('$name'...
Forum: PHP May 6th, 2005
Replies: 16
Views: 14,245
Posted By Gary King
Is this 'Open/Save' dialog box that you are talking about a part of your actual script or is it the download manager associated with the browser?
Forum: PHP May 6th, 2005
Replies: 16
Views: 14,245
Posted By Gary King
Your code was missing some quotations as well, so I took the liberty to add them in. You probably just didn't copy and paste the text, right? :)
Forum: PHP May 6th, 2005
Replies: 5
Views: 2,485
Posted By Gary King
Your code was missing some quotations as well, so I took the liberty to add them in. You probably just didn't copy and paste the text, right? :)
Forum: PHP May 6th, 2005
Replies: 16
Views: 14,245
Posted By Gary King
Please use [php] tags next time. I have formatted your post.
Forum: PHP May 6th, 2005
Replies: 5
Views: 2,485
Posted By Gary King
Please use [php] tags next time. I have formatted your post.
Forum: PHP Apr 11th, 2005
Replies: 3
Views: 5,589
Posted By Gary King
Field type should be something like TEXT.

If you want timestamp, then you need a UNIX timestamp. So do something like $query = "INSERT INTO users VALUES ('','$user',time())";
Forum: PHP Apr 10th, 2005
Replies: 5
Views: 5,344
Posted By Gary King
Forum: PHP Apr 10th, 2005
Replies: 1
Views: 4,787
Posted By Gary King
Why not use a MySQL database? Easier to manage.

But if not, then you can do something like create a directory that contains all the messages, giving each filename an ID, like 1.txt, 2.txt, or...
Forum: PHP Apr 10th, 2005
Replies: 2
Views: 2,577
Posted By Gary King
Create an .htaccess file in the directory you want to affect (and all subdirectories in it.)

The contents of .htaccess will be:


php_value session.save_handler files

Done.
Forum: PHP Apr 10th, 2005
Replies: 3
Views: 5,589
Posted By Gary King
$today becomes an array, so it itself has no value

What I suggest is to turn $today from an array to a string by doing this:

$today = serialize($today); // turns into a string

Then insert...
Forum: PHP Apr 10th, 2005
Replies: 5
Views: 5,344
Posted By Gary King
Make sure you can send out emails from your server.

Go here:

AdminCP -> Import & Maintenance -> Diagnostics -> Email

The rest is self-explanatory.
Forum: PHP Apr 5th, 2005
Replies: 6
Views: 13,387
Posted By Gary King
I think you need the right file system permissions.
Forum: PHP Apr 5th, 2005
Replies: 2
Views: 2,087
Posted By Gary King
If you want to take the easy course, learn PHP. First of all, it is open source, and it is much more widely used than ASP, so you will be able to easily find help if needed. There are also a ton of...
Forum: PHP Mar 31st, 2005
Replies: 8
Views: 3,498
Posted By Gary King
Yes, www.phpBB.com is free.
Download it here: http://prdownloads.sourceforge.net/phpbb/phpBB-2.0.13.zip?download (choose a mirror that is closest to you)

Unless there is an available converter...
Forum: PHP Mar 27th, 2005
Replies: 7
Views: 73,905
Posted By Gary King
Next time? DON'T POST THE SAME THREAD IN MULTIPLE FORUMS

Thanks!
Forum: PHP Mar 27th, 2005
Replies: 4
Views: 2,262
Posted By Gary King
This seems to be what you want: http://www.vbulletin.org/forum/showthread.php?t=38139&highlight=%2Aquote%2A it's for vB2 you could try asking them to upgrade it for you to vB3
Showing results 1 to 40 of 126

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC