...

View Full Version : Php get link



yungacejr
12-02-2008, 02:51 AM
How can I use php to go to this link http://67.212.88.58/~qss/quicksilverscreen.com/m1.php?id=GTKL3PZX and copy and paste the link it gives you. Isn't it something like this

<?php $file = readfile("http://67.212.88.58/~qss/quicksilverscreen.com/m1.php?id=GTKL3PZX") ?>

Fou-Lu
12-02-2008, 03:03 AM
Readfile returns an int result representing the number of bytes read.
In order to retrieve whats there, you'll need to use one of the content retrieval methods of output buffering, such as ob_get_contents().

You need to have allow_url_fopen to be enabled to get this to work though, and the result of the file must output the actual string you're looking for (you can't read it, it will be processed by the server as php).

yungacejr
12-02-2008, 03:30 AM
I am not really good with php (beginner) can someone show me exactly how to work it.

Fou-Lu
12-02-2008, 03:33 AM
Something like this should work:


ob_start();
readfile('/path/to/file');
$result = ob_get_clean();

$result should contain the results of readfile.

yungacejr
12-02-2008, 03:36 AM
So like this?

<?php
ob_start();
readfile('http://67.212.88.58/~qss/quicksilver...hp?id=GTKL3PZX');
$result = ob_get_clean();
?>

Fou-Lu
12-02-2008, 04:17 AM
Yep, if it doesn't work check you're error logs. I would not be surprised if you're host has url_allow_fopen disabled.

yungacejr
12-05-2008, 11:38 PM
not working i just want the php code to go to http://67.212.88.58/~qss/quicksilverscreen.com/m1.php?id=FBTVOPHB and then paste the link that it generates.

Fou-Lu
12-06-2008, 09:03 AM
Yep, if it doesn't work check you're error logs. I would not be surprised if you're host has url_allow_fopen disabled.

What does you're error log say?

PHP6
12-06-2008, 05:12 PM
What does you're error log say?
Good question... I will just add that there is lots of different way (file, file_get_content, curl, socket and so on) how to open this URL but everything depends if you are allowed to make external connection on your server.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum