Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Verifying if a source has a script

  1. #1
    Join Date
    Aug 2006
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Verifying if a source has a script

    Is this possible?

    If a script is on a page, then it will show

    echo "Hello World";

    on another website.



    If a script isn't on the page, then it will change another website into
    this:

    echo "You need the script";




    I got some of this already:
    if ($_GET['affcode'] && is_numeric($_GET['affcode']) {
    echo 'Welcome Affiliate!!';
    } else {
    echo 'Welcome Guest';
    }

    but what should i do to replace affcode? A website link? because the php code is on an external site.
    Last edited by cursed; 08-28-2006 at 02:48 AM.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I've got no idea what you're talking about.

    Another website? What website? A script? What sort of script?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Aug 2006
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ok..

    If a website has a script, then it will make another section of a different website to show.

    If a website DIDNT have the script, then nothing wouldshow on the different website.

  4. #4
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    Do you mean like some kind of Affiliate link?

  5. #5
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    Looking at your code closer you just need to do this. Use the code you have. And all links should have ?affcode=2 added to the end. Like So
    Code:
    <a href="http://somepage.com/blah.php?affcode=2">Some page</a>

  6. #6
    Join Date
    Aug 2006
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    yeah basically.

    is it possible for a php script to "verify" if an affilate link is there?
    without someone clicking the link?

  7. #7
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    Ok, you've got #1. That is your page. and #2 that is your affiliates page. You want #1 to check if #2 has an affiliate link. If so when a visitor comes from #2 to #1 via a link it should say Welcome Affiliate. Is that what you want?

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    If a website has a script, then it will make another section of a different website to show.
    Code:
    if(stripos(file_get_contents('http://www.othersite.com/page.html'), '<script') !== false)
      echo('You\'re an affiliate.');
    else
      echo('You\'re a guest.');
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  9. #9
    Join Date
    Aug 2006
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    yeah, except when a visitor comes from 2 to 1 via a link it shouldnt say welcome affiliate. only a special link only affilates should know would say that.

  10. #10
    Join Date
    Aug 2006
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    wow thanks twee..

    except 1 thing.. for <script is that for javascript?
    and would i be able to change that?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •