Small quick php job required on proxy script (predecessor of zelune)

Discussion in 'Programming' started by -bank-, May 25, 2007.

  1. #1
    Dear All,

    I have a couple of quick jobs that I need completed for the software that is now the predecessor of zelune. If you know php 5, it should be quite easy to sort, no more than 5 - 10 minutes...

    I need the following:

    Prevention of hotlinking to addresses, as I recieve about 600 to 800 uniques per day, although only about 100 on the main page... (so if hotlinked gets redirected to home page)

    Also, a cookie fix, as login doesn't work properly on myspace, ie login, access one page, then to access another have to login in again (could just be session data)

    If you think you can help PM me do not post here

    Thanks
     
    -bank-, May 25, 2007 IP
  2. micmicmic

    micmicmic Peon

    Messages:
    168
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    For the hotlinking one, use something like this:

     
    micmicmic, May 25, 2007 IP
  3. -bank-

    -bank- Well-Known Member

    Messages:
    674
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    120
    As Seller:
    100% - 0
    As Buyer:
    100% - 2
    #3
    Forgot to add, its all in cURL too.
     
    -bank-, May 29, 2007 IP
  4. micmicmic

    micmicmic Peon

    Messages:
    168
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    So? The above code should still work.
     
    micmicmic, May 29, 2007 IP
  5. -bank-

    -bank- Well-Known Member

    Messages:
    674
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    120
    As Seller:
    100% - 0
    As Buyer:
    100% - 2
    #5
    thanks for that, will try although have played around with something simular, how can I add multiple url's, ie: www.urlbrowse.com and urlbrowse.com

    otherwise, fancy the job of fixing it?
     
    -bank-, May 31, 2007 IP
  6. micmicmic

    micmicmic Peon

    Messages:
    168
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #6
    It will work for both www. and no www. If you want more domains, just stick it in a foreach loop. I thought you were a PHP developer? You should be able to do it easily.

    Or try using this function:

    It will return true if any of $needles is found in the haystack.
     
    micmicmic, May 31, 2007 IP