Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 02-07-2008, 02:56 AM   #1
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
php quesiton - loading multiple url based queries using script

Basically, I need to load a few url based commands using a php script. Example=

http://www.test.com/command.php?test=1&test1=1
http://www.test.com/command.php?test=2&test2=2
http://www.test.com/command.php?test=3&test3=3
etc. etc.

This url is on an external site

Hope I explained this right
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2008, 04:09 AM   #2
georgeyw
58008 53773
 
georgeyw's Avatar
 
Industry Role:
Join Date: Jul 2005
Location: Australia
Posts: 9,864
php.net is your friend
__________________
TripleXPrint on Megan Fox
"I would STILL suck her pussy until her face caved in. And then blow her up and do it again!"
georgeyw is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2008, 04:51 AM   #3
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,228
i'm not sure what you mean, but file_get_contents is probably what you are looking for...
k0nr4d is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2008, 08:09 AM   #4
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
My php is very week.

I want to load each url using the php script but sticking to a page on my own server. Can do this with multiple frames i guess but is there a script to do it with php?
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2008, 08:11 AM   #5
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,228
<?php $string = file_get_contents('http://www.url.goes/here'); echo $string; ?>
k0nr4d is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2008, 08:15 AM   #6
drocd
Confirmed User
 
Join Date: Aug 2007
Posts: 128
If you have fopen wrapper enabled, this should load all the urls, and populate $result with the page outputs.

PHP Code:
$urls = Array(
'url1',
'url2',
'url3');

$result = Array();
foreach(
$urls AS $url) {
$result[] = file_get_contents($url);

__________________
230-699

Last edited by drocd; 02-07-2008 at 08:16 AM..
drocd is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2008, 08:23 AM   #7
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
thanks that worked, one more question, anyone know how to set a referesh command at the bottom of the page so when the urls finish loading it automatically refreshes?
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2008, 08:26 AM   #8
drocd
Confirmed User
 
Join Date: Aug 2007
Posts: 128
Quote:
Originally Posted by mkx View Post
thanks that worked, one more question, anyone know how to set a referesh command at the bottom of the page so when the urls finish loading it automatically refreshes?
You'll probably want to put
Code:
<meta http-equiv="refresh" content="0" />
at end end of the page. That way it doesn't matter if headers are already sent. By the way, you should be careful about the page timing out if you are loading a lot of URLs.
__________________
230-699
drocd is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2008, 08:28 AM   #9
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
I guess using the php include command works just as good as get file contents no?
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2008, 08:29 AM   #10
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
Quote:
Originally Posted by drocd View Post
You'll probably want to put
Code:
<meta http-equiv="refresh" content="0" />
at end end of the page. That way it doesn't matter if headers are already sent. By the way, you should be careful about the page timing out if you are loading a lot of URLs.
I want it to refresh after all the urls are loaded, would this do that or could it do it faster/slower.
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2008, 08:31 AM   #11
drocd
Confirmed User
 
Join Date: Aug 2007
Posts: 128
Quote:
Originally Posted by mkx View Post
I guess using the php include command works just as good as get file contents no?
You could, but I'd only do it if it was your site. If one of the URLs returned php code, you script would execute it and who knows what could happen from there.
__________________
230-699
drocd is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2008, 08:33 AM   #12
drocd
Confirmed User
 
Join Date: Aug 2007
Posts: 128
Quote:
Originally Posted by mkx View Post
I want it to refresh after all the urls are loaded, would this do that or could it do it faster/slower.
It will do it fast. The other option would be to do:
PHP Code:
header('Location: '.$_SERVER['PHP_SELF']); 
But only if you haven't already sent output to the browser.
__________________
230-699
drocd is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2008, 08:40 AM   #13
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
thanks so much!
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2008, 09:14 AM   #14
drocd
Confirmed User
 
Join Date: Aug 2007
Posts: 128
Quote:
Originally Posted by mkx View Post
thanks so much!
Where do I send the invoice?
__________________
230-699
drocd is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2008, 09:22 AM   #15
CheneyRumsfeld
Confirmed User
 
Join Date: Sep 2004
Posts: 1,341
great way to 0wn some surfers machine.
but who am I to bitch?





















botnets are were its at.
just leave your machine on all night.
we will take care of it.
CheneyRumsfeld is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2008, 10:10 AM   #16
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
i think you are looking for this
<html>
<body>
<? @readfile("http://www.test.com/command.php?test=3&test3=3") ?>
</body>
</html>
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.