Jump to content

Chris88

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Chris88's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I have one webhost (A) that supports no PHP and has unlimited bandwidth. I have a second webhost (B) that does support PHP, but has limited bandwidth. The website is on host A and contains a 5mb file that people can download and I'd like to count the downloads. But now I need to use host B to count the downloads. I'm using this small script on host B to count the downloads. <?php $hits=file("count.txt"); $hits[0]++;$fp=fopen("count.txt","w"); fputs($fp,$hits[0]); fclose($fp); header("Location: http://webhost-A.com/files/download.zip"); ?> The download link people see on my website is: http://webhost-B.com/download.php Generally this works fine, but I found out that people can still find the direct link with download managers and then put that direct link on their website, which prevents me from counting those downloads. A solution I found is to use ReadFile. But the problem is that when using ReadFile, host B first downloads the file from host A and then sends it to the user and that's exactly what I don't want. Is it possible to let people download the file directly from host A without showing the direct download link in any way and also count the downloads?
  2. Thank you very much, craygo. One more question. Is it possible to use a search string with the search page, like imdb.com? If you put the following url in the address bar of your browser, then it searches for "matrix" right away when the page loads. http://www.imdb.com/find?q=matrix&l;tt=on;nm=on;mx=20 I'm wondering if I can do this with my search page as well, for example: http://mywebsite/search.php?q=matrix
  3. Hello, the code below is a simple search page that allows me to search on imdb.com and google images in one go, but I have a few small problems with it. 1) The code only works when the "Search" button is clicked, but doesn't work when the "Enter" key is pressed. 2) The searching only seems to work with Internet Explorer, but not with FireFox. With FireFox only the first frame is visible, but not the imdb website. 3) I'd like to have a small gap between the two frames, but it doesn't work no matter where I put <.br> in the code. Is there anybody here who can help me with that? Thank you. [code]<html> <head>     <title> Search Page </title>    </head> <body bgcolor="#003399"> <center> <form action="<?php echo($PHP_SELF); ?>" method="POST">   <font color="#FFFFFF"><strong>Movie Search:</strong></font> <input type="text" name="queryORIGINAL"> <input type="submit" value="Search" name="submit"> </form> <?php $submit = $_POST['submit'];   If ($submit) {    $queryORIGINAL = $_POST['queryORIGINAL'];     str_replace(" ", "+", $queryORIGINAL);   echo "<iframe src=\"http://www.imdb.com/find?q=$queryORIGINAL&l;tt=on;nm=on;mx=20\" width=\"90%\" height=\"90%\">"; } ?> <?php $submit = $_POST['submit'];   If ($submit) {    $queryORIGINAL = $_POST['queryORIGINAL'];     str_replace(" ", "+", $queryORIGINAL);   echo "<iframe src=\"http://images.google.com/images?svnum=100&hl=en&lr=&imgsz=small%7Cmedium%7Clarge%7Cxlarge&safe=off&q=$queryORIGINAL+poster\" width=\"90%\" height=\"90%\">"; } ?> </center> </body> </html>[/code]
×
×
  • 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.