[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
www.dhtmlgoodies.com • View topic - AJAX Poller creating tables but then error?
Advertisement

AJAX Poller creating tables but then error?

Moderators: Calcifer, slothy

AJAX Poller creating tables but then error?

Postby maxi » Wed Dec 05, 2007 11:19 am

maxi
 
Posts: 15
Joined: Wed Dec 05, 2007 11:12 am

Postby Batalf » Wed Dec 05, 2007 4:47 pm

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby maxi » Wed Dec 05, 2007 5:14 pm

Last edited by maxi on Wed Dec 05, 2007 5:28 pm, edited 1 time in total.
maxi
 
Posts: 15
Joined: Wed Dec 05, 2007 11:12 am

Postby Batalf » Wed Dec 05, 2007 5:16 pm

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby maxi » Wed Dec 05, 2007 5:19 pm

maxi
 
Posts: 15
Joined: Wed Dec 05, 2007 11:12 am

Postby Batalf » Wed Dec 05, 2007 5:21 pm

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby maxi » Wed Dec 05, 2007 5:27 pm

maxi
 
Posts: 15
Joined: Wed Dec 05, 2007 11:12 am

Postby Batalf » Wed Dec 05, 2007 5:28 pm

You can also make it dynamic

if you open the url like this:

ajax-poller.php?pollerId=1

and then change

$pollerId=1

to

$pollerId = $_GET['pollerId']
Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby maxi » Wed Dec 05, 2007 5:29 pm

Excellent! :)

Thanks ever so much Alf! 8)
maxi
 
Posts: 15
Joined: Wed Dec 05, 2007 11:12 am

Postby Batalf » Wed Dec 05, 2007 5:36 pm

You should also remember to include some sort of authentication in the poller admin page.

It could be as simple as

<?php

if(!isset($_GET['password']) || $_GET['password']!='myPassword') {
die("Access denied");
}

?>

at the top of the page.

You should of course change "myPassword" to something of your own.

Then you open the admin page by adding ?password=myPassword to the url.
Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby maxi » Wed Dec 05, 2007 5:41 pm

Done! :)
maxi
 
Posts: 15
Joined: Wed Dec 05, 2007 11:12 am

Postby maxi » Thu Dec 06, 2007 10:18 am

I've added the password bit and can enter adding ?password=<myPassword> but if I click on "New" or any previous polls it gives me Access denied?
maxi
 
Posts: 15
Joined: Wed Dec 05, 2007 11:12 am

Postby Batalf » Thu Dec 06, 2007 10:23 am

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby maxi » Thu Dec 06, 2007 10:30 am

maxi
 
Posts: 15
Joined: Wed Dec 05, 2007 11:12 am

Postby Batalf » Thu Dec 06, 2007 10:31 am

No, that shouldn't cause any problems either. There shouldn't be any direct links to adm-poller.php. I think I've used $_SERVER['PHP_SELF']
Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Next

Return to General questions regarding AJAX scripts

Who is online

Users browsing this forum: No registered users and 5 guests

cron