PHP Dig

This is a discussion on "PHP Dig" within the PHP Forum section. This forum, and the thread "PHP Dig are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Apr 26th, 2007, 16:21
Up'n'Coming Member
Join Date: Apr 2007
Location: Notts, England
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
PHP Dig

Hi All,

I currently have some backtick commands running on my debian server, however when i try and run it on my windows server or my ubuntu server it wont run.
PHP: Select all

        <?php
$output 
= `/usr/bin/host -t ns $query`;

$find [] = "Host $query not found: 3(NXDOMAIN)";
$find [] = "$query name server";
$replace [] = " Domain Not Found - Please make sure you've spelt it correctly";
$replace [] = "";

$output =  str_replace($find$replacestrtolowertrim$output ) ) );

if (
preg_match("^[a-z0-9\:\.\-]+$^""$output $query"))
{
                echo 
"Name Servers:<pre>$output</pre>";
}
elseif (
$domain == ""){
                echo 
"";
}
else {
                echo 
"You have entered an invalid domain name, do not enter 'http://' or 'www.'";
}
?>
Is there an alternative to running this on a windows machine?

Last edited by karinne; Apr 26th, 2007 at 16:30. Reason: Please use [php]...[/php] tags when displaying PHP code!
Reply With Quote

  #2 (permalink)  
Old Apr 26th, 2007, 17:31
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,620
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: PHP Dig

Yep, of course there is, it's a simple script, but the real question is:
1. Why won't it run? Is it using IIS or Apache? Is PHP installed? Do you get an error message?

We're not mind readers!
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
  #3 (permalink)  
Old Apr 26th, 2007, 18:34
Up'n'Coming Member
Join Date: Apr 2007
Location: Notts, England
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Re: PHP Dig

IIS for Windows and Apache for Ubuntu

no errors, it just stops processing anything as soon as it reaches the first command that it needs to run.

PHP is installed and works fine.
Reply With Quote
  #4 (permalink)  
Old Apr 26th, 2007, 22:09
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,620
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: PHP Dig

by "stops processing" do you mean...
A) the PHP code is displayed as text, hence it's not executed...
OR
B) you don't see the PHP code, it's being executed, but itdoesn't output anything...

(I'm sorry I'[m asking so many questions, I'm an ASP programmer but I'm trying to help)
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
  #5 (permalink)  
Old Apr 26th, 2007, 22:20
Up'n'Coming Member
Join Date: Apr 2007
Location: Notts, England
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Re: PHP Dig

no errors, just blank :S

I think the problem is that i am executing:

$output = `/usr/bin/host -t ns $query`;

but as /usr/bin doenst exist on windows servers, it wont run.. but i have no idea where else to point it.. DAMN M$
Reply With Quote
Reply

Tags
backtick, dig, php

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 05:37.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43