![]() |
![]() |
![]() |
||||
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. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
|
PHP Expert needed
hi can anyone point me in the right direction as to how i can code the following in php
1. open a text file... scan and look for a link/string that starts with the following "<http://images.domain.com//myImages/" (random characters in between) and ends with an ">" so basically find "<http://images.domain.com//myImages/qwerty.jpg?223423&ID=userJoE>" and strip it down to "http://images.domain.com//myImages/qwerty.jpg?223423&ID=userJoE" then download that image to a folder. I can do this with no problem using VC.net or VB.net but does anyone have an idea as to how it's done in php? i probably can figure out the parsing part but the image download not sure how to do that. but any help will be greatful. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Too lazy to set a custom title
Join Date: Jan 2002
Location: Holland
Posts: 9,870
|
$handle = fopen("/tmp/inputfile.txt", "r");
while (!feof($handle)) { $buffer = fgets($handle, 4096); echo $buffer; } fclose($handle);
__________________
Don't let greediness blur your vision | You gotta let some shit slide icq - 441-456-888 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
|
i think my biggest problem is having the script process http://images.domain.com//myImages/q...423&ID=userJoE and download the image qwerty.jpg
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Aug 2004
Location: www.calidi.com
Posts: 102
|
There are many ways to do it, for the parsing part try google (search for regex)
![]() To write the file, this is easiest way imo : $pictureURL = "http://www.gofuckyourself.com/skins/realitycash/images/newthread.gif"; $file = implode("", file($pictureURL)); $handle = fopen("newthread.gif", "w+b"); fwrite($handle, $file); fclose($handle); |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
|
thanks for all the help
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Industry Role:
Join Date: Mar 2003
Location: Pornblogspace.com
Posts: 334
|
hello acctman,
i can code the script you need against a small and reasonable charge. If you want to learn more about my biz you can check http://www.kaktusancorp.com and if interested you can contact me through the form there or directly by ICQ 411661 Thanks!
__________________
![]() Superior Blogging Scripts | Porn Blog Space - not just another free blog hosting! |
![]() |
![]() ![]() ![]() ![]() ![]() |