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

  • SEARCH
  • Home
  • 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 8153589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:04:07+00:00 2026-06-06T16:04:07+00:00

I have a question – I’m using CURL and PROXY. I’m getting list with

  • 0

I have a question – I’m using CURL and PROXY. I’m getting list with proxy addresses from paid web service. The list looks like this (example):

123.456.789.012:1234
123.456.789.012:1234
123.456.789.012:1234
123.456.789.012:1234
123.456.789.012:1234
123.456.789.012:1234
123.456.789.012:1234

Let’s say, that the list mentioned above is available here: http://example.com/list_with_the_proxy

My PHP code looks like this:

<?php
$url = 'http://connect.to.another.example.net/'; //I want to open this url using one of the proxy address from the list

$proxy_url = 'http://address.of.proxy.example.org';

function RandomLine($filename) { 
    $lines = file($filename) ; 
    return $lines[array_rand($lines)] ; 
} 

$random_proxy = RandomLine($proxy_url); 

$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, $url); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1); 
curl_setopt($ch, CURLOPT_PROXY, $random_proxy); 
$data = curl_exec($ch); 
curl_close($ch); 
echo $data;

?>

I have noticed some problem – sometimes some proxy is unavailable, and the site is loading & loading & loading … Is there any possibility, to reload the script and get new random proxy, if the site is loading too long ? For example if proxy is not responding in 5 seconds, script will load again ?

  • 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-06T16:04:09+00:00Added an answer on June 6, 2026 at 4:04 pm

    Look into CURLOPT_TIMEOUT, reload in every case when you don’t get any data in a reasonable time. Also are you sure that the data from the proxy list site is coming through correctly and its not hanging because of that?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have question. I have some app on facebook and getting this error Fatal
I have question regarding shared memory segmentation in c using POSIX system calls. Is
i have question from programming pearls problem is following show how to use Lomuto's
I have question I'm developing small application to desktop in win Forms. I'm using
I have question about sending emails from MVC3 application. I already read for exmple
I have question here, i design multiview application using view base template. Page 1
I have question regarding the service and activity. I have one service which calls
I have question how to replace whitespace with _ using notepad++ regex between []
I have question related to bean to json serialziation/deserialization using Jackson. Previously I have
I have question regarding about finding subview using '.tags' in one UIView. for (UIView

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.