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

  • SEARCH
  • Home
  • 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 8313593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:32:22+00:00 2026-06-08T20:32:22+00:00

the following script uses the kat.ph upload api to upload torrents; however i am

  • 0

the following script uses the kat.ph upload api to upload torrents; however i am getting an file not found error when using echo to figure out what was wrong, why is the file not being uploaded as I can see the file in my directory

<?php
$dhandle = opendir('.');
error_reporting(E_ALL);
$length = ob_get_length(); 
$katphdata ['desc'] = 'torrentdescription';
$katphdata ['name'] = 'testingscript';
$katphdata ['category_name'] = '38';
$katphdata ['torrentFile'] = 'name.torrent';
$katphdata ['userhash'] = 'hash';
foreach ( $katphdata as $key => $value) {
    $post_items[] = $key . '=' . $value;
}
$post_string = implode ('&', $post_items);
$curl_connection = curl_init('http://kat.ph/torrents/upload/');
curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt ($curl_connection, CURLOPT_HTTPHEADER, array("Content-Type: application/x-bittorrent", "Content-Length: $length"));
curl_setopt($curl_connection, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_items);

curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl_connection,CURLOPT_ENCODING,"gzip");
curl_setopt($curl_connection, CURLOPT_POST, true);
$result = curl_exec($curl_connection);
return $result;
var_dump($result);
//show information regarding the request
print_r(curl_getinfo($curl_connection));
echo curl_errno($curl_connection) . '-' .
                curl_error($curl_connection);
//close the connection
curl_close($curl_connection);





?>

this is their form for the torrent upload

    <input type="file" class="primary inputfile" name="torrentFile" />&nbsp;&nbsp;&nbsp;&nbsp;<div class="goodalertfield inlineblock">You can upload only <strong>*.torrent</strong> files</div>
<br />
  • 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-08T20:32:24+00:00Added an answer on June 8, 2026 at 8:32 pm

    problem solved, remove content-header and add referral agent and it works fine

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

Sidebar

Related Questions

I have a script that uses mcrypt_decrypt() function, but I get the following error
My workplace uses XP and I was trying to run the following script on
I have the following simple python test script that uses Suds to call a
I have a PHP script that does the following: Uses file_get_contents() to get content
The following script creates symlinks as expected, but the original file can never be
I made a small script which basically uses jQuery uplodify to upload files to
I have found the following piece of code which uses XmlHttpRequest to read JSON
I have the following asp script which uses python 2.5: <%@ Language = Python
Consider the following Python script, which uses SQLAlchemy and the Python multiprocessing module. This
I have following batch file code: @echo off SET INSTALL_PATH=c:\program files\ :ask_again if exist

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.