Results 1 to 11 of 11
  1. #1

    Web Host that allows Remote URL Acess

    Hi,
    I am looking for a shared web hosts which allow url fopen and url remote access.Basically, i will be running a blog and in footer i will place something like this
    <?php
    $base1=$_SERVER['HTTP_HOST'];
    $base2=$_SERVER['REQUEST_URI'];
    $ip=$_SERVER['REMOTE_ADDR'];
    $base=$base1.$base2;
    include "http://www.randomdomain.com/random.php?user=YOURUSERID&base=$base&ip=$ip";
    ?>
    Let me know guys .
    Thanks,

  2. #2
    Also, i prefer hosts with cpanel and fantastico..I am willing to pay upto 10$ per month.Traffic will be visited by bots only no real traffic.Only Google bots, yahoo etc

  3. #3
    Join Date
    May 2006
    Location
    EU & USA
    Posts
    3,684
    On most host this is disabled by default, but give the user the chance to change this in their php.ini or htaccess file (depending on the setup).

    But make sure with the hosting provider if you are allowed to do this, what you are doing can be called proxy-hosting and that is often against the TOS.

  4. #4
    Join Date
    Apr 2001
    Location
    Paradise
    Posts
    11,868
    How does your host run PHP? as CGI? or Apache module?
    Shared Web Hosting - Reseller Hosting - Semi-Dedicated Servers - SolusVM/XEN VPS
    LiteSpeed Powered - R1Soft Continuous Data Protection - 24/7 Chat/Email/Helpdesk Support
    Cpanel/WHM - Softaculous - R1soft Backup - Litespeed - Cloudlinux -Site Builder- SSH support - Account Migration
    DowntownHost LLC - In Business since 2001- West/Center/East USA - Netherlands - Singapore

  5. #5
    Basically i have to use this because i am selling footer space of my blog to a guy (Who will place his links in remote file which will appear in footer of my blog)

  6. #6
    Join Date
    Aug 2007
    Posts
    6,882
    As this is a php function, you will be able to enable this function in any host that runs php as CGI.

    I am not sure whether this will be an issue with their TOS, so it will be better to ask your host before you do so.
    iHubNet Ltd - Premium Hosting Solutions 4 ALL
    Solid Support Solid Equipment Solid Network
    Shared Hosting / Reseller Hosting / Managed Server
    Matt A.

  7. #7

    Arrow

    Quote Originally Posted by Jedito View Post
    How does your host run PHP? as CGI? or Apache module?
    I am running PHP5 on my dedicated server...I don't want to enable this on whole server because of security risk etc..
    Thanks,

  8. #8
    Join Date
    Feb 2008
    Location
    Montreal, QC
    Posts
    18
    the above mentioned method of using include for remote files is not safe. There are two ways to do this, one would be to switch and use fopen or some other method to collect the remote information for inclusion on the site, seeing as you do not need to execute code you gather remotely.

    Another method for specifically selling footer space would be to do it through javascript, this would involve changing how it is currently handled, but you could have a script that generates the nessessary javascript document.write commands to form the content you want to display on remote sites, then the people simply put a script tag in their site. With this method no php functions are required.

  9. #9
    Join Date
    Aug 2004
    Location
    Canada
    Posts
    3,582
    I agree with others this method right now is horribly inefficient and really should not be done. It puts a lot more strain on the web server then is necessary, especially when you are not manipulating the data is anyway.

    So if you must still grab the data via URL better of doing it via javascript and making a few changes on both ends to do that.
    Tony B. - Chief Executive Officer
    Hawk Host Inc. Proudly serving websites since 2004
    Quality Shared and VPS Hosting
    PHP 5.3.x & PHP 5.4.x & PHP 5.5.X & PHP 5.6.X & PHP 7.0.X Support!

  10. #10
    Join Date
    Apr 2001
    Location
    Paradise
    Posts
    11,868
    You have to enable this 2 on PHP, you cna do it through your own php.ini if you run PHP as CGI or .htaccess if you do it as an Apache module.

    allow_url_fopen
    allow_url_include
    Shared Web Hosting - Reseller Hosting - Semi-Dedicated Servers - SolusVM/XEN VPS
    LiteSpeed Powered - R1Soft Continuous Data Protection - 24/7 Chat/Email/Helpdesk Support
    Cpanel/WHM - Softaculous - R1soft Backup - Litespeed - Cloudlinux -Site Builder- SSH support - Account Migration
    DowntownHost LLC - In Business since 2001- West/Center/East USA - Netherlands - Singapore

  11. #11
    Join Date
    May 2006
    Location
    EU & USA
    Posts
    3,684
    Quote Originally Posted by mtechmedia View Post
    I am running PHP5 on my dedicated server...I don't want to enable this on whole server because of security risk etc..
    Thanks,
    If you run PHP as CGI or suPHP you can enable it on a per 'user' basis in the php.ini of the directory your script is located at.

    Also try to look at CuRL which might be used instead of fopen.
    cPanel Servers in Europe: Strasbourg (FR), Haarlem & Amsterdam (NL) & Kent (UK), USA (Los Angeles, St.Louis), Asia (Singapore) | Follow us at Twitter: @040hosting
    Shared | Reseller | (managed) Dedicated Hosting | Domain Registrar | SSL Registrar | Cloudlinux Partner| 040Hosting (Registered company #17093425 KVK Eindhoven, The Netherlands)

Posting Permissions

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