Wednesday, 9 March 2016

How to fetch web text using cURL.

How to fetch web text using cURL.

 
Hello Friends today i will teach you , how to fetch web text using cURL. The full form of cURL is CLIENT URL LIBRARY. It is a function of PHP there are many sub function available like curl_close(close a cURL session) , curl_errno(Return the last error number) , curl_file_create(create the cURL file object) etc. so many function are available but today i teach you curl_setopt.
It is use to Set an option for a cURL transfer. The small demo are following. you can use in notepad or any text editer.

Step are following.

1) Open notepad.
2) Save file in xampp/hddoc in create your folder and name your wish. And file name i am saving curl.php you can different name choose. Write a code bellow i your php file. I will Show you output in image and source code image.



<strong>Hello Friend</strong>

<?php

$chandle = curl_init();
$url="www.top-tricksandtips.blogspot.in";
curl_setopt($chandle,CURLOPT_URL,$url);
curl_setopt($chandle,CURLOPT_RETURNTRANSFER,1);
curl_setopt($chandle,CURLOPT_CONNECTTIMEOUT,5);
$curlResult=curl_exec($chandle);
curl_close($chandle);

echo $curlResult;

?>



3) In this file i am write www.top-tricksandtips.blogspot.in you can write your choice url.
4) Run in browser localhost/foldername/filename.php and press enter and show the magic.. and enjoy.

Thank you.

2 comments:

  1. US PROS WITH DL NUM
    CANADA LEADS+NIN
    UK LEADS+SIN

    FRESH DATA
    COMPREHENSIVE DATA WITH ALL IFNO'S
    SSN-DOB-DL PREMIUM DTATA
    PROS WITH DL ISS & EXP DATE ALL STATE
    COMPANY LEADS
    DL FOTOS+SSN & SELFIE
    UI-SBA PROS (FRESH)
    PROS FOR ACCOUNTS (UBER-EATS,DOOR-DASH,SPARK.....)
    HIGH CS PROS (650-750)
    FRESH ABOVE 2000(DOB) PROS LIMITED STATES
    PROS FOR AT&T-VERZION
    DEATH F-ULLZ
    E-MAIL LEADS
    PHONE LEADS

    TO-OLS & TUTORIALS
    PASS-PORT & VISAAA USA

    ALL DATA IS AVAILABLE WITH REPLACE-MENT POLICY FOR BAD INFO'SSS

    CAN GET SPECIFIC INFO LIKE G-ENDER,DOB,STATE,CITY......

    GET SAMPLE TO TEST FOR TRUST :)

    C-RYPTO-CASH-APP-PAY-PAL

    T-E-L-E-G-R-A-M_@Pros4u

    ReplyDelete