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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.