Login To InderWeb ! Just Play !

Username:
Password:

UserSubmittedComments

curl script

Get remote image file from another server saved into your server using CURL

Below is the code that was used for getting image from a remote location and saving that image to current folder.This code can be modified easily to achive something different.


<?php
/**
* @desc file: This source was used for copying images from another server to our own server and can be modified according to requirements.
*/
//***********************URL of image which you need**************
$img_url='http://www.inderweb.com/inderweb/userpictures/picture-1.jpg';
$ext_arr=explode("/",$img_url);

CURL requests For Search keywords

Curl is good for getting remote data and making dynamic requests.

<form method="post"><input type="text" name="search" value="india"><input type="submit" value="Search"></form>

<?php
// create a new cURL resource
$ch = curl_init();

// set URL and other appropriate options
$result_cnt=2;
$search=$_REQUEST['search']?$_REQUEST['search']:"";
$url="http://www.google.co.in/search?num=$result_cnt&hl=en&safe=off&q={$search}";
Syndicate content