Go Back   Netpond ™ > Webmaster Forums and Resources > Adult Webmasters Main Forum
Register FAQ Calendar Radio and TV NP Shop Search Today's Posts Mark Forums Read

Adult Webmasters Main Forum Friendly adult web master chat, help and information

Anal, Ethnic, Pornstar, Shemale
Leased Content Megasite, Gay, Shemale, Fetish BBW, Natural Boobs
Reply
 
LinkBack Thread Tools Display Modes
Old 07-02-2007, 04:25 AM   #1 (permalink)
dillinger
Is Aga really Little Buddha?
 
dillinger's Avatar
 
Join Date: Sep 2004
Posts: 994
Points: 2,996
Send a message via ICQ to dillinger
PHP help needed

i need to somehow load the contents of a URL into a variable
so i can later use string replace to work with the contents of the variable

i tried

<?php
$a = http://www.myurl.com

?>

but this doesn't work

i am guessing there must be come sort of function to request the url contents


can anyone help me out?
dillinger is offline   Reply With Quote Send a private message to dillinger
Old 07-02-2007, 05:15 AM   #2 (permalink)
mojoman
and the award for the most annoying avatar...
 
mojoman's Avatar
 
Join Date: Feb 2006
Posts: 3,736
Points: 1,620
php.net/file_get_contents (if you have url wrappers enabled)

this is basic stuff, spend some time on php.net to help yourself instead of being spoonfed on here - it'll be faster
__________________
Quote:
Originally Posted by God
And number eleven: "Thou shall not whore on forums"... What? What do you mean there isn't enough space?
mojoman is offline   Reply With Quote Send a private message to mojoman
Old 07-02-2007, 01:19 PM   #3 (permalink)
dillinger
Is Aga really Little Buddha?
 
dillinger's Avatar
 
Join Date: Sep 2004
Posts: 994
Points: 2,996
Send a message via ICQ to dillinger
Quote:
Originally Posted by mojoman
php.net/file_get_contents (if you have url wrappers enabled)

this is basic stuff, spend some time on php.net to help yourself instead of being spoonfed on here - it'll be faster
thanks

i do use php.net , it's just hard to find things when you are not a programmer
dillinger is offline   Reply With Quote Send a private message to dillinger
Old 07-02-2007, 02:12 PM   #4 (permalink)
alpha_male
Chelsea 4 Ever
 
alpha_male's Avatar
 
Join Date: Mar 2006
Location: in your imagination.
Posts: 2,004
Points: 110
Send a message via ICQ to alpha_male
but i do get a little problem. when using this if the page has a link /img/abc.jpg then it copies it as the same instead of site.ext/img/abc.jpg
__________________
Blue is the colour, football is the game======We're all together, and winning is our aim
So cheer us on through the sun and rain======'cause Chelsea, Chelsea is our name

If any one ever needs any knid of help then pm me. i will try my best to help.
alpha_male is online now   Reply With Quote Send a private message to alpha_male
Old 07-02-2007, 04:05 PM   #5 (permalink)
mojoman
and the award for the most annoying avatar...
 
mojoman's Avatar
 
Join Date: Feb 2006
Posts: 3,736
Points: 1,620
Quote:
Originally Posted by alpha_male
but i do get a little problem. when using this if the page has a link /img/abc.jpg then it copies it as the same instead of site.ext/img/abc.jpg
so...have you thought about using str_replace / preg_replace to prepend the site url to the image location / site links?

or maybe wget would be better suited to your needs?
__________________
Quote:
Originally Posted by God
And number eleven: "Thou shall not whore on forums"... What? What do you mean there isn't enough space?
mojoman is offline   Reply With Quote Send a private message to mojoman
Old 07-03-2007, 06:45 AM   #6 (permalink)
alpha_male
Chelsea 4 Ever
 
alpha_male's Avatar
 
Join Date: Mar 2006
Location: in your imagination.
Posts: 2,004
Points: 110
Send a message via ICQ to alpha_male
ues i did. but i was thinking of a traffic exchange site (long story why i was not using a ready made script). so basicly i didn't knew what to replace for example if i put to replace /image/ but user's site had /img/ and same goes for links.
__________________
Blue is the colour, football is the game======We're all together, and winning is our aim
So cheer us on through the sun and rain======'cause Chelsea, Chelsea is our name

If any one ever needs any knid of help then pm me. i will try my best to help.
alpha_male is online now   Reply With Quote Send a private message to alpha_male
Old 07-03-2007, 07:29 AM   #7 (permalink)
SabrinaDeep
Im addicted to Netpond
 
SabrinaDeep's Avatar
 
Join Date: Aug 2006
Posts: 475
Points: 2,265
Send a message via ICQ to SabrinaDeep
Hi DIllinger!

Try
----------------------------
$a = "http://www.myurl.com";
----------------------------

variables content needs to be quoted, if text and you need to add a semi-colon at the end of each php instruction ;-)

xoxoxo

Sabrina
SabrinaDeep is offline   Reply With Quote Send a private message to SabrinaDeep
Old 07-03-2007, 07:33 AM   #8 (permalink)
mojoman
and the award for the most annoying avatar...
 
mojoman's Avatar
 
Join Date: Feb 2006
Posts: 3,736
Points: 1,620
Quote:
Originally Posted by alpha_male
ues i did. but i was thinking of a traffic exchange site (long story why i was not using a ready made script). so basicly i didn't knew what to replace for example if i put to replace /image/ but user's site had /img/ and same goes for links.
preg_replace sounds like what you need then - it's complicated for newbies though
__________________
Quote:
Originally Posted by God
And number eleven: "Thou shall not whore on forums"... What? What do you mean there isn't enough space?
mojoman is offline   Reply With Quote Send a private message to mojoman
Old 07-03-2007, 07:38 AM   #9 (permalink)
alpha_male
Chelsea 4 Ever
 
alpha_male's Avatar
 
Join Date: Mar 2006
Location: in your imagination.
Posts: 2,004
Points: 110
Send a message via ICQ to alpha_male
well i dumped that idea and about to put that domain for a adsense based website.
__________________
Blue is the colour, football is the game======We're all together, and winning is our aim
So cheer us on through the sun and rain======'cause Chelsea, Chelsea is our name

If any one ever needs any knid of help then pm me. i will try my best to help.
alpha_male is online now   Reply With Quote Send a private message to alpha_male
Old 07-03-2007, 07:48 AM   #10 (permalink)
SabrinaDeep
Im addicted to Netpond
 
SabrinaDeep's Avatar
 
Join Date: Aug 2006
Posts: 475
Points: 2,265
Send a message via ICQ to SabrinaDeep
uhm i just realised now that you probably meant to store the whole source code of an html filer inside a variable...i didnt have much sleep last night sorry eheheh.


If you want to open an html file, and put all its source content inside a variable, you need to use the file_get_content function like this:


$url = "http://www.example.net/somepage.html";
$input = @file_get_contents($url) or die('Could not access file: $url');


Now, if the file exists, the whole source content of
somepage.html is stored inside the
$input variable


xoxoxo

Sabrina
SabrinaDeep is offline   Reply With Quote Send a private message to SabrinaDeep
Old 07-03-2007, 09:17 AM   #11 (permalink)
kaktusan
Kaktusan Corp taking over the Coding biz
 
kaktusan's Avatar
 
Join Date: May 2004
Location: Bulgaria
Posts: 4,554
Points: 35
Send a message via ICQ to kaktusan Send a message via AIM to kaktusan
Quote:
Originally Posted by SabrinaDeep
uhm i just realised now that you probably meant to store the whole source code of an html filer inside a variable...i didnt have much sleep last night sorry eheheh.


If you want to open an html file, and put all its source content inside a variable, you need to use the file_get_content function like this:


$url = "http://www.example.net/somepage.html";
$input = @file_get_contents($url) or die('Could not access file: $url');


Now, if the file exists, the whole source content of
somepage.html is stored inside the
$input variable


xoxoxo

Sabrina
you are getting on the right track

just the die('Could not access file: $url'); won't be working normally, since you have put variable inside single quot symbol
__________________


#1 Mass Blogging Script: Blogs Organizer | #1 Mass RSS Feeder Script Blogs Automater
#1 Multidomain Hardlink Trade Script : Links Organizer | #1 Blog Posts Builder Script: Gallery Scraper
Complete List of Affiliate RSS Feeds! | A-B-C Blog Linktrades
kaktusan is offline   Reply With Quote Send a private message to kaktusan
Old 07-03-2007, 11:03 AM   #12 (permalink)
SabrinaDeep
Im addicted to Netpond
 
SabrinaDeep's Avatar
 
Join Date: Aug 2006
Posts: 475
Points: 2,265
Send a message via ICQ to SabrinaDeep
yep kaktusan, my mistake :-)

by the way, are you on icq? can i hit you quickly?
SabrinaDeep is offline   Reply With Quote Send a private message to SabrinaDeep
Old 07-03-2007, 11:07 AM   #13 (permalink)
kaktusan
Kaktusan Corp taking over the Coding biz
 
kaktusan's Avatar
 
Join Date: May 2004
Location: Bulgaria
Posts: 4,554
Points: 35
Send a message via ICQ to kaktusan Send a message via AIM to kaktusan
Quote:
Originally Posted by SabrinaDeep
yep kaktusan, my mistake :-)

by the way, are you on icq? can i hit you quickly?
np

currently my icq is off. I have some important work to finish..should turn it on in couple of hours.. leave me a message there and i will get back to you
__________________


#1 Mass Blogging Script: Blogs Organizer | #1 Mass RSS Feeder Script Blogs Automater
#1 Multidomain Hardlink Trade Script : Links Organizer | #1 Blog Posts Builder Script: Gallery Scraper
Complete List of Affiliate RSS Feeds! | A-B-C Blog Linktrades
kaktusan is offline   Reply With Quote Send a private message to kaktusan
Reply


Thread Tools
Display Modes



Netpond Resources
Resource Directory Tutorials & Articles Webmaster Tools Netpond News
 
Netpond Resources
LoveDollars WildCash PussyCash SilverCash
Fetish Hits Cyberwurx BoobBucks.NET Python
AEBN GroobyBucks Score-Cash XMoney
Rabbits Reviews CraziesCash TrafficCashGold EvilAngelCash
Orgycash BigClicks Webcams TubeClicks
Free Porn Paradise British Porno British Porn Models ShanesworldCash
Video On Demand Video On Demand
All times are GMT -4. The time now is 09:12 AM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
vBCredits v1.4 Copyright ©2007, PixelFX Studios