Skip to content
WJunction - Webmaster Forum

PHP BTN Help

Status
Not open for further replies.
I have made this code and ran it on my VPS to test for downloading from BTN but for some reason it is only downloading the .torrent

I just want to make sure this is the right way of logging into BTN

PHP:
<?php

if(isset($_GET['sid'])) session_id(strip_tags($_GET['sid']));
session_start();

echo '<?xml version="1.0" encoding="UTF-8"?>';

$params = array('http' => array(
                'method' => 'POST',
                'content' => 'username=usernamehere&password=passwordhere&login=Log In!'
        ));

if ($optional_headers !== null) $params['http']['header'] = $optional_headers;
$ctx = stream_context_create($params);
$fp = @fopen('http://broadcasthe.net/login.php', 'rb', false, $ctx);
if (!$fp) die('Error connecting to BroadCasthe.net');
$response = @stream_get_contents($fp);
if ($response === false) die('Error connecting to BroadCasthe.net');
?>
Thanks to anyone who can help me out B-)
 
Status
Not open for further replies.

About the author

B
Senior Member · Joined
1,286
Messages
211
Reactions
63
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom