Jump to content

PHP Code Help


uk26

Recommended Posts

Hi, im trying to impliment some code on our website to offer a Telephone Call Back Service.

 

the server is running PHP5 and i am having some issus with

 

$handle = fopen("$url", "r");

$contents = '';

while (!feof($handle)) {

  $contents .= fread($handle, 8192);

}

fclose($handle);

 

 

can someone please help

Link to comment
https://forums.phpfreaks.com/topic/213825-php-code-help/
Share on other sites

Hi, are you sugesting that i change it

 

from

$handle = fopen("$url", "r");

$contents = '';

while (!feof($handle)) {

  $contents .= fread($handle, 8192);

}

fclose($handle);

?>

 

 

 

to

 

$handle = fopen("$url", "r");

$contents = '';

while (!feof($handle)) {

$contents = file_get_contents($url);

}

fclose($handle);

?>

 

 

as its still not working

Link to comment
https://forums.phpfreaks.com/topic/213825-php-code-help/#findComment-1112857
Share on other sites

Here is my full code

 

but still same problem

 

<?php

ini_set ('user_agent', $_SERVER['HTTP_USER_AGENT']);

require ('config.php');

$number = $_POST["number"];

$url = "$host$port/PbxAPI.aspx?func=make_call&from=$ext&to=$number&pin=$ext_pin";

 

$handle = fopen("$url", "rb");

$contents = stream_get_contents($handle);

fclose($handle);

?>

Link to comment
https://forums.phpfreaks.com/topic/213825-php-code-help/#findComment-1112881
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.