Page 4 of 4 FirstFirst ... 234
Results 31 to 40 of 40

Thread: Need Ideas for New Web Proxy Script

  1. #31
    codename_B's Avatar
    codename_B is offline PHP Coder
    Join Date
    Jan 2011
    Posts
    106
    Thanks
    9
    Thanked 14 Times in 11 Posts
    Don't know if this will help but this is as far as I got looking into the idea of a Curl-less PHP proxy.

    PHP Code:
    <?php
    $refer 
    $_SERVER['HTTP_REFERER'];
    $fullstring2 $_SERVER['QUERY_STRING'];
    $fullstring3 '';
    if(
    $fullstring3==$fullstring2)
    {
    $fullstring 'http://www.google.com';
    }
    else if(
    preg_match('/\?[^.=]*\.[^.]/','?'.$fullstring2))
    {
    $mystring$_SERVER['QUERY_STRING'];
    $fullstring=$fullstring2;
    $fullstring preg_replace('/http:\/\//i','',$fullstring);
    $fullstring "http://$fullstring";
    }
    if (
    $fp fopen($fullstring'r')) {
       
    $content '';
       
    // keep reading until there's nothing left
       
    while ($line fread($fp1024)) {
          
    $content .= $line;
       }
    $site $_SERVER['SERVER_NAME'];
    $curl "(";
    if(
    preg_match('/http:\/\/[^.]*\//i',$fullstring$match)==0)
    {
    preg_match('/http:\/\/[^\/]*/i',$fullstring$match);
    }
    else
    {
    preg_match('/http:\/\/[^\/]*\//i',$fullstring$match);
    }
    $baseurl $match[0];
    $stringurlo 'http://'.$site.'/index.php?';
    $stringurl 'http://'.$site.'/index.php?'.$baseurl.'/';
    //src
    $content preg_replace('/src="http:\/\//i','src="'.$stringurlo,$content);
    $content preg_replace('/src="\.\//i','src="'.$stringurl,$content);
    $content preg_replace('/src="\//i','src="'.$stringurl,$content);
    //href
    $content preg_replace('/href="http:\/\//i','href="'.$stringurlo,$content);
    $content preg_replace('/href="\.\//i','href="'.$stringurl,$content);
    $content preg_replace('/href="\//i','href="'.$stringurl,$content);
    //action
    $content preg_replace('/action="http:\/\//i','action="'.$stringurlo,$content);
    $content preg_replace('/action="\.\//i','action="'.$stringurl,$content);
    $content preg_replace('/action="\//i','action="'.$stringurl,$content);
    //fix forms
    $content preg_replace('/<input/i','<input',$content);
    $content preg_replace('/http%3A%2F%2F/','http%3A%2F%2F'.$site.'%2Findex.php%3Fhttp%3A%2F%2F'$content);
    echo 
    $content;
    }
    ?>
    Obviously there's LOADS that doesn't work, it was just a very basic start to my thoughts but maybe there's something there you guys can draw from. Form redirects were one thing that particularly stumped me.

    To use this one you can name it whatever.php then you access the site like this whatever.php?Google would access google.

    Anywaaaay, I look forward to seeing more developments from you

    B
    http://find-new-proxies.com Auto Approval Proxy List
    http://uf6.info Free Text File Hosting

  2. Thanked by:

    vectro (17 January, 2011)

  3. #32
    Wolfram's Avatar
    Wolfram is offline Unknown Net Builder
    Join Date
    Jan 2011
    Posts
    9
    Thanks
    0
    Thanked 3 Times in 3 Posts
    This seems promising. Can't wait to see the final product. Good luck!

  4. Thanked by:

    vectro (17 January, 2011)

  5. #33
    vectro's Avatar
    vectro is offline I Like Stuff
    Join Date
    Dec 2008
    Location
    U.S.A.
    Posts
    631
    Thanks
    192
    Thanked 104 Times in 82 Posts
    @codename_B

    I'll show that to the programmer and see if he wants to incorporate any of that into his code.

  6. #34
    gordalina is offline Unknown Net Builder
    Join Date
    Jan 2011
    Posts
    1
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by codename_B View Post
    Don't know if this will help but this is as far as I got looking into the idea of a Curl-less PHP proxy.

    PHP Code:
    <?php
    $refer 
    $_SERVER['HTTP_REFERER'];
    $fullstring2 $_SERVER['QUERY_STRING'];
    $fullstring3 '';
    if(
    $fullstring3==$fullstring2)
    {
    $fullstring 'http://www.google.com';
    }
    else if(
    preg_match('/\?[^.=]*\.[^.]/','?'.$fullstring2))
    {
    $mystring$_SERVER['QUERY_STRING'];
    $fullstring=$fullstring2;
    $fullstring preg_replace('/http:\/\//i','',$fullstring);
    $fullstring "http://$fullstring";
    }
    if (
    $fp fopen($fullstring'r')) {
       
    $content '';
       
    // keep reading until there's nothing left
       
    while ($line fread($fp1024)) {
          
    $content .= $line;
       }
    $site $_SERVER['SERVER_NAME'];
    $curl "(";
    if(
    preg_match('/http:\/\/[^.]*\//i',$fullstring$match)==0)
    {
    preg_match('/http:\/\/[^\/]*/i',$fullstring$match);
    }
    else
    {
    preg_match('/http:\/\/[^\/]*\//i',$fullstring$match);
    }
    $baseurl $match[0];
    $stringurlo 'http://'.$site.'/index.php?';
    $stringurl 'http://'.$site.'/index.php?'.$baseurl.'/';
    //src
    $content preg_replace('/src="http:\/\//i','src="'.$stringurlo,$content);
    $content preg_replace('/src="\.\//i','src="'.$stringurl,$content);
    $content preg_replace('/src="\//i','src="'.$stringurl,$content);
    //href
    $content preg_replace('/href="http:\/\//i','href="'.$stringurlo,$content);
    $content preg_replace('/href="\.\//i','href="'.$stringurl,$content);
    $content preg_replace('/href="\//i','href="'.$stringurl,$content);
    //action
    $content preg_replace('/action="http:\/\//i','action="'.$stringurlo,$content);
    $content preg_replace('/action="\.\//i','action="'.$stringurl,$content);
    $content preg_replace('/action="\//i','action="'.$stringurl,$content);
    //fix forms
    $content preg_replace('/<input/i','<input',$content);
    $content preg_replace('/http%3A%2F%2F/','http%3A%2F%2F'.$site.'%2Findex.php%3Fhttp%3A%2F%2F'$content);
    echo 
    $content;
    }
    ?>
    Obviously there's LOADS that doesn't work, it was just a very basic start to my thoughts but maybe there's something there you guys can draw from. Form redirects were one thing that particularly stumped me.

    To use this one you can name it whatever.php then you access the site like this whatever.php?Google would access google.

    Anywaaaay, I look forward to seeing more developments from you

    B
    Hey,

    I don't wan't to undermine your efforts but there is a reason why a proxy isn't built in a day and why it uses CURL.

    CURL is a php extension that has bindings to the real functions within the libcurl which is written in a native language (C in this case). This obviously will yield more performance, both in processing and networking bottlenecks. In case one wants to user a socket'ed based proxy, it would greatly increase the load on the processor and memory usage.

    Another major aspect about CURL is that it knows how to talk HTTP, and for one that wants to write a proxy script without CURL needs to know HTTP, which will increase development time and add an extra layer of complexity that would add processor/memory overhead.

    If you wish to write a proxy client, don't forget about relative URLs, CSS import statements and most of all to serve the POST data to the connection, which cannot be made simple in PHP just becasue you cannot access raw post data from PHP.

    Another issue with modern proxy scripts is javascript, today most of the web uses it and popular websites just abuse it. Having a javascript parser and code to overwrite default javascript procedures on a browser is something not to be taken lightly.

    IMHO, the biggest challenge in developing a proxy script is handling flash. As flash sits on top of a browser (through a plugin), it is something that you cannot modify at all. What can be done is a flash replacement on a case-by-case basis (ex: youtube on glype) where you need a custom flash object to emulate the website's default operative mode.

    Nonetheless, good job and wish you the best of luck!

    Regards,
    Sam
    Primus Proxy Developer

  7. Thanked by:

    vectro (17 January, 2011)

  8. #35
    codename_B's Avatar
    codename_B is offline PHP Coder
    Join Date
    Jan 2011
    Posts
    106
    Thanks
    9
    Thanked 14 Times in 11 Posts
    Thanks for your feedback. It's a dropped project on my part. Some freehosts disable Curl to stop proxies so that's why I chose to ignore it. Not much success on my part obviously :P
    I just shared it incase there was anything there that could be used I look forward to seeing further developments here.
    http://find-new-proxies.com Auto Approval Proxy List
    http://uf6.info Free Text File Hosting

  9. Thanked by:

    vectro (19 January, 2011)

  10. #36
    R4z0r's Avatar
    R4z0r is offline Proxymaster
    Join Date
    Jan 2010
    Location
    Munich
    Posts
    21
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Hi Will please read my PM.

    The official forum of primusproxy will be open soon. Vectro is working on it.
    Also a alpha version of primusproxy will be available in the next few days.

    Stay tuned!
    http://www.stealthproxy.org Buy HTTP and SOCKS Proxy Lists | http://anonymouslist.net Enter your Web Proxies in this top ranked Web Proxy List | http://freesurfproxy.org Free Web Proxy - works fine with YouTube | http://blackhatleaks.com Forum for Blackhat & Whitehat SEO

  11. Thanked by:

    vectro (30 August, 2011)

  12. #37
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts
    Quote Originally Posted by R4z0r View Post
    The official forum of primusproxy will be open soon. Vectro is working on it.
    Also a alpha version of primusproxy will be available in the next few days.
    What's the latest news?
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  13. Thanked by:

    vectro (30 August, 2011)

  14. #38
    vectro's Avatar
    vectro is offline I Like Stuff
    Join Date
    Dec 2008
    Location
    U.S.A.
    Posts
    631
    Thanks
    192
    Thanked 104 Times in 82 Posts
    Quote Originally Posted by Will.Spencer View Post
    What's the latest news?
    The programmer (Gordalina) works full time for a company. He's very talented and his job seems demanding to me. This slowed down the coding process. R4z0r had a meeting with Gordalina's boss and asked if PrimusProxy could actually be an official company project with the company being a partner. They agreed to this, but wish to finish a large project for a big customer before they take this on as a new company project. I've been told that programming should resume in October if everything stays on schedule.

  15. Thanked by:

    WebEvader (30 August, 2011)

  16. #39
    NIX
    NIX is offline Unknown Net Builder
    Join Date
    Feb 2011
    Posts
    7
    Thanks
    0
    Thanked 1 Time in 1 Post
    I think vectro you would be better off with me, if you ever checked NiX Web Proxy: https://myproxylists.com/free-web-proxy/
    I coded all the current features on my own in approx. 2.5 months. Development of proxy will continue next week. I would need a partner who does marketing and advertise of proxy. What comes to coding and features, i can handle almost any feature on my own.

    PS. I will be implementing NiX API: NiX API - Stay protected. Multi-purpose API protection solution for webmasters. features soon to the proxy. It could be as well that NiX API will be after all free of charge. I will think about that.

  17. Thanked by:

    vectro (4 September, 2011)

  18. #40
    vectro's Avatar
    vectro is offline I Like Stuff
    Join Date
    Dec 2008
    Location
    U.S.A.
    Posts
    631
    Thanks
    192
    Thanked 104 Times in 82 Posts
    I've checked out your script. It seems OK to me. I'm not the leader or prime decision maker for PrimusProxy, but I suppose we should all keep our options open. I'll see what the others think.


    Quote Originally Posted by NIX View Post
    I think vectro you would be better off with me, if you ever checked NiX Web Proxy: https://myproxylists.com/free-web-proxy/
    I coded all the current features on my own in approx. 2.5 months. Development of proxy will continue next week. I would need a partner who does marketing and advertise of proxy. What comes to coding and features, i can handle almost any feature on my own.

    PS. I will be implementing NiX API: NiX API - Stay protected. Multi-purpose API protection solution for webmasters. features soon to the proxy. It could be as well that NiX API will be after all free of charge. I will think about that.

Page 4 of 4 FirstFirst ... 234

Similar Threads

  1. Replies: 2
    Last Post: 1 April, 2010, 14:51 PM
  2. Replies: 2
    Last Post: 10 December, 2009, 17:25 PM

Tags for this Thread

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
  •