-4


I have a text on pastebin.com.
I want to get it by raw so i'm using this code in PHP :

$file = file_get_contents('http://pastebin.com/raw.php?i=1E9hZLfc');
echo $file

But it return nothing, I tried also curl but same problem.
Can you help me ?

user3609057
  • 31
  • 1
  • 3
  • 6

1 Answers1

1

If you var_dump your data, you can see it's a string with a big length. If you need to eval the code, you can try this:

$url = "http://pastebin.com/raw.php?i=1E9hZLfc";
$data = file_get_contents($url);
eval('?>'.$data);

The problem occurring is that it's just too long for echoing.

Jiří Velek
  • 153
  • 2
  • 12