Jump to content

Search the Community

Showing results for tags 'local'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 2 results

  1. I want to backup mp3 files from a server folder to a local folder can this be done in php which is server side. I tried many scripts claiming to do this but all result in 'failed to open stream: No such file or directory' because the code is looking for the destination on the server, not the local directory. Here is an example that says it can be done. ini_set('display_errors',1); error_reporting(E_ALL); $source = "https://domain.com/2024-2021/path_to_file/test.mp3"; echo "src is ", $source; $destination = "C:/backup/2024-2021/Cpath_to_file/"; file_put_contents($destination, file_get_contents($source)); echo "OK"; This one also claims to 'force' the download $file = '/path/to/files/photo.jpg'; if (is_file($file)) { sendHeaders($file, 'image/jpeg', 'My picture.jpg'); $chunkSize = 1024 * 1024; $handle = fopen($file, 'rb'); while (!feof($handle)) { $buffer = fread($handle, $chunkSize); echo $buffer; ob_flush(); flush(); } fclose($handle); exit; } But has the same problem, in that it fails when opening the local folder to write the file, is there a way to do this?
  2. Hey Guys, I have a situation that has been bugging me for a long time, my website is currently hosted on a virtual machine on my home PC. I have my domain which redirects to a dynamic dns which points port 80 to port 8080 on my router, that port fowards to the virtual machine as it's network adapter allows me to put it on my local network as a PC with it's own IP address. When anyone connects to the website the URL stays the same so they still think they are visiting the same URL and not the redirected one. Let's be honest that is how a website should work. Connecting to the website and everything else is fine, however if you change from the page you see initially, the home page, the URL will not change at all. Any link salso redirect to the original domain and any following directories, yet the URL will stay the same no matter how you connect to the website. If you connect to a different page other than the home page, say /contact.html then no matter where you go on the site the URL stays as /contact.html. I have a feeling this is because I host it at home without DNS on my network pointing to places and I've not figured out a way to do that instead, but I also cannot understand why it wouldn't amend the URL? Can anyone shed some light on this for me? Thanks guys! Emrys.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.