E
E
eddasphp2015-09-21 17:27:19
PHP
eddasphp, 2015-09-21 17:27:19

php. how to put it into the script?

$slovo = "about acne";
$slovo = str_replace(' ', '+', $slovo);
$slovo = str_replace('-', '+', $slovo);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, ' mydomain.com/xlon.php?q= '.$slovo.'');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close($ch);
echo "".$result ."";

how to make url ( mydomain.com/xlon.php?q= ) taken from txt file
Example:
$bar = fopen 'url.txt';
$slovo = "about acne";
$slovo = str_replace(' ', '+', $slovo);
$slovo = str_replace('-', '+', $slovo);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, ''.$bar.''.$ttt2.'');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close($ch);
echo "".$result ."";

$bar = fopen 'url.txt';
curl_setopt($ch, CURLOPT_URL, ''.$bar.''.$ttt2.'');

url.txt
mydomain.com/xlon.php?q=
Not very good in php. so please correct me

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DVamp1r3, 2015-09-21
@eddasphp

get_file_contents('url.txt');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question