![]() |
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. |
$handle = fopen("/tmp/inputfile.txt", "r");
while (!feof($handle)) { $buffer = fgets($handle, 4096); echo $buffer; } fclose($handle); |
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
|
There are many ways to do it, for the parsing part try google (search for regex) :321GFY
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); |
thanks for all the help
|
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! |
All times are GMT -7. The time now is 07:11 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123