الكود :
<?php
$get_tag = file_get_contents("
");
$c_tag = strstr($get_tag,'');
echo $c_tag;
?>
الخطاء :
Warning: file_get_contents(
) [function.file-get-contents]: failed to open stream: No error in C:\AppServ\www\ASO\index.php on line 2
ارجو الحل
الكود :
<?php
$get_tag = file_get_contents("
");
$c_tag = strstr($get_tag,'');
echo $c_tag;
?>
الخطاء :
Warning: file_get_contents(
) [function.file-get-contents]: failed to open stream: No error in C:\AppServ\www\ASO\index.php on line 2
ارجو الحل
يجب تنصيب إضافة openssl لتستطيع الطلب من خلال https
ثم تأكد من ناتج الدّالّة : stream_get_wrappers()
أو إستخدم مكتبة curl
$url = "
https://play.google.com/sto... "; $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_REFERER, $url); $result = curl_exec($ch); curl_close($ch);
الناتج بداخل المتغير result.
هل جربت استخدام رابط آخر ؟
كما ان هذه الدالة مخصصة لجلب كافة محتويات الموقع على شكل String لذلك لا ادري ما التي تحاول فعله مع الرابط هذا
file_get_contents — Reads entire file into a string
خارج عن الموضوع ولكن ربما تحتاج شيئا مثل هذا
هذه الدالة تقرأ كافة محتويات ملف وتعطيها لك على شكل string
تقريبا مثل تحديد الصفحة كاملة بإستخدام crtl+a ثم تنسخها
التعليقات