fsockopen() function not working!!

Started on the old forum in December 2009 · view the original in the archive · old links redirect here

13 replies · 1,542 views · started 16 years ago · 1 min read

5 participants
Ponick Developer · 216 posts #1

I m using a host that same as byte host . Theres everythings is ok .But it does'nt let me use fsockopen() function .For this reason i can't use you tube api,live cricket,pics search api etc. 🙁

Then is there any tecniuq to active it by uploading extra php.Ini file or something to .Htaccess ?? 🙁

/* I don't know everything hehe */

Find me on facebook

subzero Super moderator Fellow · 3,954 posts #3

Your on a free host dont edit there system php.ini

  1. edit it too use curl most free host lets you use this..

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

Ponick Developer · 216 posts #4

Thanx gum / curl! Is it a function ? Wow . 🙂 i will try it thanx a lot .Subzero

But what about mobile youube ??

/* I don't know everything hehe */

Find me on facebook

subzero Super moderator Fellow · 3,954 posts #5

If your having a problem getting youtube videos more likely your curl is off as well.

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

Ponick Developer · 216 posts #6

GumSlone wrote: use file_get_contents();

this is what i tried

<?php

echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";

?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<body>
<title>kewmew</title>

<?php

    echo "<p align=\"left\">";
$f = $_GET['f'];
$handle = fopen("http://cri.mauj.com/recent.php?f=".$f."", "rb");
$contents = stream_get_contents($handle);
fclose($handle);
$contents = str_replace("wml.mauj.com", "kewmew.co.cc", "$contents");
$contents = str_replace("Mauj", "$site", "$contents");
echo "$contents";
  echo "</p>";

echo "</body><head>";

?>

</html>

and then i used it

<?php

echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";

?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<body>
<title>kewmew</title>

<?php

    echo "<p align=\"left\">";
$f = $_GET['f'];
$contents = file_get_contents("http://cri.mauj.com/", "rb");
$contents = str_replace("wml.mauj.com", "kewmew.co.cc", "$contents");
$contents = str_replace("Mauj", "$site", "$contents");
echo "$contents";
  echo "</p>";

echo "</body><head>";

?>

</html>

both are working in my pc in wapam host .but not workin in my site host!! 😢

how could i make it work ??:(

/* I don't know everything hehe */

Find me on facebook

Ponick Developer · 216 posts #7

subzero wrote: If your having a problem getting youtube videos more likely your curl is off as well.

i have tried this for trial

<?php
/**
* Initialize the cURL session
*/
$ch = curl_init();
/**
* Set the URL of the page or file to download.
*/
curl_setopt($ch, CURLOPT_URL,
'http://news.google.com/news?hl=en&topic=t&output=rss');
/**
* Ask cURL to return the contents in a variable
* instead of simply echoing them to the browser.
*/
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
/**
* Execute the cURL session
*/
$contents = curl_exec ($ch);
/**
* Close cURL session
*/
curl_close ($ch);
?>

but it shows erorr 😐

/* I don't know everything hehe */

Find me on facebook

Ponick Developer · 216 posts #12

firemax wrote: what's the error? post it here

no err happend with it , just white page .with logo .html style etc .. only not showing the content what i wanna get from other site 🙂

/* I don't know everything hehe */

Find me on facebook

firemax Developer · 221 posts #13

it's the problem with your hosting provider. if you are using byte host, you can't never get answer from them. becouse its not honestly web hosting service.

but try this script with curl. if you are don,t know about using curl, read http://coding-talk.com/f16/youtube-script-error-download-face-of-5205/index2.html. it's the only one way for you. else if nothing good results, change your hosting provider. it's the best way for you.

External image (may be gone) Free Mobile Web Scripts by me: Free Youtube Downloader, Tweets Reader, Facebook Wall Posts Reader PHP Tutorials: [How to Secure Your PHP Script (PHP SECURITY)](http://coding-talk.com/f14/how-to-secure-you…

Ponick Developer · 216 posts #14

firemax wrote: it's the problem with your hosting provider. if you are using byte host, you can't never get answer from them. becouse its not honestly web hosting service. but try this script with curl. if you are don,t know about using curl, read http://coding-talk.com/f16/youtube-script-error-download-face-of-5205/index2.html. it's the only one way for you. else if nothing good results, change your hosting provider. it's the best way for you.

many many thanx . 🙂

/* I don't know everything hehe */

Find me on facebook

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close