New method to download from 4shared just check the attached script ! tnx.
<?php
//Set up constants used .
define('CALL_BACK','jQuery'); define('LOGIN','USER'); define('PASSWORD','DEMO');
// The link we download from !
$file='http://www.4shared.com/mp3/-QwopVGN/Connect-R_-_People__Radio_Edit.htm';
################# This line does everything (login 4shared) !! ##############
$url='http://www.4shared.com/login?callback='.urlencode(CALL_BACK).'&login='.urlencode(LOGIN).'&password='.urlencode(PASSWORD).'&doNotRedirect=false&fpRedirParam='.urlencode($file).'';
// Get cookie from header (they are already selected from array !)
$arr=get_headers($url, 1);
// This one process cookie
function cookme($content){preg_match_all( '#=(?P<idses>.+?);#si', $content, $get ) ; return $get['idses'][0];}
//Check if curl extension is installed if not use file_get_contents.
if ( in_array( "curl", get_loaded_extensions() ) ) {
$crl = curl_init() ;
curl_setopt ($crl, CURLOPT_URL,$file);
curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1);
//------------------------------------------------------------------------------------
//-------------------------------------------------------------------------
//-----------------------------------------------
Full demo script (the comments are in Romanian but i think that doesn't bother you as a programmer ! 😛
attached bellow:
This is ten percent luck, twenty percent skill Fifteen percent concentrated power of will Five percent pleasure, fifty percent pain 😂And a hundred percent reason to remember the name!