dreamhost ใช้ฟังก์ชั่น file_get_contents ไม่ได้ครับ ทำยังไงดีครับ

เริ่มโดย iPhoenix, 23 ตุลาคม 2007, 17:14:53

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

iPhoenix

สามารถใช้ฟังก์ชั่นอื่นได้ป่าวครับ
รู้จักแต่ฟังก์ชั่นนี้อะครับ
ช่วยแนะนำหน่อยครับ ฟังก์ชั่นอื่นที่ใช้เหมือน  file_get_contents ครับ

ขอบคุณครับ

อีกอย่างหนึ่งครับ dreamhost ทำยังไงถึงใช้ .htaccess ได้ครับ
คือผมเอาสคริป auto_video ในบอร์ดไปลงไม่ได้ครับ
ติดทั้งสองอย่างนี้ครับ
ผู้รู้ช่วยหน่อยนะครับ

ขอบคุณอีกครั้งครับ

ColdMoney

[direct=https://www.jumnong.com]รับจำนอง[/direct] [direct=https://burapasup.com]รับซื้อบ้าน[/direct] [direct=https://kadsan.com]สินค้าราคาถูก[/direct] [direct=https://checkcheap.com]เปรียบเทียบราคา[/direct]

iPhoenix

ขอบคุณครับ

แต่ติดอยู่นิดเดียวครับ

ผมใช้ฟังชั่น curl ไม่เป็นครับ

ลองดูโค้ดที่เค้าใช้ curl แล้วงงๆ

มันมีหลาย curl ครับ curl_setopt , curl_init , curl_exec
แล้วใช้อันไหนอะครับ

payu


สั้นๆ ง่ายๆ แค่นี้เองครับ

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$etxt = curl_exec($ch);


ใช้แทน

$text = file_get_contents($url);


มีข้อแม้ว่า host ต้อง enable curl extension ครับ

[direct=http://www.facebook.com/iipayu]payu on facebook[/direct]

Dr.K

อ้างถึงจาก: weall ใน 23 ตุลาคม 2007, 17:14:53
สามารถใช้ฟังก์ชั่นอื่นได้ป่าวครับ
รู้จักแต่ฟังก์ชั่นนี้อะครับ
ช่วยแนะนำหน่อยครับ ฟังก์ชั่นอื่นที่ใช้เหมือน  file_get_contents ครับ

ขอบคุณครับ

อีกอย่างหนึ่งครับ dreamhost ทำยังไงถึงใช้ .htaccess ได้ครับ
คือผมเอาสคริป auto_video ในบอร์ดไปลงไม่ได้ครับ
ติดทั้งสองอย่างนี้ครับ
ผู้รู้ช่วยหน่อยนะครับ

ขอบคุณอีกครั้งครับ
มันใช้ .htaccess ได้เลยไม่ใช่เหรอ
[direct=https://www.thaihealth.net/blog/seo_doctor/]seo blog[/direct]|[direct=https://netplushost.com]netplushost[/direct]
[direct=https://pattayawebmarketing.com/pattaya-seo]pattaya seo[/direct]
[direct=https://dochost.net]seo hosting[/direct]

EThaiZone

อ้างถึงจาก: dochost ใน 23 ตุลาคม 2007, 18:04:42
อ้างถึงจาก: weall ใน 23 ตุลาคม 2007, 17:14:53
สามารถใช้ฟังก์ชั่นอื่นได้ป่าวครับ
รู้จักแต่ฟังก์ชั่นนี้อะครับ
ช่วยแนะนำหน่อยครับ ฟังก์ชั่นอื่นที่ใช้เหมือน  file_get_contents ครับ

ขอบคุณครับ

อีกอย่างหนึ่งครับ dreamhost ทำยังไงถึงใช้ .htaccess ได้ครับ
คือผมเอาสคริป auto_video ในบอร์ดไปลงไม่ได้ครับ
ติดทั้งสองอย่างนี้ครับ
ผู้รู้ช่วยหน่อยนะครับ

ขอบคุณอีกครั้งครับ
มันใช้ .htaccess ได้เลยไม่ใช่เหรอ


ใช้ได้ ฟันธงครับ!

ColdMoney

function file_get_contents_curl($url){
$ch = curl_init();
$timeout = 0; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
curl_close($ch);

return $file_contents;
}


เอาไปแทน file_get_contents เลยครับ  :)

[direct=https://www.jumnong.com]รับจำนอง[/direct] [direct=https://burapasup.com]รับซื้อบ้าน[/direct] [direct=https://kadsan.com]สินค้าราคาถูก[/direct] [direct=https://checkcheap.com]เปรียบเทียบราคา[/direct]

7

function file_get_contents($filename) {
   $fd = fopen("$filename", "rb");
   $content = fread($fd, filesize($filename));
   fclose($fd);
   return $content;
}

แบบไม่ต้องใช้ curl

iPhoenix

อ้างถึงจาก: EThaiZone ใน 23 ตุลาคม 2007, 19:27:41
อ้างถึงจาก: dochost ใน 23 ตุลาคม 2007, 18:04:42
อ้างถึงจาก: weall ใน 23 ตุลาคม 2007, 17:14:53
สามารถใช้ฟังก์ชั่นอื่นได้ป่าวครับ
รู้จักแต่ฟังก์ชั่นนี้อะครับ
ช่วยแนะนำหน่อยครับ ฟังก์ชั่นอื่นที่ใช้เหมือน  file_get_contents ครับ

ขอบคุณครับ

อีกอย่างหนึ่งครับ dreamhost ทำยังไงถึงใช้ .htaccess ได้ครับ
คือผมเอาสคริป auto_video ในบอร์ดไปลงไม่ได้ครับ
ติดทั้งสองอย่างนี้ครับ
ผู้รู้ช่วยหน่อยนะครับ

ขอบคุณอีกครั้งครับ
มันใช้ .htaccess ได้เลยไม่ใช่เหรอ


ใช้ได้ ฟันธงครับ!

ขอบคุณครับ
แต่ผมเอาลงมันขึ้นแบบนี้อะครับ

Not Found

The requested URL /view.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

มันคืออะไรอะ