dreamwest
-
Posts
1,223 -
Joined
-
Last visited
Never
Posts posted by dreamwest
-
-
I've done a couple of changes to the layout:
- Made
boxes look like [code] boxes (like before).
Split replies/views into separate columns (like before).- Removed SMF logo from header.
and.....increase text size in forums - yay
-
is it all mp3 files?
-
PHP just sends the HTML to the browser, it doesn't interpret the HTML, so it doesn't load the image. That's the job of the browser. So the reason it's not working is because by the time the browser tries to load the image (the php script has already send the output and stopped executing) the image was unlinked and does no exist anymore.
Is there a way around this?
-
I want to pass an image to the browser then unlink() it
Ive tried this but it doesnt work
echo "<img src='image.jpg' border='0' />"; unlink('image.jpg');
-
Oh, I don't doubt you know how to spell your country's name. Just figured it was an unintentional typo or whatever. Not like it matters anyway.
Well its hard to spell, it only took me 12 years to spell it right. BUT...I can spell America - U.S.A
-
Yeah - its in my profile
No, it says "austrailia"
Thats how I used to spell it - I now know its Australia
-
Ill give you $50 (AU) if you write me a decent javascript tutorial for my site with examples.
Damn, your Australian?
Yeah - its in my profile
We have one thing i cant live without.........LEGAL BROTHELS!!
-
filemtime()
-
so you only have 2 dollars and 40 cents to your name? Thats unfortunate
At least its not in the negative
Over paypal,
lol I got 2.40$ left and i need to get a .com, im trying to find a 1.99$ TLD Register.. i found 1 last year it was go daddy, but it wont work now.. iuno i need to find another Registrar..
thanks, lol anyone got any ideas on some sites 1.99$ for .com
Ill give you $50 (AU) if you write me a decent javascript tutorial for my site with examples. Dont copy and paste it from some site though. But you can compile it from different sources.
-
Awesome! Just what i needed
-
function redirect( $url ){ if (! headers_sent( ) ){ header( "Location: ".$url ); exit( 0 ); } echo "<script language=Javascript>document.location.href='".$url."';</script>"; exit( 0 ); } redirect('http://www.cars.com/buses/coachescontent/index.html');
-
I have some php code snippets stored in my database:
<?php echo 'Hello'; ?>
How can i select this and execute it?? If not is there an alternative??
$res = mysql_query("select * from code were id =1"); $row= mysql_fetch_assoc($res); $code = $row['code']; //this is the code to be executed
-
There have been like 7 Friday the 13ths this year.
Also its Thursday the 12th for some users right now. Anyways, you actually believe in that garbage? Its all non-sense I tell you!
No Way!
Next youll tell me santa isnt coming to see me this year.....
-
$q = 'community channel'; $q = str_replace(' ','%20',$q); $src = @file_get_contents("http://gdata.youtube.com/feeds/videos?vq={$q}&start-index=1&max-results=5")
-
*bump* This time it made it to the middle of the fourth page....so am I really on my own on this one?
Properly because of the type of content your after - ppl's private info. Im not going to ask what you intend to do with it.
preg_match_all() will definatley work with a foreach loop
-
You need the absolute path
/home/user/htdocs/uploads/ and $_FILES["file"]["name"]
if(unlink("/home/user/htdocs/uploads/".$_FILES["file"]["name"])){
echo 'Deleted original file!';
}
-
Also remember if u have a 7 digit code thats millions of combinations alone
-
This will produce the codes you need using chr()
function password_gen($min=6,$max=6,$id){ /*has a default min value of 6 and maximum value of 6*/ $pwd=""; // to store generated password for($i=0;$i<rand($min,$max);$i++){ $num=rand(48,122); if(($num >= 97 && $num <= 122)) $pwd.=chr($num); else if(($num >= 65 && $num <= 90)) $pwd.=chr($num); else if(($num >=48 && $num <= 57)) $pwd.=chr($num); else $i--; } return $pwd; } echo password_gen(6,6, 12 );
-
chr() will give you random codes like "KILhh5jhd32" etc..
-
$link = connectToDB(); if(isset($_POST['submit'])){ $filename=$_POST['filename']; $handle = fopen("$filename", "r"); //GRAB LAST ID FROM LOG TABLE $batchid=mysql_insert_id(); //INSERT EACH ROW INTO THE TABLE $cnt = 1; while (($data = fgetcsv($handle, 1000, ",")) !== FALSE){ $import="INSERT INTO inventoryTable(campcode,imbatchid, importdate,fname, mname, lname, phone, address1, address2, city, state, zip) VALUES('$data[0]','$batchid',NOW(),'$data[1]','$data[2]','$data[3]', '$data[4]','$data[5]','$data[6]','$data[7]','$data[8]','$data[9]')"; mysql_query($import) or die(mysql_error()); ++$cnt; } fclose($handle); print "Import done"; //LOG THE BATCH IMPORT $user=$_SESSION['SESS_MEMBER_ID']; $log_query="INSERT INTO batchImportLog(ImportDate,FileLocation,RecordCount, ImUserID ) VALUES(NOW(),'xxx','{$cnt}','{$user}')"; mysql_query($log_query) or die(mysql_error()); print '<br>All done!'; }else{ print "<form action='import.php' method='post'>"; print "Type file name to import:<br>"; print "<input type='text' name='filename' size='20'><br>"; print "<input type='submit' name='submit' value='submit'></form>"; }
-
Welll forgetting about the class, this will get the info you want. Your not getting multiple items per page so you wont need preg_match_all()
$u = 'http://whitepages.anywho.com/results.php?ReportType=34&qi=0&qk=10&qn=A&qs=AK'; $g = @file_get_contents($u); //remove @ to show errors $a = explode('<span class="singleName">',$g); $a = explode('</div></div>',$a[1]); $a= $a[0]; echo $a; echo '<hr>Done!';
Just str_replace() the divs so you can put it into the database
-
You have to check if headers have been sent yet:
function redirect( $url ){ if (! headers_sent( ) ){ header( "Location: ".$url ); exit( 0 ); } echo "<script language=Javascript>document.location.href='".$url."';</script>"; exit( 0 ); } redirect('any url here you want');
-
Also file_get_contents() is crappy if you dont know what pages your going after. If the page redirects youll get nothing. Curl is better for this.
If you definitley know the page is http://site.com then file_get_contents() is ok but if it redirects http://site.com -> http://www.site.com then your screwed
-
What do you want the spider to get from this url:
http://whitepages.anywho.com/results.php?ReportType=34
eg links, meta tags etc...
What do you think of the new look of these forums?
in PHPFreaks.com Website Feedback
Posted
One thing i do like about the new forum is the pink ad div at the end of each post...
...BUT its a little lacking - it should be sandwiched between each comment as well