icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.
Old January 2nd, 2007, 4:08 AM   #1 (permalink)
Surpass Fan
Excelling Contributor
 
Joined in Dec 2005
Lives in my computer
Hosted on pass86'd
660 posts
Gave thanks: 56
Thanked 14 times
got a question..

I am trying to code something where I have the software call out to a remote server and get an answer using functions, actions, and a mysql db, how can I do this, and where can I go for insight on how to do this?

MJ
__________________

panache is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 2nd, 2007, 10:58 AM   #2 (permalink)
minor deity
Super #1
 
Bigjohn's Avatar
 
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,395 posts
Gave thanks: 28
Thanked 94 times
http://www.webmasterworld.com/
__________________
Proud to be a Surmunity Mod!
XEON PASS60 PASS61
Make a fundamental difference!
My Sites:
Curious about Brewing Beer? Join the community!
>>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax
Get into an Art museum
Victorian London
It's your brain -ON WEB - mybrainhost.com (under development)
What SHOULD Government do? Much Less than it Does!
Bigjohn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 2nd, 2007, 4:59 PM   #3 (permalink)
Surpass Fan
Excelling Contributor
 
Joined in Dec 2005
Lives in my computer
Hosted on pass86'd
660 posts
Gave thanks: 56
Thanked 14 times
ok went there and did not find anything useful..

basicly what I want to do is have it so if $array == 'www.bob.com' then echo 1 else 0.

and I am wanting to call this from a database so it searches the database for the domain and if it finds it then display a 1 if not a 0.
__________________

panache is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 2nd, 2007, 11:19 PM   #4 (permalink)
minor deity
Super #1
 
Bigjohn's Avatar
 
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,395 posts
Gave thanks: 28
Thanked 94 times
Hmm.
a better description of what exactly you're trying to do might help.
__________________
Proud to be a Surmunity Mod!
XEON PASS60 PASS61
Make a fundamental difference!
My Sites:
Curious about Brewing Beer? Join the community!
>>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax
Get into an Art museum
Victorian London
It's your brain -ON WEB - mybrainhost.com (under development)
What SHOULD Government do? Much Less than it Does!
Bigjohn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 2nd, 2007, 11:29 PM   #5 (permalink)
Surpass Fan
Excelling Contributor
 
Joined in Dec 2005
Lives in my computer
Hosted on pass86'd
660 posts
Gave thanks: 56
Thanked 14 times
Code:
<?

$domain="www.themaxfiles.info";

if ($action = "www.themaxfiles.info") {

echo "1";

}

else   { echo "0"; }



?>

also I want to be able to use a database to check against the domain in the database..

index.php?domain=www.themaxfiles.info < the domain there is what I Want to check against the database either I am clueless on this or I have no idea how to program..
__________________

panache is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 2nd, 2007, 11:59 PM   #6 (permalink)
Surpass Fan
Excelling Contributor
 
cowboy's Avatar
 
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
937 posts
Gave thanks: 2
Thanked 95 times
Quote:
Originally Posted by panache View Post

also I want to be able to use a database to check against the domain in the database..

index.php?domain=www.themaxfiles.info < the domain there is what I Want to check against the database either I am clueless on this or I have no idea how to program..
You get your variable from the address example above using:

$domain = $_GET['domain'];

Then you can compare $domain from your database query using an if() statement.
__________________
Where would you be if you were at the highest court in the land (US)?
cowboy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 3rd, 2007, 12:03 AM   #7 (permalink)
minor deity
Super #1
 
Bigjohn's Avatar
 
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,395 posts
Gave thanks: 28
Thanked 94 times
Hey cowboy! Have a bubble bath lately?

Panache - Listen to this man. Also, check out php.net for cool examples of php commands and their use.
__________________
Proud to be a Surmunity Mod!
XEON PASS60 PASS61
Make a fundamental difference!
My Sites:
Curious about Brewing Beer? Join the community!
>>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax
Get into an Art museum
Victorian London
It's your brain -ON WEB - mybrainhost.com (under development)
What SHOULD Government do? Much Less than it Does!
Bigjohn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
This user thanks Bigjohn for this great post!
panache (January 4th, 2007)
Old January 3rd, 2007, 12:14 AM   #8 (permalink)
Surpass Fan
Excelling Contributor
 
Joined in Dec 2005
Lives in my computer
Hosted on pass86'd
660 posts
Gave thanks: 56
Thanked 14 times
Code:
<?

$domain = $_GET['domain'];

if ($action = $_GET['domain']) {

echo "1";

}

else   { echo "0"; }



?>

like this?
__________________

panache is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 3rd, 2007, 12:45 AM   #9 (permalink)
Surpass Fan
Excelling Contributor
 
cowboy's Avatar
 
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
937 posts
Gave thanks: 2
Thanked 95 times
Quote:
Originally Posted by panache View Post
Code:
<?
 
$domain = $_GET['domain'];
 
if ($action = $_GET['domain']) {
 
echo "1";
 
}
 
else   { echo "0"; }
 
 
 
?>

like this?
No....

If you want to compare You need at least two things to compare.

Lets assume you have $action defined as the domain to compare (like from your database) and pass the variable in your example, then:
PHP Code:
<?
$action 
'www.themaxfiles.info';
 
$domain $_GET['domain'];
 
if (
$action == $domain) {
    echo 
"1";
} else {
    echo 
"0";
}
?>
__________________
Where would you be if you were at the highest court in the land (US)?
cowboy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
These users thank cowboy for this great post!
GamingHybrid (January 8th, 2007), panache (January 3rd, 2007)
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may 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