Advertisement
Exho

Untitled

Oct 22nd, 2014
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. function MapImgExists($url){
  2. $ch = curl_init($url);
  3. $file_headers = @get_headers($url);
  4. if($file_headers[0] == 'HTTP/1.1 404 Not Found') {
  5. $exists = "false";
  6. } else {
  7. $exists = "true";
  8. }
  9. return $exists;
  10. }
  11.  
  12. if (isset($_POST["url"])) {
  13. $url = $_POST['url'];
  14. $real = MapImgExists($url);
  15. echo $real;
  16. }
  17.  
  18.  
  19.  
  20.  
  21. local function CheckMapIcon(url)
  22. print(url)
  23. http.Post( "http://127.0.0.1/nat/mapimg.php", {url = url},
  24. function(body, len, headers, code)
  25. print("Posted",url)
  26. end)
  27.  
  28. http.Fetch( "http://127.0.0.1/nat/mapimg.php",
  29. function ( body, len, headers, code )
  30. print("return",body)
  31. end,
  32. function (err)
  33.  
  34. end)
  35. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement