Hosts¶
All Hosts methods are available under \RealDebrid\RealDebrid()->hosts
namespace.
Note
In order to use any of these methods, remember to create a RealDebrid client.
Please refer to the Creating a client section if you didn’t do it.
get()¶
Get supported hosts.
Return¶
List of supported hosts as an stdClass
{
"1fichier.com": {
"id": "1f",
"name": "1Fichier",
"image": "https://cdn.realdebrid.xtnetwork.fr/0482/images/hosters/1fichier.png"
},
"2shared.com": {
"id": "2s",
"name": "2Shared",
"image": "https://cdn.realdebrid.xtnetwork.fr/0482/images/hosters/2shared.png"
}
}
Examples¶
<?php
$supportedHosts = $realDebrid->hosts->get();
status()¶
Get status of supported hosters or not and their status on competitors.
Return¶
List of supported hosts status as an stdClass
{
"1fichier.com": {
"id": "1f",
"name": "1Fichier",
"image": "https://cdn.realdebrid.xtnetwork.fr/0482/images/hosters/1fichier.png",
"supported": 1,
"status": "up",
"check_time": "2015-12-10T10:23:57.000Z",
"competitors_status": {
"mega-debrid.eu": {
"status": "up",
"check_time": "2015-12-10T10:23:57.000Z"
},
"linksnappy.com": {
"status": "up",
"check_time": "2015-12-10T10:24:01.000Z"
},
"premiumize.me": {
"status": "up",
"check_time": "2015-12-10T10:23:58.000Z"
}
}
}
}
Examples¶
<?php
$status = $realDebrid->hosts->status();
regex()¶
Get all supported links Regex, useful to find supported links inside a document.
Return¶
List of supported links regex as an Array
[
"/(http|https):\/\/(\w+\.)?180upload\.com\/[0-9a-z]{12}/",
"/(http|https):\/\/(\w+\.)?2shared\.com\/([^( |\"|'|>|<|\r\n\|\n|$)]+)/",
"/(http|https):\/\/(\w+\.)?4shared\.com\/([^( |\"|'|>|<|\r\n\|\n|$)]+)/"
]
Examples¶
<?php
$regex = $realDebrid->hosts->regex();