fonksiyon / komut (wget veya file_get_contents itibaren dışında) web içeriğini almak için

0 Cevap php

Ben bir web içeriği almak gerekir. Ben genellikle wget kullanabilirsiniz ama bana bu sefer bir "Internal Server Error" veriyor. Ben de benim Mac yüklü mAmp kullanıyorum ne zaman çalışır,) (file_get_contents kullanarak çalıştı, ama ben bizim sunucuya çalıştırdığınızda, bir şey ve baskılar hiçbir hata iletisi yapmıyor. Bunu yapmak için başka bir yolu var mı? Aşağıda kullanılan kod vardır.

<?php
echo "Retrieving Traffic Updates";
$source = file_get_contents('http://www4.honolulu.gov/hpdtraffic/MainPrograms/frmMain.asp?sSearch=All+Incidents&sSort=I_tTimeCreate');
echo $source;
?>

Şimdiden teşekkürler!


I don't know how to reply to all of you so I just added it here. CURL WORKED PERFECTLY. Thanks a lot guys. I just have to ask though why file_get_contents() won't work even if it's enabled in the php.ini?

0 Cevap