Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8462393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:09:16+00:00 2026-06-10T14:09:16+00:00

Check this code: <?php $url = ‘http://www.example.com/downloads/count.txt’; $hit_count = @file_get_contents($url); $hit_count++; @file_put_contents($url, $hit_count); header(‘Location:

  • 0

Check this code:

<?php

$url = 'http://www.example.com/downloads/count.txt';

$hit_count = @file_get_contents($url);
$hit_count++;
@file_put_contents($url, $hit_count);

header('Location: wmwc.zip');

?>

@file_get_contents is working fine and the header location change to the downloaded file also works, but either the hit_count increase or @file_put_contents isn’t working, because the number with the file doesnt increase by 1. I’ve set the file permission to 777, but when I try to set the directory permission to 777 also I get a 500 internal server error saying “The server encountered an unexpected condition which prevented it from fulfilling the request.”

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T14:09:18+00:00Added an answer on June 10, 2026 at 2:09 pm

    You can’t write a remote file via http.(If you could do that, every one else could change that file also.)

    You need to use the local path.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

imagine this url: http://www.youtube.com/watch?v=6n8PGnc_cV4&feature=rec-LGOUT-real_rn-2r-13-HM what is the cleanest and best regexp to do the
I was following this tutorial of Sencha Touch: http://www.vimeo.com/15672696 Perfect tutorial, worked flawless. But
I have a PHP code that will check for 'open' in the url: $open=false;
Can any body check this code please.. <?php $hl_1 = $_POST['hl_1']; $bc_1 = $_POST['bc_1'];
I'm using this code: <script type='text/javascript'> $(document).ready(function () { //Check if url hash value
<?php // This is a code to check the username from a mysql database
Check this code : HTML : <div style="position: absolute; visibility: visible; width: 172px;"> <img
Check this code (My Custom Keyboard): -(IBAction) updateTextBackSpace:(id)sender { if([txtview.text length]>0) { NSString *deletedLastCharString
Please check this code out it compiles and runs absolutely fine.. The question is
Hola check this code. var watch = new Stopwatch(); watch.Start(); var request = HttpWebRequest.Create(new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.