Tutorial :Need help converting VB.NET 08 code to PHP - Getting direct link from MediaFire.com



Question:

I was looking for a way to get a direct link from mediafire's file hosting service. By default, when a user visits a download link, he will be presented with a download page where he has to wait for the download to be processed and then a link will appear. This link will appear in the div id 'download_link'.

I googled and found a VB.NET 2008 solution to this, but I need the code in PHP Here is the VB.NET 2008 solution: http://www.vbforums.com/showthread.php?t=556681

Any help is greatly appreciated.

Cheers


Solution:1

This VB.NET code relies on access to the client DOM through the WebBrowser .NET control. You could port this to PHP by:

  • Using the cURL functions to get the HTML
  • Loading them into an HTML parser to find the correct link
  • Redirecting the user with Header('Location: '.download_link)

I think it would be better to recommend to your users the SkipScreen Firefox extension, though. A client solution will always be easier.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »