28, May 2012

Integrating your application with the webgity forum! - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: Integrating your application with the webgity forum!
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author Topic: Integrating your application with the webgity forum!  (Read 1027 times)
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« on: Jul 29, 2006, 02:06:58 pm »

After a brief chat with Olaf, we decided to create an integration module for the webdigity forum.

First let me explain the purpose of this with a real life example Smiley Olaf has a very cool site that gives php classes downloads, but he wants to give them away only to webdigity members, so he will be able to have more affiliates in the forum.

So I created a simple integration module which allows you to send the email adress and the username of the user and retrieve the number of posts of the user, if the user exists or a non-existance notice.

With this module you can integrate your web applications with our forum, and make the user experience better.

Bellow I will give an example of how to use this, BUT before using it, have in mind that the module restricts access to everyone, except the ip adresses that I put into it. So if you want to use it, you must first send me a pm with the ip or domain of your site, because otherwise it wont work.

Here is the example :

Code:
<?php
$user 
'username';
$mail 'email@adress.com';

$u file_get_contents('http://www.webdigity.com/hw_users.php?user='.urlencode($user).'&mail='.urlencode($mail));
if ( 
is_numeric($u) )
  echo 
'User <b>'.$user.'</b> has <b>'.$u.'</b> posts';
else
  echo 
'User <b>'.$user.'</b> does not exists';

Easy huh? Smiley

Anyway if you have any questions or feedback regarding this module, please do not hesitate to post here.

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Jul 30, 2006, 12:25:26 pm »

Maybe this is a little bit offtopic but it's functionally related to the code above...

if some use code like this
Code:
$u = file_get_contents('http://www.webdigity.com/hw_users.php?user='.urlencode($user).'&mail='.urlencode($mail));

this way must be there some referer informtion send by the server right?

Or is it possible to send a faking referer header?

I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #2 on: Jul 30, 2006, 02:43:09 pm »

No the referer header can be faked.

If you are asking this regarding to the script's security, I only check the ip, because everything else can be  faked

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=3465
Tags : php affiliate domains webdigity Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: Integrating your application with the webgity forum!
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 12:40:50 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.