Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8168697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:36:46+00:00 2026-06-06T20:36:46+00:00

I have a URL that I need to call from a PHP script. The

  • 0

I have a URL that I need to “call” from a PHP script. The URL makes a phone call using Tropo’s API, so it’s easy to verify if it was called.

My PHP looks like this:

<?php

$oid=$_GET["oid"];
$notify_url = "http://mydomain.com/somepath/".$oid;
echo $notify_url;

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $notify_url);
curl_setopt($ch, CURLOPT_HEADER, 0);

curl_exec($ch);
curl_close($ch);

mail('me@gmail.com', 'cURL', "Did a cURL");

?>

This prints out the $notify_url variable, and when I take the printed value and enter it into a browser window, I get the desired result i.e. the phone call to my phone.

I have tried this on two web hosts that claim they support CURL, one is paid (crazydomains.com.ayu – just got off the phone to support) and the other is 000webhost.com

Am I doing something wrong? This one is kind of confusing, since it should be so simple.

EDIT: I receive the mail as expected.

EDIT 2: If you have any ideas about how I can debug this, I would appreciate it.

EDIT 3: As Juhana suggested I added echo curl_error(); after curl_exec and I got this error …

Warning: Wrong parameter count for curl_error() in /home/a5352876/public_html/curl.php on line 15

EDIT 4: changed the echo curl_error() to echo curl_error($ch) and got the message couldn't connect to host so that seems to be the problem.

Now the question is, why can’t it connect to a host that is easily accessible through a browser, is there anywhere I can look for that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T20:36:47+00:00Added an answer on June 6, 2026 at 8:36 pm

    If your host has HTTP wrappers enabled, and the allow_url_fopen config option is enabled, then you don’t need cURL, especially for such a simple request.

    It looks like all you need to do is open a URL, which you can easily do with fopen():

    $oid = $_GET["oid"];
    $notify_url = "http://mydomain.com/somepath/".$oid;
    $fh = fopen( $notify_url, 'r');
    fclose( $fh);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a server with a PHP script that pulls data from a source
I am having problems calling a URL from PHP code. I need to call
I have a PHP script that produces a .CSV export file from a MySQL
from the scarcely documented FB api, I have thus far learned that I need
I have a url that looks like that http://example.com/index.php?id=111&title=word1 word2 word3 I need to
I have a long URL on a web page in Windows that I need
I have a list that I need to send through a URL to a
I have a URL that would be like so: http://mysite.com/index.php?somename=somevalue I usually check that
So I have a URL that I need my Flash movie to extract variables
I have a php function that fetches and returns tweets data from twitter as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.