Adversal and phproxy

Discussion in 'PHP' started by craiger22, Dec 21, 2006.

  1. #1
    I am trying to add adversal popunders to phproxy, proxied pages. I have added the code to url_form.inc in various places but not displaying any popups. I see other proxy sites using adversal. What and I doing wrong?
     
    craiger22, Dec 21, 2006 IP
  2. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #2
    
    php_value auto_append_file ads.txt
    
    Code (markup):
    In .htaccess in same folder as proxy files
     
    krakjoe, Dec 21, 2006 IP
  3. craiger22

    craiger22 Well-Known Member

    Messages:
    1,472
    Likes Received:
    99
    Best Answers:
    0
    Trophy Points:
    170
    #3
    Ok, this does makes the ad apear on the main page, but I only want it on the proxied page.
     
    craiger22, Dec 21, 2006 IP
  4. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #4
    it'll be there too...., you could put some php in the file like a condition to only show the ads when the proxy has get or post vars set, if you pm me a copy of the script I can write it for you, only its been ages and I can't rememeber how it works exactly.
     
    krakjoe, Dec 21, 2006 IP
  5. yugu

    yugu Peon

    Messages:
    98
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    In url_form.inc
    <?php //include('ad/adversal.php'); ?>
    Denenitely should work except those proxied pages, where url_form.inc is not included due to phproxy bug (like having <HTML> besides <html>)
     
    yugu, Dec 21, 2006 IP
  6. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #6
    well i downloaded it and used the htaccess rule and

    
    <?
    if($_SERVER['QUERY_STRING'])
    {
    ?>
    <!-- ADS HERE -->
    <center>ADVERTS</center>
    <?	
    }
    ?>
    
    PHP:
    but, for some real strange reason images stopped coming through the proxy, v strange.....
     
    krakjoe, Dec 21, 2006 IP
  7. Zulu

    Zulu Guest

    Messages:
    83
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #7
    If you add ad code to url_form.inc, the ads will only appear if the user selects the option to include the url form on every page. If the url form is not included even due to any bug, your ads wont appear.

    Not really strange, its obvious. The ads will be appended/prepended to image data too that will corrupt the images making them unrenderable. Mime type needs to be checked so that ads should appear only on html pages.

    Well, for proper functioning, you will need to place the ad code inside the PHProxy.class.php where it includes the url form.

    - Zulu
     
    Zulu, Dec 22, 2006 IP
    saadahmed007 likes this.
  8. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #8
    auto_prepend doesnt touch any data it wouldn't corrupt anything at all, and the images sometimes work and sometimes don't and the reason is php proxy is half finished.....
     
    krakjoe, Dec 22, 2006 IP
  9. Zulu

    Zulu Guest

    Messages:
    83
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #9
    auto_prepend_file does not touch the data but prepends extra data to it (your ads). auto_prepend_file gets executed just like php include. If you place the code of your ad there, it will be outputed to the browser first. Then phproxy will send the headers (which will fail and php warnings will be printed instead) and the file content. If the file is an image then image data sent to the browser will contain ads, headers (actually php warnings) and actual image data, which a browser cant undertand. Images are guaranteed to NOT work with this method. If you see them working sometimes, it may be because of your browser cache. Your ad code will even appear in css files, lol, just bother to view their contents.

    And phproxy is not half finished. However, it is feature limited.

    - Zulu
     
    Zulu, Dec 22, 2006 IP
  10. craiger22

    craiger22 Well-Known Member

    Messages:
    1,472
    Likes Received:
    99
    Best Answers:
    0
    Trophy Points:
    170
    #10
    Thanks for the help guys, I have it working now.
     
    craiger22, Dec 23, 2006 IP
  11. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #11
    Nope, php would fail, that would be a fatal error, no loading at all would go on.
    PHP doesn't parse css files, and so wrong again, also the images do load, so you can't guarantee anything...

    Yes it is, it hasn't been worked on for ages.

    Glad it's working though...
     
    krakjoe, Dec 23, 2006 IP
  12. Zulu

    Zulu Guest

    Messages:
    83
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Its not a fatal error, its a warning saying "Warning: Headers already sent at line xxx...". Processing will go on until php script ends. You can even suppress these warnings by error_reporting(0).

    PHP does not parse css, but proxy script does dude, its written in PHP. All data whether html, javascript, css or images goes through the proxy. And the proxy itself is meant to is there to handle all of them. This is proxy's primary objective. You need to learn more before even making comments.

    Half finished things dont work. It hasnt been worked on for ages and still working because its not half finished, though its feature limited like no easy way to include ads on proxied pages, no js proxification support etc. Its working for ages, what else does it requires to prove itself? I hope that helps. :rolleyes:

    - Zulu
     
    Zulu, Dec 23, 2006 IP
  13. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #13
    Calm doooooown.

    You guys got beef, take it outside

    :D

    Peace,
     
    Barti1987, Dec 23, 2006 IP
  14. login

    login Notable Member

    Messages:
    8,849
    Likes Received:
    349
    Best Answers:
    0
    Trophy Points:
    280
    #14
    Thank you, I used

    <? include("ad.php"); ?>
     
    login, Dec 28, 2006 IP